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