xref: /wlan-driver/fw-api/hw/kiwi/v2/received_response_user_info.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 
2 /*
3  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  */
17 
18 
19 
20 #ifndef _RECEIVED_RESPONSE_USER_INFO_H_
21 #define _RECEIVED_RESPONSE_USER_INFO_H_
22 #if !defined(__ASSEMBLER__)
23 #endif
24 
25 #define NUM_OF_DWORDS_RECEIVED_RESPONSE_USER_INFO 8
26 
27 struct received_response_user_info {
28 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
29              uint32_t mpdu_fcs_pass_count                                     : 12,
30                       mpdu_fcs_fail_count                                     : 12,
31                       qosnull_frame_count                                     :  4,
32                       reserved_0a                                             :  3,
33                       user_info_valid                                         :  1;
34              uint32_t null_delimiter_count                                    : 22,
35                       reserved_1a                                             :  9,
36                       ht_control_valid                                        :  1;
37              uint32_t ht_control                                              : 32;
38              uint32_t qos_control_valid                                       : 16,
39                       eosp                                                    : 16;
40              uint32_t qos_control_15_8_tid_0                                  :  8,
41                       qos_control_15_8_tid_1                                  :  8,
42                       qos_control_15_8_tid_2                                  :  8,
43                       qos_control_15_8_tid_3                                  :  8;
44              uint32_t qos_control_15_8_tid_4                                  :  8,
45                       qos_control_15_8_tid_5                                  :  8,
46                       qos_control_15_8_tid_6                                  :  8,
47                       qos_control_15_8_tid_7                                  :  8;
48              uint32_t qos_control_15_8_tid_8                                  :  8,
49                       qos_control_15_8_tid_9                                  :  8,
50                       qos_control_15_8_tid_10                                 :  8,
51                       qos_control_15_8_tid_11                                 :  8;
52              uint32_t qos_control_15_8_tid_12                                 :  8,
53                       qos_control_15_8_tid_13                                 :  8,
54                       qos_control_15_8_tid_14                                 :  8,
55                       qos_control_15_8_tid_15                                 :  8;
56 #else
57              uint32_t user_info_valid                                         :  1,
58                       reserved_0a                                             :  3,
59                       qosnull_frame_count                                     :  4,
60                       mpdu_fcs_fail_count                                     : 12,
61                       mpdu_fcs_pass_count                                     : 12;
62              uint32_t ht_control_valid                                        :  1,
63                       reserved_1a                                             :  9,
64                       null_delimiter_count                                    : 22;
65              uint32_t ht_control                                              : 32;
66              uint32_t eosp                                                    : 16,
67                       qos_control_valid                                       : 16;
68              uint32_t qos_control_15_8_tid_3                                  :  8,
69                       qos_control_15_8_tid_2                                  :  8,
70                       qos_control_15_8_tid_1                                  :  8,
71                       qos_control_15_8_tid_0                                  :  8;
72              uint32_t qos_control_15_8_tid_7                                  :  8,
73                       qos_control_15_8_tid_6                                  :  8,
74                       qos_control_15_8_tid_5                                  :  8,
75                       qos_control_15_8_tid_4                                  :  8;
76              uint32_t qos_control_15_8_tid_11                                 :  8,
77                       qos_control_15_8_tid_10                                 :  8,
78                       qos_control_15_8_tid_9                                  :  8,
79                       qos_control_15_8_tid_8                                  :  8;
80              uint32_t qos_control_15_8_tid_15                                 :  8,
81                       qos_control_15_8_tid_14                                 :  8,
82                       qos_control_15_8_tid_13                                 :  8,
83                       qos_control_15_8_tid_12                                 :  8;
84 #endif
85 };
86 
87 #define RECEIVED_RESPONSE_USER_INFO_MPDU_FCS_PASS_COUNT_OFFSET                      0x00000000
88 #define RECEIVED_RESPONSE_USER_INFO_MPDU_FCS_PASS_COUNT_LSB                         0
89 #define RECEIVED_RESPONSE_USER_INFO_MPDU_FCS_PASS_COUNT_MSB                         11
90 #define RECEIVED_RESPONSE_USER_INFO_MPDU_FCS_PASS_COUNT_MASK                        0x00000fff
91 
92 #define RECEIVED_RESPONSE_USER_INFO_MPDU_FCS_FAIL_COUNT_OFFSET                      0x00000000
93 #define RECEIVED_RESPONSE_USER_INFO_MPDU_FCS_FAIL_COUNT_LSB                         12
94 #define RECEIVED_RESPONSE_USER_INFO_MPDU_FCS_FAIL_COUNT_MSB                         23
95 #define RECEIVED_RESPONSE_USER_INFO_MPDU_FCS_FAIL_COUNT_MASK                        0x00fff000
96 
97 #define RECEIVED_RESPONSE_USER_INFO_QOSNULL_FRAME_COUNT_OFFSET                      0x00000000
98 #define RECEIVED_RESPONSE_USER_INFO_QOSNULL_FRAME_COUNT_LSB                         24
99 #define RECEIVED_RESPONSE_USER_INFO_QOSNULL_FRAME_COUNT_MSB                         27
100 #define RECEIVED_RESPONSE_USER_INFO_QOSNULL_FRAME_COUNT_MASK                        0x0f000000
101 
102 #define RECEIVED_RESPONSE_USER_INFO_RESERVED_0A_OFFSET                              0x00000000
103 #define RECEIVED_RESPONSE_USER_INFO_RESERVED_0A_LSB                                 28
104 #define RECEIVED_RESPONSE_USER_INFO_RESERVED_0A_MSB                                 30
105 #define RECEIVED_RESPONSE_USER_INFO_RESERVED_0A_MASK                                0x70000000
106 
107 #define RECEIVED_RESPONSE_USER_INFO_USER_INFO_VALID_OFFSET                          0x00000000
108 #define RECEIVED_RESPONSE_USER_INFO_USER_INFO_VALID_LSB                             31
109 #define RECEIVED_RESPONSE_USER_INFO_USER_INFO_VALID_MSB                             31
110 #define RECEIVED_RESPONSE_USER_INFO_USER_INFO_VALID_MASK                            0x80000000
111 
112 #define RECEIVED_RESPONSE_USER_INFO_NULL_DELIMITER_COUNT_OFFSET                     0x00000004
113 #define RECEIVED_RESPONSE_USER_INFO_NULL_DELIMITER_COUNT_LSB                        0
114 #define RECEIVED_RESPONSE_USER_INFO_NULL_DELIMITER_COUNT_MSB                        21
115 #define RECEIVED_RESPONSE_USER_INFO_NULL_DELIMITER_COUNT_MASK                       0x003fffff
116 
117 #define RECEIVED_RESPONSE_USER_INFO_RESERVED_1A_OFFSET                              0x00000004
118 #define RECEIVED_RESPONSE_USER_INFO_RESERVED_1A_LSB                                 22
119 #define RECEIVED_RESPONSE_USER_INFO_RESERVED_1A_MSB                                 30
120 #define RECEIVED_RESPONSE_USER_INFO_RESERVED_1A_MASK                                0x7fc00000
121 
122 #define RECEIVED_RESPONSE_USER_INFO_HT_CONTROL_VALID_OFFSET                         0x00000004
123 #define RECEIVED_RESPONSE_USER_INFO_HT_CONTROL_VALID_LSB                            31
124 #define RECEIVED_RESPONSE_USER_INFO_HT_CONTROL_VALID_MSB                            31
125 #define RECEIVED_RESPONSE_USER_INFO_HT_CONTROL_VALID_MASK                           0x80000000
126 
127 #define RECEIVED_RESPONSE_USER_INFO_HT_CONTROL_OFFSET                               0x00000008
128 #define RECEIVED_RESPONSE_USER_INFO_HT_CONTROL_LSB                                  0
129 #define RECEIVED_RESPONSE_USER_INFO_HT_CONTROL_MSB                                  31
130 #define RECEIVED_RESPONSE_USER_INFO_HT_CONTROL_MASK                                 0xffffffff
131 
132 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_VALID_OFFSET                        0x0000000c
133 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_VALID_LSB                           0
134 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_VALID_MSB                           15
135 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_VALID_MASK                          0x0000ffff
136 
137 #define RECEIVED_RESPONSE_USER_INFO_EOSP_OFFSET                                     0x0000000c
138 #define RECEIVED_RESPONSE_USER_INFO_EOSP_LSB                                        16
139 #define RECEIVED_RESPONSE_USER_INFO_EOSP_MSB                                        31
140 #define RECEIVED_RESPONSE_USER_INFO_EOSP_MASK                                       0xffff0000
141 
142 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_0_OFFSET                   0x00000010
143 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_0_LSB                      0
144 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_0_MSB                      7
145 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_0_MASK                     0x000000ff
146 
147 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_1_OFFSET                   0x00000010
148 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_1_LSB                      8
149 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_1_MSB                      15
150 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_1_MASK                     0x0000ff00
151 
152 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_2_OFFSET                   0x00000010
153 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_2_LSB                      16
154 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_2_MSB                      23
155 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_2_MASK                     0x00ff0000
156 
157 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_3_OFFSET                   0x00000010
158 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_3_LSB                      24
159 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_3_MSB                      31
160 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_3_MASK                     0xff000000
161 
162 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_4_OFFSET                   0x00000014
163 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_4_LSB                      0
164 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_4_MSB                      7
165 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_4_MASK                     0x000000ff
166 
167 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_5_OFFSET                   0x00000014
168 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_5_LSB                      8
169 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_5_MSB                      15
170 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_5_MASK                     0x0000ff00
171 
172 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_6_OFFSET                   0x00000014
173 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_6_LSB                      16
174 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_6_MSB                      23
175 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_6_MASK                     0x00ff0000
176 
177 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_7_OFFSET                   0x00000014
178 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_7_LSB                      24
179 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_7_MSB                      31
180 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_7_MASK                     0xff000000
181 
182 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_8_OFFSET                   0x00000018
183 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_8_LSB                      0
184 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_8_MSB                      7
185 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_8_MASK                     0x000000ff
186 
187 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_9_OFFSET                   0x00000018
188 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_9_LSB                      8
189 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_9_MSB                      15
190 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_9_MASK                     0x0000ff00
191 
192 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_10_OFFSET                  0x00000018
193 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_10_LSB                     16
194 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_10_MSB                     23
195 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_10_MASK                    0x00ff0000
196 
197 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_11_OFFSET                  0x00000018
198 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_11_LSB                     24
199 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_11_MSB                     31
200 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_11_MASK                    0xff000000
201 
202 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_12_OFFSET                  0x0000001c
203 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_12_LSB                     0
204 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_12_MSB                     7
205 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_12_MASK                    0x000000ff
206 
207 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_13_OFFSET                  0x0000001c
208 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_13_LSB                     8
209 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_13_MSB                     15
210 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_13_MASK                    0x0000ff00
211 
212 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_14_OFFSET                  0x0000001c
213 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_14_LSB                     16
214 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_14_MSB                     23
215 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_14_MASK                    0x00ff0000
216 
217 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_15_OFFSET                  0x0000001c
218 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_15_LSB                     24
219 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_15_MSB                     31
220 #define RECEIVED_RESPONSE_USER_INFO_QOS_CONTROL_15_8_TID_15_MASK                    0xff000000
221 
222 #endif
223