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