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