xref: /wlan-driver/fw-api/hw/kiwi/v2/expected_response.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name 
2*5113495bSYour Name /*
3*5113495bSYour Name  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name  *
5*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for any
6*5113495bSYour Name  * purpose with or without fee is hereby granted, provided that the above
7*5113495bSYour Name  * copyright notice and this permission notice appear in all copies.
8*5113495bSYour Name  *
9*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10*5113495bSYour Name  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11*5113495bSYour Name  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12*5113495bSYour Name  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13*5113495bSYour Name  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14*5113495bSYour Name  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15*5113495bSYour Name  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16*5113495bSYour Name  */
17*5113495bSYour Name 
18*5113495bSYour Name 
19*5113495bSYour Name 
20*5113495bSYour Name #ifndef _EXPECTED_RESPONSE_H_
21*5113495bSYour Name #define _EXPECTED_RESPONSE_H_
22*5113495bSYour Name #if !defined(__ASSEMBLER__)
23*5113495bSYour Name #endif
24*5113495bSYour Name 
25*5113495bSYour Name #define NUM_OF_DWORDS_EXPECTED_RESPONSE 6
26*5113495bSYour Name 
27*5113495bSYour Name #define NUM_OF_QWORDS_EXPECTED_RESPONSE 3
28*5113495bSYour Name 
29*5113495bSYour Name struct expected_response {
30*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
31*5113495bSYour Name              uint32_t tx_ad2_31_0                                             : 32;
32*5113495bSYour Name              uint32_t tx_ad2_47_32                                            : 16,
33*5113495bSYour Name                       expected_response_type                                  :  5,
34*5113495bSYour Name                       response_to_response                                    :  3,
35*5113495bSYour Name                       su_ba_user_number                                       :  1,
36*5113495bSYour Name                       response_info_part2_required                            :  1,
37*5113495bSYour Name                       transmitted_bssid_check_en                              :  1,
38*5113495bSYour Name                       reserved_1                                              :  5;
39*5113495bSYour Name              uint32_t ndp_sta_partial_aid_2_8_0                               : 11,
40*5113495bSYour Name                       reserved_2                                              : 10,
41*5113495bSYour Name                       ndp_sta_partial_aid1_8_0                                : 11;
42*5113495bSYour Name              uint32_t ast_index                                               : 16,
43*5113495bSYour Name                       capture_ack_ba_sounding                                 :  1,
44*5113495bSYour Name                       capture_sounding_1str_20mhz                             :  1,
45*5113495bSYour Name                       capture_sounding_1str_40mhz                             :  1,
46*5113495bSYour Name                       capture_sounding_1str_80mhz                             :  1,
47*5113495bSYour Name                       capture_sounding_1str_160mhz                            :  1,
48*5113495bSYour Name                       capture_sounding_1str_240mhz                            :  1,
49*5113495bSYour Name                       capture_sounding_1str_320mhz                            :  1,
50*5113495bSYour Name                       reserved_3a                                             :  9;
51*5113495bSYour Name              uint32_t fcs                                                     :  9,
52*5113495bSYour Name                       reserved_4a                                             :  1,
53*5113495bSYour Name                       crc                                                     :  4,
54*5113495bSYour Name                       scrambler_seed                                          :  7,
55*5113495bSYour Name                       reserved_4b                                             : 11;
56*5113495bSYour Name              uint32_t tlv64_padding                                           : 32;
57*5113495bSYour Name #else
58*5113495bSYour Name              uint32_t tx_ad2_31_0                                             : 32;
59*5113495bSYour Name              uint32_t reserved_1                                              :  5,
60*5113495bSYour Name                       transmitted_bssid_check_en                              :  1,
61*5113495bSYour Name                       response_info_part2_required                            :  1,
62*5113495bSYour Name                       su_ba_user_number                                       :  1,
63*5113495bSYour Name                       response_to_response                                    :  3,
64*5113495bSYour Name                       expected_response_type                                  :  5,
65*5113495bSYour Name                       tx_ad2_47_32                                            : 16;
66*5113495bSYour Name              uint32_t ndp_sta_partial_aid1_8_0                                : 11,
67*5113495bSYour Name                       reserved_2                                              : 10,
68*5113495bSYour Name                       ndp_sta_partial_aid_2_8_0                               : 11;
69*5113495bSYour Name              uint32_t reserved_3a                                             :  9,
70*5113495bSYour Name                       capture_sounding_1str_320mhz                            :  1,
71*5113495bSYour Name                       capture_sounding_1str_240mhz                            :  1,
72*5113495bSYour Name                       capture_sounding_1str_160mhz                            :  1,
73*5113495bSYour Name                       capture_sounding_1str_80mhz                             :  1,
74*5113495bSYour Name                       capture_sounding_1str_40mhz                             :  1,
75*5113495bSYour Name                       capture_sounding_1str_20mhz                             :  1,
76*5113495bSYour Name                       capture_ack_ba_sounding                                 :  1,
77*5113495bSYour Name                       ast_index                                               : 16;
78*5113495bSYour Name              uint32_t reserved_4b                                             : 11,
79*5113495bSYour Name                       scrambler_seed                                          :  7,
80*5113495bSYour Name                       crc                                                     :  4,
81*5113495bSYour Name                       reserved_4a                                             :  1,
82*5113495bSYour Name                       fcs                                                     :  9;
83*5113495bSYour Name              uint32_t tlv64_padding                                           : 32;
84*5113495bSYour Name #endif
85*5113495bSYour Name };
86*5113495bSYour Name 
87*5113495bSYour Name #define EXPECTED_RESPONSE_TX_AD2_31_0_OFFSET                                        0x0000000000000000
88*5113495bSYour Name #define EXPECTED_RESPONSE_TX_AD2_31_0_LSB                                           0
89*5113495bSYour Name #define EXPECTED_RESPONSE_TX_AD2_31_0_MSB                                           31
90*5113495bSYour Name #define EXPECTED_RESPONSE_TX_AD2_31_0_MASK                                          0x00000000ffffffff
91*5113495bSYour Name 
92*5113495bSYour Name #define EXPECTED_RESPONSE_TX_AD2_47_32_OFFSET                                       0x0000000000000000
93*5113495bSYour Name #define EXPECTED_RESPONSE_TX_AD2_47_32_LSB                                          32
94*5113495bSYour Name #define EXPECTED_RESPONSE_TX_AD2_47_32_MSB                                          47
95*5113495bSYour Name #define EXPECTED_RESPONSE_TX_AD2_47_32_MASK                                         0x0000ffff00000000
96*5113495bSYour Name 
97*5113495bSYour Name #define EXPECTED_RESPONSE_EXPECTED_RESPONSE_TYPE_OFFSET                             0x0000000000000000
98*5113495bSYour Name #define EXPECTED_RESPONSE_EXPECTED_RESPONSE_TYPE_LSB                                48
99*5113495bSYour Name #define EXPECTED_RESPONSE_EXPECTED_RESPONSE_TYPE_MSB                                52
100*5113495bSYour Name #define EXPECTED_RESPONSE_EXPECTED_RESPONSE_TYPE_MASK                               0x001f000000000000
101*5113495bSYour Name 
102*5113495bSYour Name #define EXPECTED_RESPONSE_RESPONSE_TO_RESPONSE_OFFSET                               0x0000000000000000
103*5113495bSYour Name #define EXPECTED_RESPONSE_RESPONSE_TO_RESPONSE_LSB                                  53
104*5113495bSYour Name #define EXPECTED_RESPONSE_RESPONSE_TO_RESPONSE_MSB                                  55
105*5113495bSYour Name #define EXPECTED_RESPONSE_RESPONSE_TO_RESPONSE_MASK                                 0x00e0000000000000
106*5113495bSYour Name 
107*5113495bSYour Name #define EXPECTED_RESPONSE_SU_BA_USER_NUMBER_OFFSET                                  0x0000000000000000
108*5113495bSYour Name #define EXPECTED_RESPONSE_SU_BA_USER_NUMBER_LSB                                     56
109*5113495bSYour Name #define EXPECTED_RESPONSE_SU_BA_USER_NUMBER_MSB                                     56
110*5113495bSYour Name #define EXPECTED_RESPONSE_SU_BA_USER_NUMBER_MASK                                    0x0100000000000000
111*5113495bSYour Name 
112*5113495bSYour Name #define EXPECTED_RESPONSE_RESPONSE_INFO_PART2_REQUIRED_OFFSET                       0x0000000000000000
113*5113495bSYour Name #define EXPECTED_RESPONSE_RESPONSE_INFO_PART2_REQUIRED_LSB                          57
114*5113495bSYour Name #define EXPECTED_RESPONSE_RESPONSE_INFO_PART2_REQUIRED_MSB                          57
115*5113495bSYour Name #define EXPECTED_RESPONSE_RESPONSE_INFO_PART2_REQUIRED_MASK                         0x0200000000000000
116*5113495bSYour Name 
117*5113495bSYour Name #define EXPECTED_RESPONSE_TRANSMITTED_BSSID_CHECK_EN_OFFSET                         0x0000000000000000
118*5113495bSYour Name #define EXPECTED_RESPONSE_TRANSMITTED_BSSID_CHECK_EN_LSB                            58
119*5113495bSYour Name #define EXPECTED_RESPONSE_TRANSMITTED_BSSID_CHECK_EN_MSB                            58
120*5113495bSYour Name #define EXPECTED_RESPONSE_TRANSMITTED_BSSID_CHECK_EN_MASK                           0x0400000000000000
121*5113495bSYour Name 
122*5113495bSYour Name #define EXPECTED_RESPONSE_RESERVED_1_OFFSET                                         0x0000000000000000
123*5113495bSYour Name #define EXPECTED_RESPONSE_RESERVED_1_LSB                                            59
124*5113495bSYour Name #define EXPECTED_RESPONSE_RESERVED_1_MSB                                            63
125*5113495bSYour Name #define EXPECTED_RESPONSE_RESERVED_1_MASK                                           0xf800000000000000
126*5113495bSYour Name 
127*5113495bSYour Name #define EXPECTED_RESPONSE_NDP_STA_PARTIAL_AID_2_8_0_OFFSET                          0x0000000000000008
128*5113495bSYour Name #define EXPECTED_RESPONSE_NDP_STA_PARTIAL_AID_2_8_0_LSB                             0
129*5113495bSYour Name #define EXPECTED_RESPONSE_NDP_STA_PARTIAL_AID_2_8_0_MSB                             10
130*5113495bSYour Name #define EXPECTED_RESPONSE_NDP_STA_PARTIAL_AID_2_8_0_MASK                            0x00000000000007ff
131*5113495bSYour Name 
132*5113495bSYour Name #define EXPECTED_RESPONSE_RESERVED_2_OFFSET                                         0x0000000000000008
133*5113495bSYour Name #define EXPECTED_RESPONSE_RESERVED_2_LSB                                            11
134*5113495bSYour Name #define EXPECTED_RESPONSE_RESERVED_2_MSB                                            20
135*5113495bSYour Name #define EXPECTED_RESPONSE_RESERVED_2_MASK                                           0x00000000001ff800
136*5113495bSYour Name 
137*5113495bSYour Name #define EXPECTED_RESPONSE_NDP_STA_PARTIAL_AID1_8_0_OFFSET                           0x0000000000000008
138*5113495bSYour Name #define EXPECTED_RESPONSE_NDP_STA_PARTIAL_AID1_8_0_LSB                              21
139*5113495bSYour Name #define EXPECTED_RESPONSE_NDP_STA_PARTIAL_AID1_8_0_MSB                              31
140*5113495bSYour Name #define EXPECTED_RESPONSE_NDP_STA_PARTIAL_AID1_8_0_MASK                             0x00000000ffe00000
141*5113495bSYour Name 
142*5113495bSYour Name #define EXPECTED_RESPONSE_AST_INDEX_OFFSET                                          0x0000000000000008
143*5113495bSYour Name #define EXPECTED_RESPONSE_AST_INDEX_LSB                                             32
144*5113495bSYour Name #define EXPECTED_RESPONSE_AST_INDEX_MSB                                             47
145*5113495bSYour Name #define EXPECTED_RESPONSE_AST_INDEX_MASK                                            0x0000ffff00000000
146*5113495bSYour Name 
147*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_ACK_BA_SOUNDING_OFFSET                            0x0000000000000008
148*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_ACK_BA_SOUNDING_LSB                               48
149*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_ACK_BA_SOUNDING_MSB                               48
150*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_ACK_BA_SOUNDING_MASK                              0x0001000000000000
151*5113495bSYour Name 
152*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_20MHZ_OFFSET                        0x0000000000000008
153*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_20MHZ_LSB                           49
154*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_20MHZ_MSB                           49
155*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_20MHZ_MASK                          0x0002000000000000
156*5113495bSYour Name 
157*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_40MHZ_OFFSET                        0x0000000000000008
158*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_40MHZ_LSB                           50
159*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_40MHZ_MSB                           50
160*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_40MHZ_MASK                          0x0004000000000000
161*5113495bSYour Name 
162*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_80MHZ_OFFSET                        0x0000000000000008
163*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_80MHZ_LSB                           51
164*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_80MHZ_MSB                           51
165*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_80MHZ_MASK                          0x0008000000000000
166*5113495bSYour Name 
167*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_160MHZ_OFFSET                       0x0000000000000008
168*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_160MHZ_LSB                          52
169*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_160MHZ_MSB                          52
170*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_160MHZ_MASK                         0x0010000000000000
171*5113495bSYour Name 
172*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_240MHZ_OFFSET                       0x0000000000000008
173*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_240MHZ_LSB                          53
174*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_240MHZ_MSB                          53
175*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_240MHZ_MASK                         0x0020000000000000
176*5113495bSYour Name 
177*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_320MHZ_OFFSET                       0x0000000000000008
178*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_320MHZ_LSB                          54
179*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_320MHZ_MSB                          54
180*5113495bSYour Name #define EXPECTED_RESPONSE_CAPTURE_SOUNDING_1STR_320MHZ_MASK                         0x0040000000000000
181*5113495bSYour Name 
182*5113495bSYour Name #define EXPECTED_RESPONSE_RESERVED_3A_OFFSET                                        0x0000000000000008
183*5113495bSYour Name #define EXPECTED_RESPONSE_RESERVED_3A_LSB                                           55
184*5113495bSYour Name #define EXPECTED_RESPONSE_RESERVED_3A_MSB                                           63
185*5113495bSYour Name #define EXPECTED_RESPONSE_RESERVED_3A_MASK                                          0xff80000000000000
186*5113495bSYour Name 
187*5113495bSYour Name #define EXPECTED_RESPONSE_FCS_OFFSET                                                0x0000000000000010
188*5113495bSYour Name #define EXPECTED_RESPONSE_FCS_LSB                                                   0
189*5113495bSYour Name #define EXPECTED_RESPONSE_FCS_MSB                                                   8
190*5113495bSYour Name #define EXPECTED_RESPONSE_FCS_MASK                                                  0x00000000000001ff
191*5113495bSYour Name 
192*5113495bSYour Name #define EXPECTED_RESPONSE_RESERVED_4A_OFFSET                                        0x0000000000000010
193*5113495bSYour Name #define EXPECTED_RESPONSE_RESERVED_4A_LSB                                           9
194*5113495bSYour Name #define EXPECTED_RESPONSE_RESERVED_4A_MSB                                           9
195*5113495bSYour Name #define EXPECTED_RESPONSE_RESERVED_4A_MASK                                          0x0000000000000200
196*5113495bSYour Name 
197*5113495bSYour Name #define EXPECTED_RESPONSE_CRC_OFFSET                                                0x0000000000000010
198*5113495bSYour Name #define EXPECTED_RESPONSE_CRC_LSB                                                   10
199*5113495bSYour Name #define EXPECTED_RESPONSE_CRC_MSB                                                   13
200*5113495bSYour Name #define EXPECTED_RESPONSE_CRC_MASK                                                  0x0000000000003c00
201*5113495bSYour Name 
202*5113495bSYour Name #define EXPECTED_RESPONSE_SCRAMBLER_SEED_OFFSET                                     0x0000000000000010
203*5113495bSYour Name #define EXPECTED_RESPONSE_SCRAMBLER_SEED_LSB                                        14
204*5113495bSYour Name #define EXPECTED_RESPONSE_SCRAMBLER_SEED_MSB                                        20
205*5113495bSYour Name #define EXPECTED_RESPONSE_SCRAMBLER_SEED_MASK                                       0x00000000001fc000
206*5113495bSYour Name 
207*5113495bSYour Name #define EXPECTED_RESPONSE_RESERVED_4B_OFFSET                                        0x0000000000000010
208*5113495bSYour Name #define EXPECTED_RESPONSE_RESERVED_4B_LSB                                           21
209*5113495bSYour Name #define EXPECTED_RESPONSE_RESERVED_4B_MSB                                           31
210*5113495bSYour Name #define EXPECTED_RESPONSE_RESERVED_4B_MASK                                          0x00000000ffe00000
211*5113495bSYour Name 
212*5113495bSYour Name #define EXPECTED_RESPONSE_TLV64_PADDING_OFFSET                                      0x0000000000000010
213*5113495bSYour Name #define EXPECTED_RESPONSE_TLV64_PADDING_LSB                                         32
214*5113495bSYour Name #define EXPECTED_RESPONSE_TLV64_PADDING_MSB                                         63
215*5113495bSYour Name #define EXPECTED_RESPONSE_TLV64_PADDING_MASK                                        0xffffffff00000000
216*5113495bSYour Name 
217*5113495bSYour Name #endif
218