1 /* 2 * Copyright (c) 2020, The Linux Foundation. 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 #ifndef _RX_PPDU_START_USER_INFO_H_ 18 #define _RX_PPDU_START_USER_INFO_H_ 19 #if !defined(__ASSEMBLER__) 20 #endif 21 22 #include "receive_user_info.h" 23 24 // ################ START SUMMARY ################# 25 // 26 // Dword Fields 27 // 0-2 struct receive_user_info receive_user_info_details; 28 // 29 // ################ END SUMMARY ################# 30 31 #define NUM_OF_DWORDS_RX_PPDU_START_USER_INFO 3 32 33 struct rx_ppdu_start_user_info { 34 struct receive_user_info receive_user_info_details; 35 }; 36 37 /* 38 39 struct receive_user_info receive_user_info_details 40 41 Overview of receive parameters that the MAC needs to 42 prepend to every received MSDU/MPDU. 43 */ 44 45 46 /* EXTERNAL REFERENCE : struct receive_user_info receive_user_info_details */ 47 48 49 /* Description RX_PPDU_START_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_PHY_PPDU_ID 50 51 A ppdu counter value that PHY increments for every PPDU 52 received. The counter value wraps around 53 54 <legal all> 55 */ 56 #define RX_PPDU_START_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_PHY_PPDU_ID_OFFSET 0x00000000 57 #define RX_PPDU_START_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_PHY_PPDU_ID_LSB 0 58 #define RX_PPDU_START_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_PHY_PPDU_ID_MASK 0x0000ffff 59 60 /* Description RX_PPDU_START_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_USER_RSSI 61 62 RSSI for this user 63 64 Frequency domain RSSI measurement for this user. Based 65 on the channel estimate. 66 67 68 69 <legal all> 70 */ 71 #define RX_PPDU_START_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_USER_RSSI_OFFSET 0x00000000 72 #define RX_PPDU_START_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_USER_RSSI_LSB 16 73 #define RX_PPDU_START_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_USER_RSSI_MASK 0x00ff0000 74 75 /* Description RX_PPDU_START_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_PKT_TYPE 76 77 Packet type: 78 79 80 81 <enum 0 dot11a>802.11a PPDU type 82 83 <enum 1 dot11b>802.11b PPDU type 84 85 <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type 86 87 <enum 3 dot11ac>802.11ac PPDU type 88 89 <enum 4 dot11ax>802.11ax PPDU type 90 91 <enum 5 dot11ba>802.11ba (WUR) PPDU type 92 */ 93 #define RX_PPDU_START_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_PKT_TYPE_OFFSET 0x00000000 94 #define RX_PPDU_START_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_PKT_TYPE_LSB 24 95 #define RX_PPDU_START_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_PKT_TYPE_MASK 0x0f000000 96 97 /* Description RX_PPDU_START_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_STBC 98 99 When set, use STBC transmission rates 100 */ 101 #define RX_PPDU_START_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_STBC_OFFSET 0x00000000 102 #define RX_PPDU_START_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_STBC_LSB 28 103 #define RX_PPDU_START_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_STBC_MASK 0x10000000 104 105 /* Description RX_PPDU_START_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_RECEPTION_TYPE 106 107 Indicates what type of reception this is. 108 109 <enum 0 reception_type_SU > Basic SU reception (not 110 part of OFDMA or MU-MIMO) 111 112 <enum 1 reception_type_MU_MIMO > This is related to 113 DL type of reception 114 115 <enum 2 reception_type_MU_OFDMA > This is related 116 to DL type of reception 117 118 <enum 3 reception_type_MU_OFDMA_MIMO > This is 119 related to DL type of reception 120 121 <enum 4 reception_type_UL_MU_MIMO > This is related 122 to UL type of reception 123 124 <enum 5 reception_type_UL_MU_OFDMA > This is 125 related to UL type of reception 126 127 <enum 6 reception_type_UL_MU_OFDMA_MIMO > This is 128 related to UL type of reception 129 130 131 132 <legal 0-6> 133 */ 134 #define RX_PPDU_START_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_RECEPTION_TYPE_OFFSET 0x00000000 135 #define RX_PPDU_START_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_RECEPTION_TYPE_LSB 29 136 #define RX_PPDU_START_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_RECEPTION_TYPE_MASK 0xe0000000 137 138 /* Description RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_RATE_MCS 139 140 For details, refer to MCS_TYPE description 141 142 <legal all> 143 */ 144 #define RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_RATE_MCS_OFFSET 0x00000004 145 #define RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_RATE_MCS_LSB 0 146 #define RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_RATE_MCS_MASK 0x0000000f 147 148 /* Description RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_SGI 149 150 Field only valid when pkt type is HT, VHT or HE. 151 152 153 154 <enum 0 gi_0_8_us > Legacy normal GI. Can also be 155 used for HE 156 157 <enum 1 gi_0_4_us > Legacy short GI. Can also be 158 used for HE 159 160 <enum 2 gi_1_6_us > HE related GI 161 162 <enum 3 gi_3_2_us > HE related GI 163 164 <legal 0 - 3> 165 */ 166 #define RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_SGI_OFFSET 0x00000004 167 #define RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_SGI_LSB 4 168 #define RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_SGI_MASK 0x00000030 169 170 /* Description RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_RECEIVE_BANDWIDTH 171 172 Full receive Bandwidth 173 174 175 176 <enum 0 full_rx_bw_20_mhz> 177 178 <enum 1 full_rx_bw_40_mhz> 179 180 <enum 2 full_rx_bw_80_mhz> 181 182 <enum 3 full_rx_bw_160_mhz> 183 184 185 186 <legal 0-3> 187 */ 188 #define RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_RECEIVE_BANDWIDTH_OFFSET 0x00000004 189 #define RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_RECEIVE_BANDWIDTH_LSB 6 190 #define RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_RECEIVE_BANDWIDTH_MASK 0x000000c0 191 192 /* Description RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_MIMO_SS_BITMAP 193 194 Bitmap, with each bit indicating if the related spatial 195 stream is used for this STA 196 197 LSB related to SS 0 198 199 200 201 0: spatial stream not used for this reception 202 203 1: spatial stream used for this reception 204 205 206 207 <legal all> 208 */ 209 #define RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_MIMO_SS_BITMAP_OFFSET 0x00000004 210 #define RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_MIMO_SS_BITMAP_LSB 8 211 #define RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_MIMO_SS_BITMAP_MASK 0x0000ff00 212 213 /* Description RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_RU_ALLOCATION 214 215 Field only valid in case of OFDMA type receptions (DL 216 and UL) 217 218 219 220 Indicates the RU number associated with this user. 221 222 223 224 In case of reception where the transmission was DL MU 225 OFDMA, this field provides the RU pattern. Note that fields 226 ofdma_user_index and ofdma_content_channel are needed to 227 determine which RU (within a 40 MHz channel) was actually 228 assigned to this user, but this does not give info on which 229 40 MHz channel was assigned to this user. Please refer 230 DL_ofdma_ru_* in PHYRX_PKT_END_INFO for complete RU info for 231 this user. 232 233 234 235 In case of reception where the transmission was UL MU 236 OFDMA, PHY is recommended to insert the RU start index in 237 this field. Note that PHY may insert the RU width in 238 Reserved_2a[6:0]. 239 240 <legal all> 241 */ 242 #define RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_RU_ALLOCATION_OFFSET 0x00000004 243 #define RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_RU_ALLOCATION_LSB 16 244 #define RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_RU_ALLOCATION_MASK 0x00ff0000 245 246 /* Description RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_USER_INDEX 247 248 Field only valid in the of DL MU OFDMA reception 249 250 251 252 The user number within the RU_allocation. 253 254 255 256 This is needed for SW to determine the exact RU position 257 within the reception. 258 259 <legal all> 260 */ 261 #define RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_USER_INDEX_OFFSET 0x00000004 262 #define RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_USER_INDEX_LSB 24 263 #define RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_USER_INDEX_MASK 0x7f000000 264 265 /* Description RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_CONTENT_CHANNEL 266 267 Field only valid in the of DL MU OFDMA/MIMO reception 268 269 270 271 In case of DL MU reception, this field indicates the 272 content channel number where PHY found the RU information 273 for this user 274 275 276 277 This is needed for SW to determine the exact RU position 278 within the reception. 279 280 281 282 <enum 0 content_channel_1> 283 284 <enum 1 content_channel_2> 285 286 287 288 <legal all> 289 */ 290 #define RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_CONTENT_CHANNEL_OFFSET 0x00000004 291 #define RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_CONTENT_CHANNEL_LSB 31 292 #define RX_PPDU_START_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_CONTENT_CHANNEL_MASK 0x80000000 293 294 /* Description RX_PPDU_START_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_LDPC 295 296 When set, use LDPC transmission rates were used. 297 298 <legal all> 299 */ 300 #define RX_PPDU_START_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_LDPC_OFFSET 0x00000008 301 #define RX_PPDU_START_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_LDPC_LSB 0 302 #define RX_PPDU_START_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_LDPC_MASK 0x00000001 303 304 /* Description RX_PPDU_START_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_RU_WIDTH 305 306 In case of UL OFDMA reception, PHY is recommended to 307 insert the RU width 308 309 In Hastings80: was using Reserved_2a[6:0]. 310 311 <legal 1 - 74> 312 */ 313 #define RX_PPDU_START_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_RU_WIDTH_OFFSET 0x00000008 314 #define RX_PPDU_START_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_RU_WIDTH_LSB 1 315 #define RX_PPDU_START_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_RU_WIDTH_MASK 0x000000fe 316 317 /* Description RX_PPDU_START_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_RESERVED_2A 318 319 <legal 0> 320 */ 321 #define RX_PPDU_START_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_RESERVED_2A_OFFSET 0x00000008 322 #define RX_PPDU_START_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_RESERVED_2A_LSB 8 323 #define RX_PPDU_START_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_RESERVED_2A_MASK 0xffffff00 324 325 326 #endif // _RX_PPDU_START_USER_INFO_H_ 327