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 // $ATH_LICENSE_HW_HDR_C$ 18 // 19 // DO NOT EDIT! This file is automatically generated 20 // These definitions are tied to a particular hardware layout 21 22 23 #ifndef _HT_SIG_INFO_H_ 24 #define _HT_SIG_INFO_H_ 25 #if !defined(__ASSEMBLER__) 26 #endif 27 28 29 // ################ START SUMMARY ################# 30 // 31 // Dword Fields 32 // 0 mcs[6:0], cbw[7], length[23:8], reserved_0[31:24] 33 // 1 smoothing[0], not_sounding[1], ht_reserved[2], aggregation[3], stbc[5:4], fec_coding[6], short_gi[7], num_ext_sp_str[9:8], crc[17:10], signal_tail[23:18], reserved_1[31:24] 34 // 35 // ################ END SUMMARY ################# 36 37 #define NUM_OF_DWORDS_HT_SIG_INFO 2 38 39 struct ht_sig_info { 40 uint32_t mcs : 7, //[6:0] 41 cbw : 1, //[7] 42 length : 16, //[23:8] 43 reserved_0 : 8; //[31:24] 44 uint32_t smoothing : 1, //[0] 45 not_sounding : 1, //[1] 46 ht_reserved : 1, //[2] 47 aggregation : 1, //[3] 48 stbc : 2, //[5:4] 49 fec_coding : 1, //[6] 50 short_gi : 1, //[7] 51 num_ext_sp_str : 2, //[9:8] 52 crc : 8, //[17:10] 53 signal_tail : 6, //[23:18] 54 reserved_1 : 8; //[31:24] 55 }; 56 57 /* 58 59 mcs 60 61 Modulation Coding Scheme: 62 63 0-7 are used for single stream 64 65 8-15 are used for 2 streams 66 67 16-23 are used for 3 streams 68 69 24-31 are used for 4 streams 70 71 32 is used for duplicate HT20 (unsupported) 72 73 33-76 is used for unequal modulation (unsupported) 74 75 77-127 is reserved. 76 77 <legal 0-31> 78 79 cbw 80 81 Packet bandwidth: 82 83 <enum 0 ht_20_mhz> 84 85 <enum 1 ht_40_mhz> 86 87 <legal 0-1> 88 89 length 90 91 This is the MPDU or A-MPDU length in octets of the PPDU 92 93 <legal all> 94 95 reserved_0 96 97 This field is not part of HT-SIG 98 99 Reserved: Should be set to 0 by the MAC and ignored by 100 the PHY <legal 0> 101 102 smoothing 103 104 Field indicates if smoothing is needed 105 106 E_num 0 do_smoothing Unsupported setting: indicates 107 smoothing is often used for beamforming 108 109 110 <legal 1> 111 112 not_sounding 113 114 E_num 0 sounding Unsupported setting: indicates 115 sounding is used 116 117 <enum 1 no_sounding> Indicates no sounding is used 118 119 <legal 1> 120 121 ht_reserved 122 123 Reserved: Should be set to 1 by the MAC and ignored by 124 the PHY 125 126 <legal 1> 127 128 aggregation 129 130 <enum 0 mpdu> Indicates MPDU format 131 132 <enum 1 a_mpdu> Indicates A-MPDU format 133 134 <legal 0-1> 135 136 stbc 137 138 <enum 0 no_stbc> Indicates no STBC 139 140 <enum 1 1_str_stbc> Indicates 1 stream STBC 141 142 E_num 2 2_str_stbc Indicates 2 stream STBC 143 (Unsupported) 144 145 <legal 0-1> 146 147 fec_coding 148 149 <enum 0 ht_bcc> Indicates BCC coding 150 151 <enum 1 ht_ldpc> Indicates LDPC coding 152 153 <legal 0-1> 154 155 short_gi 156 157 <enum 0 ht_normal_gi> Indicates normal guard 158 interval 159 160 161 <legal 0-1> 162 163 num_ext_sp_str 164 165 Number of extension spatial streams: (Used for TxBF) 166 167 <enum 0 0_ext_sp_str> No extension spatial streams 168 169 E_num 1 1_ext_sp_str Not supported: 1 extension 170 spatial streams 171 172 E_num 2 2_ext_sp_str Not supported: 2 extension 173 spatial streams 174 175 <legal 0> 176 177 crc 178 179 The CRC protects the HT-SIG (HT-SIG[0][23:0] and 180 HT-SIG[1][9:0]. The generator polynomial is G(D) = D8 + D2 + 181 D + 1. <legal all> 182 183 signal_tail 184 185 The 6 bits of tail is always set to 0 is used to flush 186 the BCC encoder and decoder. <legal 0> 187 188 reserved_1 189 190 This field is not part of HT-SIG: 191 192 Reserved: Should be set to 0 by the MAC and ignored by 193 the PHY. <legal 0> 194 */ 195 196 197 /* Description HT_SIG_INFO_0_MCS 198 199 Modulation Coding Scheme: 200 201 0-7 are used for single stream 202 203 8-15 are used for 2 streams 204 205 16-23 are used for 3 streams 206 207 24-31 are used for 4 streams 208 209 32 is used for duplicate HT20 (unsupported) 210 211 33-76 is used for unequal modulation (unsupported) 212 213 77-127 is reserved. 214 215 <legal 0-31> 216 */ 217 #define HT_SIG_INFO_0_MCS_OFFSET 0x00000000 218 #define HT_SIG_INFO_0_MCS_LSB 0 219 #define HT_SIG_INFO_0_MCS_MASK 0x0000007f 220 221 /* Description HT_SIG_INFO_0_CBW 222 223 Packet bandwidth: 224 225 <enum 0 ht_20_mhz> 226 227 <enum 1 ht_40_mhz> 228 229 <legal 0-1> 230 */ 231 #define HT_SIG_INFO_0_CBW_OFFSET 0x00000000 232 #define HT_SIG_INFO_0_CBW_LSB 7 233 #define HT_SIG_INFO_0_CBW_MASK 0x00000080 234 235 /* Description HT_SIG_INFO_0_LENGTH 236 237 This is the MPDU or A-MPDU length in octets of the PPDU 238 239 <legal all> 240 */ 241 #define HT_SIG_INFO_0_LENGTH_OFFSET 0x00000000 242 #define HT_SIG_INFO_0_LENGTH_LSB 8 243 #define HT_SIG_INFO_0_LENGTH_MASK 0x00ffff00 244 245 /* Description HT_SIG_INFO_0_RESERVED_0 246 247 This field is not part of HT-SIG 248 249 Reserved: Should be set to 0 by the MAC and ignored by 250 the PHY <legal 0> 251 */ 252 #define HT_SIG_INFO_0_RESERVED_0_OFFSET 0x00000000 253 #define HT_SIG_INFO_0_RESERVED_0_LSB 24 254 #define HT_SIG_INFO_0_RESERVED_0_MASK 0xff000000 255 256 /* Description HT_SIG_INFO_1_SMOOTHING 257 258 Field indicates if smoothing is needed 259 260 E_num 0 do_smoothing Unsupported setting: indicates 261 smoothing is often used for beamforming 262 263 264 <legal 1> 265 */ 266 #define HT_SIG_INFO_1_SMOOTHING_OFFSET 0x00000004 267 #define HT_SIG_INFO_1_SMOOTHING_LSB 0 268 #define HT_SIG_INFO_1_SMOOTHING_MASK 0x00000001 269 270 /* Description HT_SIG_INFO_1_NOT_SOUNDING 271 272 E_num 0 sounding Unsupported setting: indicates 273 sounding is used 274 275 <enum 1 no_sounding> Indicates no sounding is used 276 277 <legal 1> 278 */ 279 #define HT_SIG_INFO_1_NOT_SOUNDING_OFFSET 0x00000004 280 #define HT_SIG_INFO_1_NOT_SOUNDING_LSB 1 281 #define HT_SIG_INFO_1_NOT_SOUNDING_MASK 0x00000002 282 283 /* Description HT_SIG_INFO_1_HT_RESERVED 284 285 Reserved: Should be set to 1 by the MAC and ignored by 286 the PHY 287 288 <legal 1> 289 */ 290 #define HT_SIG_INFO_1_HT_RESERVED_OFFSET 0x00000004 291 #define HT_SIG_INFO_1_HT_RESERVED_LSB 2 292 #define HT_SIG_INFO_1_HT_RESERVED_MASK 0x00000004 293 294 /* Description HT_SIG_INFO_1_AGGREGATION 295 296 <enum 0 mpdu> Indicates MPDU format 297 298 <enum 1 a_mpdu> Indicates A-MPDU format 299 300 <legal 0-1> 301 */ 302 #define HT_SIG_INFO_1_AGGREGATION_OFFSET 0x00000004 303 #define HT_SIG_INFO_1_AGGREGATION_LSB 3 304 #define HT_SIG_INFO_1_AGGREGATION_MASK 0x00000008 305 306 /* Description HT_SIG_INFO_1_STBC 307 308 <enum 0 no_stbc> Indicates no STBC 309 310 <enum 1 1_str_stbc> Indicates 1 stream STBC 311 312 E_num 2 2_str_stbc Indicates 2 stream STBC 313 (Unsupported) 314 315 <legal 0-1> 316 */ 317 #define HT_SIG_INFO_1_STBC_OFFSET 0x00000004 318 #define HT_SIG_INFO_1_STBC_LSB 4 319 #define HT_SIG_INFO_1_STBC_MASK 0x00000030 320 321 /* Description HT_SIG_INFO_1_FEC_CODING 322 323 <enum 0 ht_bcc> Indicates BCC coding 324 325 <enum 1 ht_ldpc> Indicates LDPC coding 326 327 <legal 0-1> 328 */ 329 #define HT_SIG_INFO_1_FEC_CODING_OFFSET 0x00000004 330 #define HT_SIG_INFO_1_FEC_CODING_LSB 6 331 #define HT_SIG_INFO_1_FEC_CODING_MASK 0x00000040 332 333 /* Description HT_SIG_INFO_1_SHORT_GI 334 335 <enum 0 ht_normal_gi> Indicates normal guard 336 interval 337 338 339 <legal 0-1> 340 */ 341 #define HT_SIG_INFO_1_SHORT_GI_OFFSET 0x00000004 342 #define HT_SIG_INFO_1_SHORT_GI_LSB 7 343 #define HT_SIG_INFO_1_SHORT_GI_MASK 0x00000080 344 345 /* Description HT_SIG_INFO_1_NUM_EXT_SP_STR 346 347 Number of extension spatial streams: (Used for TxBF) 348 349 <enum 0 0_ext_sp_str> No extension spatial streams 350 351 E_num 1 1_ext_sp_str Not supported: 1 extension 352 spatial streams 353 354 E_num 2 2_ext_sp_str Not supported: 2 extension 355 spatial streams 356 357 <legal 0> 358 */ 359 #define HT_SIG_INFO_1_NUM_EXT_SP_STR_OFFSET 0x00000004 360 #define HT_SIG_INFO_1_NUM_EXT_SP_STR_LSB 8 361 #define HT_SIG_INFO_1_NUM_EXT_SP_STR_MASK 0x00000300 362 363 /* Description HT_SIG_INFO_1_CRC 364 365 The CRC protects the HT-SIG (HT-SIG[0][23:0] and 366 HT-SIG[1][9:0]. The generator polynomial is G(D) = D8 + D2 + 367 D + 1. <legal all> 368 */ 369 #define HT_SIG_INFO_1_CRC_OFFSET 0x00000004 370 #define HT_SIG_INFO_1_CRC_LSB 10 371 #define HT_SIG_INFO_1_CRC_MASK 0x0003fc00 372 373 /* Description HT_SIG_INFO_1_SIGNAL_TAIL 374 375 The 6 bits of tail is always set to 0 is used to flush 376 the BCC encoder and decoder. <legal 0> 377 */ 378 #define HT_SIG_INFO_1_SIGNAL_TAIL_OFFSET 0x00000004 379 #define HT_SIG_INFO_1_SIGNAL_TAIL_LSB 18 380 #define HT_SIG_INFO_1_SIGNAL_TAIL_MASK 0x00fc0000 381 382 /* Description HT_SIG_INFO_1_RESERVED_1 383 384 This field is not part of HT-SIG: 385 386 Reserved: Should be set to 0 by the MAC and ignored by 387 the PHY. <legal 0> 388 */ 389 #define HT_SIG_INFO_1_RESERVED_1_OFFSET 0x00000004 390 #define HT_SIG_INFO_1_RESERVED_1_LSB 24 391 #define HT_SIG_INFO_1_RESERVED_1_MASK 0xff000000 392 393 394 #endif // _HT_SIG_INFO_H_ 395