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