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 _TX_RATE_STATS_INFO_H_ 24 #define _TX_RATE_STATS_INFO_H_ 25 #if !defined(__ASSEMBLER__) 26 #endif 27 28 29 // ################ START SUMMARY ################# 30 // 31 // Dword Fields 32 // 0 tx_rate_stats_info_valid[0], transmit_bw[2:1], transmit_pkt_type[6:3], transmit_stbc[7], transmit_ldpc[8], transmit_sgi[10:9], transmit_mcs[14:11], ofdma_transmission[15], tones_in_ru[27:16], reserved_0a[31:28] 33 // 1 ppdu_transmission_tsf[31:0] 34 // 35 // ################ END SUMMARY ################# 36 37 #define NUM_OF_DWORDS_TX_RATE_STATS_INFO 2 38 39 struct tx_rate_stats_info { 40 uint32_t tx_rate_stats_info_valid : 1, //[0] 41 transmit_bw : 2, //[2:1] 42 transmit_pkt_type : 4, //[6:3] 43 transmit_stbc : 1, //[7] 44 transmit_ldpc : 1, //[8] 45 transmit_sgi : 2, //[10:9] 46 transmit_mcs : 4, //[14:11] 47 ofdma_transmission : 1, //[15] 48 tones_in_ru : 12, //[27:16] 49 reserved_0a : 4; //[31:28] 50 uint32_t ppdu_transmission_tsf : 32; //[31:0] 51 }; 52 53 /* 54 55 tx_rate_stats_info_valid 56 57 When set all other fields in this STRUCT contain valid 58 info. 59 60 61 62 63 <legal all> 64 65 transmit_bw 66 67 Field only valid when Tx_rate_stats_info_valid is set 68 69 70 71 Indicates the BW of the upcoming transmission that shall 72 likely start in about 3 -4 us on the medium 73 74 75 76 <enum 0 transmit_bw_20_MHz> 77 78 <enum 1 transmit_bw_40_MHz> 79 80 <enum 2 transmit_bw_80_MHz> 81 82 <enum 3 transmit_bw_160_MHz> 83 84 85 86 <legal all> 87 88 transmit_pkt_type 89 90 Field only valid when Tx_rate_stats_info_valid is set 91 92 93 94 Field filled in by PDG. 95 96 Not valid when in SW transmit mode 97 98 99 100 The packet type 101 102 <enum 0 dot11a>802.11a PPDU type 103 104 <enum 1 dot11b>802.11b PPDU type 105 106 <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type 107 108 <enum 3 dot11ac>802.11ac PPDU type 109 110 <enum 4 dot11ax>802.11ax PPDU type 111 112 transmit_stbc 113 114 Field only valid when Tx_rate_stats_info_valid is set 115 116 117 118 Field filled in by PDG. 119 120 Not valid when in SW transmit mode 121 122 123 124 When set, STBC transmission rate was used. 125 126 transmit_ldpc 127 128 Field only valid when Tx_rate_stats_info_valid is set 129 130 131 132 Field filled in by PDG. 133 134 Not valid when in SW transmit mode 135 136 137 138 When set, use LDPC transmission rates 139 140 transmit_sgi 141 142 Field only valid when Tx_rate_stats_info_valid is set 143 144 145 146 Field filled in by PDG. 147 148 Not valid when in SW transmit mode 149 150 151 152 <enum 0 0_8_us_sgi > Legacy normal GI. Can also be 153 used for HE 154 155 <enum 1 0_4_us_sgi > Legacy short GI. Can also be 156 used for HE 157 158 <enum 2 1_6_us_sgi > HE related GI 159 160 <enum 3 3_2_us_sgi > HE related GI 161 162 <legal 0 - 3> 163 164 transmit_mcs 165 166 Field only valid when Tx_rate_stats_info_valid is set 167 168 169 170 Field filled in by PDG. 171 172 Not valid when in SW transmit mode 173 174 175 176 For details, refer to MCS_TYPE description 177 178 <legal all> 179 180 ofdma_transmission 181 182 Field only valid when Tx_rate_stats_info_valid is set 183 184 185 186 Field filled in by PDG. 187 188 189 190 Set when the transmission was an OFDMA transmission (DL 191 or UL). 192 193 <legal all> 194 195 tones_in_ru 196 197 Field only valid when Tx_rate_stats_info_valid is set 198 199 200 201 Field filled in by PDG. 202 203 Not valid when in SW transmit mode 204 205 206 207 The number of tones in the RU used. 208 209 <legal all> 210 211 reserved_0a 212 213 <legal 0> 214 215 ppdu_transmission_tsf 216 217 Field only valid when Tx_rate_stats_info_valid is set 218 219 220 221 Based on a HWSCH configuration register setting, this 222 field either contains: 223 224 225 226 Lower 32 bits of the TSF, snapshot of this value when 227 transmission of the PPDU containing the frame finished. 228 229 OR 230 231 Lower 32 bits of the TSF, snapshot of this value when 232 transmission of the PPDU containing the frame started 233 234 235 236 <legal all> 237 */ 238 239 240 /* Description TX_RATE_STATS_INFO_0_TX_RATE_STATS_INFO_VALID 241 242 When set all other fields in this STRUCT contain valid 243 info. 244 245 246 247 248 <legal all> 249 */ 250 #define TX_RATE_STATS_INFO_0_TX_RATE_STATS_INFO_VALID_OFFSET 0x00000000 251 #define TX_RATE_STATS_INFO_0_TX_RATE_STATS_INFO_VALID_LSB 0 252 #define TX_RATE_STATS_INFO_0_TX_RATE_STATS_INFO_VALID_MASK 0x00000001 253 254 /* Description TX_RATE_STATS_INFO_0_TRANSMIT_BW 255 256 Field only valid when Tx_rate_stats_info_valid is set 257 258 259 260 Indicates the BW of the upcoming transmission that shall 261 likely start in about 3 -4 us on the medium 262 263 264 265 <enum 0 transmit_bw_20_MHz> 266 267 <enum 1 transmit_bw_40_MHz> 268 269 <enum 2 transmit_bw_80_MHz> 270 271 <enum 3 transmit_bw_160_MHz> 272 273 274 275 <legal all> 276 */ 277 #define TX_RATE_STATS_INFO_0_TRANSMIT_BW_OFFSET 0x00000000 278 #define TX_RATE_STATS_INFO_0_TRANSMIT_BW_LSB 1 279 #define TX_RATE_STATS_INFO_0_TRANSMIT_BW_MASK 0x00000006 280 281 /* Description TX_RATE_STATS_INFO_0_TRANSMIT_PKT_TYPE 282 283 Field only valid when Tx_rate_stats_info_valid is set 284 285 286 287 Field filled in by PDG. 288 289 Not valid when in SW transmit mode 290 291 292 293 The packet type 294 295 <enum 0 dot11a>802.11a PPDU type 296 297 <enum 1 dot11b>802.11b PPDU type 298 299 <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type 300 301 <enum 3 dot11ac>802.11ac PPDU type 302 303 <enum 4 dot11ax>802.11ax PPDU type 304 */ 305 #define TX_RATE_STATS_INFO_0_TRANSMIT_PKT_TYPE_OFFSET 0x00000000 306 #define TX_RATE_STATS_INFO_0_TRANSMIT_PKT_TYPE_LSB 3 307 #define TX_RATE_STATS_INFO_0_TRANSMIT_PKT_TYPE_MASK 0x00000078 308 309 /* Description TX_RATE_STATS_INFO_0_TRANSMIT_STBC 310 311 Field only valid when Tx_rate_stats_info_valid is set 312 313 314 315 Field filled in by PDG. 316 317 Not valid when in SW transmit mode 318 319 320 321 When set, STBC transmission rate was used. 322 */ 323 #define TX_RATE_STATS_INFO_0_TRANSMIT_STBC_OFFSET 0x00000000 324 #define TX_RATE_STATS_INFO_0_TRANSMIT_STBC_LSB 7 325 #define TX_RATE_STATS_INFO_0_TRANSMIT_STBC_MASK 0x00000080 326 327 /* Description TX_RATE_STATS_INFO_0_TRANSMIT_LDPC 328 329 Field only valid when Tx_rate_stats_info_valid is set 330 331 332 333 Field filled in by PDG. 334 335 Not valid when in SW transmit mode 336 337 338 339 When set, use LDPC transmission rates 340 */ 341 #define TX_RATE_STATS_INFO_0_TRANSMIT_LDPC_OFFSET 0x00000000 342 #define TX_RATE_STATS_INFO_0_TRANSMIT_LDPC_LSB 8 343 #define TX_RATE_STATS_INFO_0_TRANSMIT_LDPC_MASK 0x00000100 344 345 /* Description TX_RATE_STATS_INFO_0_TRANSMIT_SGI 346 347 Field only valid when Tx_rate_stats_info_valid is set 348 349 350 351 Field filled in by PDG. 352 353 Not valid when in SW transmit mode 354 355 356 357 <enum 0 0_8_us_sgi > Legacy normal GI. Can also be 358 used for HE 359 360 <enum 1 0_4_us_sgi > Legacy short GI. Can also be 361 used for HE 362 363 <enum 2 1_6_us_sgi > HE related GI 364 365 <enum 3 3_2_us_sgi > HE related GI 366 367 <legal 0 - 3> 368 */ 369 #define TX_RATE_STATS_INFO_0_TRANSMIT_SGI_OFFSET 0x00000000 370 #define TX_RATE_STATS_INFO_0_TRANSMIT_SGI_LSB 9 371 #define TX_RATE_STATS_INFO_0_TRANSMIT_SGI_MASK 0x00000600 372 373 /* Description TX_RATE_STATS_INFO_0_TRANSMIT_MCS 374 375 Field only valid when Tx_rate_stats_info_valid is set 376 377 378 379 Field filled in by PDG. 380 381 Not valid when in SW transmit mode 382 383 384 385 For details, refer to MCS_TYPE description 386 387 <legal all> 388 */ 389 #define TX_RATE_STATS_INFO_0_TRANSMIT_MCS_OFFSET 0x00000000 390 #define TX_RATE_STATS_INFO_0_TRANSMIT_MCS_LSB 11 391 #define TX_RATE_STATS_INFO_0_TRANSMIT_MCS_MASK 0x00007800 392 393 /* Description TX_RATE_STATS_INFO_0_OFDMA_TRANSMISSION 394 395 Field only valid when Tx_rate_stats_info_valid is set 396 397 398 399 Field filled in by PDG. 400 401 402 403 Set when the transmission was an OFDMA transmission (DL 404 or UL). 405 406 <legal all> 407 */ 408 #define TX_RATE_STATS_INFO_0_OFDMA_TRANSMISSION_OFFSET 0x00000000 409 #define TX_RATE_STATS_INFO_0_OFDMA_TRANSMISSION_LSB 15 410 #define TX_RATE_STATS_INFO_0_OFDMA_TRANSMISSION_MASK 0x00008000 411 412 /* Description TX_RATE_STATS_INFO_0_TONES_IN_RU 413 414 Field only valid when Tx_rate_stats_info_valid is set 415 416 417 418 Field filled in by PDG. 419 420 Not valid when in SW transmit mode 421 422 423 424 The number of tones in the RU used. 425 426 <legal all> 427 */ 428 #define TX_RATE_STATS_INFO_0_TONES_IN_RU_OFFSET 0x00000000 429 #define TX_RATE_STATS_INFO_0_TONES_IN_RU_LSB 16 430 #define TX_RATE_STATS_INFO_0_TONES_IN_RU_MASK 0x0fff0000 431 432 /* Description TX_RATE_STATS_INFO_0_RESERVED_0A 433 434 <legal 0> 435 */ 436 #define TX_RATE_STATS_INFO_0_RESERVED_0A_OFFSET 0x00000000 437 #define TX_RATE_STATS_INFO_0_RESERVED_0A_LSB 28 438 #define TX_RATE_STATS_INFO_0_RESERVED_0A_MASK 0xf0000000 439 440 /* Description TX_RATE_STATS_INFO_1_PPDU_TRANSMISSION_TSF 441 442 Field only valid when Tx_rate_stats_info_valid is set 443 444 445 446 Based on a HWSCH configuration register setting, this 447 field either contains: 448 449 450 451 Lower 32 bits of the TSF, snapshot of this value when 452 transmission of the PPDU containing the frame finished. 453 454 OR 455 456 Lower 32 bits of the TSF, snapshot of this value when 457 transmission of the PPDU containing the frame started 458 459 460 461 <legal all> 462 */ 463 #define TX_RATE_STATS_INFO_1_PPDU_TRANSMISSION_TSF_OFFSET 0x00000004 464 #define TX_RATE_STATS_INFO_1_PPDU_TRANSMISSION_TSF_LSB 0 465 #define TX_RATE_STATS_INFO_1_PPDU_TRANSMISSION_TSF_MASK 0xffffffff 466 467 468 #endif // _TX_RATE_STATS_INFO_H_ 469