1 
2 /*
3  * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 #ifndef _PHYRX_COMMON_USER_INFO_H_
31 #define _PHYRX_COMMON_USER_INFO_H_
32 #if !defined(__ASSEMBLER__)
33 #endif
34 
35 #define NUM_OF_DWORDS_PHYRX_COMMON_USER_INFO 4
36 
37 #define NUM_OF_QWORDS_PHYRX_COMMON_USER_INFO 2
38 
39 
40 struct phyrx_common_user_info {
41 	     uint32_t receive_duration                                        : 16,
42 		      reserved_0a                                             : 16;
43 	     uint32_t u_sig_puncture_pattern_encoding                         :  6,
44 		      reserved_1a                                             : 26;
45 	     uint32_t eht_ppdu_type                                           :  2,
46 		      bss_color_id                                            :  6,
47 		      dl_ul_flag                                              :  1,
48 		      txop_duration                                           :  7,
49 		      cp_setting                                              :  2,
50 		      ltf_size                                                :  2,
51 		      spatial_reuse                                           :  4,
52 		      rx_ndp                                                  :  1,
53 		      dot11be_su_extended                                     :  1,
54 		      reserved_2a                                             :  6;
55 	     uint32_t eht_duplicate                                           :  2,
56 		      eht_sig_cmn_field_type                                  :  2,
57 		      doppler_indication                                      :  1,
58 		      sta_id                                                  : 11,
59 		      puncture_bitmap                                         : 16;
60 };
61 
62 
63 
64 
65 #define PHYRX_COMMON_USER_INFO_RECEIVE_DURATION_OFFSET                              0x0000000000000000
66 #define PHYRX_COMMON_USER_INFO_RECEIVE_DURATION_LSB                                 0
67 #define PHYRX_COMMON_USER_INFO_RECEIVE_DURATION_MSB                                 15
68 #define PHYRX_COMMON_USER_INFO_RECEIVE_DURATION_MASK                                0x000000000000ffff
69 
70 
71 
72 
73 #define PHYRX_COMMON_USER_INFO_RESERVED_0A_OFFSET                                   0x0000000000000000
74 #define PHYRX_COMMON_USER_INFO_RESERVED_0A_LSB                                      16
75 #define PHYRX_COMMON_USER_INFO_RESERVED_0A_MSB                                      31
76 #define PHYRX_COMMON_USER_INFO_RESERVED_0A_MASK                                     0x00000000ffff0000
77 
78 
79 
80 
81 #define PHYRX_COMMON_USER_INFO_U_SIG_PUNCTURE_PATTERN_ENCODING_OFFSET               0x0000000000000000
82 #define PHYRX_COMMON_USER_INFO_U_SIG_PUNCTURE_PATTERN_ENCODING_LSB                  32
83 #define PHYRX_COMMON_USER_INFO_U_SIG_PUNCTURE_PATTERN_ENCODING_MSB                  37
84 #define PHYRX_COMMON_USER_INFO_U_SIG_PUNCTURE_PATTERN_ENCODING_MASK                 0x0000003f00000000
85 
86 
87 
88 
89 #define PHYRX_COMMON_USER_INFO_RESERVED_1A_OFFSET                                   0x0000000000000000
90 #define PHYRX_COMMON_USER_INFO_RESERVED_1A_LSB                                      38
91 #define PHYRX_COMMON_USER_INFO_RESERVED_1A_MSB                                      63
92 #define PHYRX_COMMON_USER_INFO_RESERVED_1A_MASK                                     0xffffffc000000000
93 
94 
95 
96 
97 #define PHYRX_COMMON_USER_INFO_EHT_PPDU_TYPE_OFFSET                                 0x0000000000000008
98 #define PHYRX_COMMON_USER_INFO_EHT_PPDU_TYPE_LSB                                    0
99 #define PHYRX_COMMON_USER_INFO_EHT_PPDU_TYPE_MSB                                    1
100 #define PHYRX_COMMON_USER_INFO_EHT_PPDU_TYPE_MASK                                   0x0000000000000003
101 
102 
103 
104 
105 #define PHYRX_COMMON_USER_INFO_BSS_COLOR_ID_OFFSET                                  0x0000000000000008
106 #define PHYRX_COMMON_USER_INFO_BSS_COLOR_ID_LSB                                     2
107 #define PHYRX_COMMON_USER_INFO_BSS_COLOR_ID_MSB                                     7
108 #define PHYRX_COMMON_USER_INFO_BSS_COLOR_ID_MASK                                    0x00000000000000fc
109 
110 
111 
112 
113 #define PHYRX_COMMON_USER_INFO_DL_UL_FLAG_OFFSET                                    0x0000000000000008
114 #define PHYRX_COMMON_USER_INFO_DL_UL_FLAG_LSB                                       8
115 #define PHYRX_COMMON_USER_INFO_DL_UL_FLAG_MSB                                       8
116 #define PHYRX_COMMON_USER_INFO_DL_UL_FLAG_MASK                                      0x0000000000000100
117 
118 
119 
120 
121 #define PHYRX_COMMON_USER_INFO_TXOP_DURATION_OFFSET                                 0x0000000000000008
122 #define PHYRX_COMMON_USER_INFO_TXOP_DURATION_LSB                                    9
123 #define PHYRX_COMMON_USER_INFO_TXOP_DURATION_MSB                                    15
124 #define PHYRX_COMMON_USER_INFO_TXOP_DURATION_MASK                                   0x000000000000fe00
125 
126 
127 
128 
129 #define PHYRX_COMMON_USER_INFO_CP_SETTING_OFFSET                                    0x0000000000000008
130 #define PHYRX_COMMON_USER_INFO_CP_SETTING_LSB                                       16
131 #define PHYRX_COMMON_USER_INFO_CP_SETTING_MSB                                       17
132 #define PHYRX_COMMON_USER_INFO_CP_SETTING_MASK                                      0x0000000000030000
133 
134 
135 
136 
137 #define PHYRX_COMMON_USER_INFO_LTF_SIZE_OFFSET                                      0x0000000000000008
138 #define PHYRX_COMMON_USER_INFO_LTF_SIZE_LSB                                         18
139 #define PHYRX_COMMON_USER_INFO_LTF_SIZE_MSB                                         19
140 #define PHYRX_COMMON_USER_INFO_LTF_SIZE_MASK                                        0x00000000000c0000
141 
142 
143 
144 
145 #define PHYRX_COMMON_USER_INFO_SPATIAL_REUSE_OFFSET                                 0x0000000000000008
146 #define PHYRX_COMMON_USER_INFO_SPATIAL_REUSE_LSB                                    20
147 #define PHYRX_COMMON_USER_INFO_SPATIAL_REUSE_MSB                                    23
148 #define PHYRX_COMMON_USER_INFO_SPATIAL_REUSE_MASK                                   0x0000000000f00000
149 
150 
151 
152 
153 #define PHYRX_COMMON_USER_INFO_RX_NDP_OFFSET                                        0x0000000000000008
154 #define PHYRX_COMMON_USER_INFO_RX_NDP_LSB                                           24
155 #define PHYRX_COMMON_USER_INFO_RX_NDP_MSB                                           24
156 #define PHYRX_COMMON_USER_INFO_RX_NDP_MASK                                          0x0000000001000000
157 
158 
159 
160 
161 #define PHYRX_COMMON_USER_INFO_DOT11BE_SU_EXTENDED_OFFSET                           0x0000000000000008
162 #define PHYRX_COMMON_USER_INFO_DOT11BE_SU_EXTENDED_LSB                              25
163 #define PHYRX_COMMON_USER_INFO_DOT11BE_SU_EXTENDED_MSB                              25
164 #define PHYRX_COMMON_USER_INFO_DOT11BE_SU_EXTENDED_MASK                             0x0000000002000000
165 
166 
167 
168 
169 #define PHYRX_COMMON_USER_INFO_RESERVED_2A_OFFSET                                   0x0000000000000008
170 #define PHYRX_COMMON_USER_INFO_RESERVED_2A_LSB                                      26
171 #define PHYRX_COMMON_USER_INFO_RESERVED_2A_MSB                                      31
172 #define PHYRX_COMMON_USER_INFO_RESERVED_2A_MASK                                     0x00000000fc000000
173 
174 
175 
176 
177 #define PHYRX_COMMON_USER_INFO_EHT_DUPLICATE_OFFSET                                 0x0000000000000008
178 #define PHYRX_COMMON_USER_INFO_EHT_DUPLICATE_LSB                                    32
179 #define PHYRX_COMMON_USER_INFO_EHT_DUPLICATE_MSB                                    33
180 #define PHYRX_COMMON_USER_INFO_EHT_DUPLICATE_MASK                                   0x0000000300000000
181 
182 
183 
184 
185 #define PHYRX_COMMON_USER_INFO_EHT_SIG_CMN_FIELD_TYPE_OFFSET                        0x0000000000000008
186 #define PHYRX_COMMON_USER_INFO_EHT_SIG_CMN_FIELD_TYPE_LSB                           34
187 #define PHYRX_COMMON_USER_INFO_EHT_SIG_CMN_FIELD_TYPE_MSB                           35
188 #define PHYRX_COMMON_USER_INFO_EHT_SIG_CMN_FIELD_TYPE_MASK                          0x0000000c00000000
189 
190 
191 
192 
193 #define PHYRX_COMMON_USER_INFO_DOPPLER_INDICATION_OFFSET                            0x0000000000000008
194 #define PHYRX_COMMON_USER_INFO_DOPPLER_INDICATION_LSB                               36
195 #define PHYRX_COMMON_USER_INFO_DOPPLER_INDICATION_MSB                               36
196 #define PHYRX_COMMON_USER_INFO_DOPPLER_INDICATION_MASK                              0x0000001000000000
197 
198 
199 
200 
201 #define PHYRX_COMMON_USER_INFO_STA_ID_OFFSET                                        0x0000000000000008
202 #define PHYRX_COMMON_USER_INFO_STA_ID_LSB                                           37
203 #define PHYRX_COMMON_USER_INFO_STA_ID_MSB                                           47
204 #define PHYRX_COMMON_USER_INFO_STA_ID_MASK                                          0x0000ffe000000000
205 
206 
207 
208 
209 #define PHYRX_COMMON_USER_INFO_PUNCTURE_BITMAP_OFFSET                               0x0000000000000008
210 #define PHYRX_COMMON_USER_INFO_PUNCTURE_BITMAP_LSB                                  48
211 #define PHYRX_COMMON_USER_INFO_PUNCTURE_BITMAP_MSB                                  63
212 #define PHYRX_COMMON_USER_INFO_PUNCTURE_BITMAP_MASK                                 0xffff000000000000
213 
214 
215 
216 #endif
217