1*5113495bSYour Name /* 2*5113495bSYour Name * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. 3*5113495bSYour Name * 4*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for any 5*5113495bSYour Name * purpose with or without fee is hereby granted, provided that the above 6*5113495bSYour Name * copyright notice and this permission notice appear in all copies. 7*5113495bSYour Name * 8*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9*5113495bSYour Name * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10*5113495bSYour Name * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11*5113495bSYour Name * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12*5113495bSYour Name * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13*5113495bSYour Name * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14*5113495bSYour Name * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15*5113495bSYour Name */ 16*5113495bSYour Name 17*5113495bSYour Name 18*5113495bSYour Name #ifndef _TX_MPDU_START_H_ 19*5113495bSYour Name #define _TX_MPDU_START_H_ 20*5113495bSYour Name 21*5113495bSYour Name #define NUM_OF_DWORDS_TX_MPDU_START 9 22*5113495bSYour Name 23*5113495bSYour Name struct tx_mpdu_start { 24*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 25*5113495bSYour Name uint32_t mpdu_length : 14, 26*5113495bSYour Name frame_not_from_tqm : 1, 27*5113495bSYour Name vht_control_present : 1, 28*5113495bSYour Name mpdu_header_length : 8, 29*5113495bSYour Name retry_count : 7, 30*5113495bSYour Name wds : 1; 31*5113495bSYour Name uint32_t pn_31_0 : 32; 32*5113495bSYour Name uint32_t pn_47_32 : 16, 33*5113495bSYour Name mpdu_sequence_number : 12, 34*5113495bSYour Name raw_already_encrypted : 1, 35*5113495bSYour Name frame_type : 2, 36*5113495bSYour Name txdma_dropped_mpdu_warning : 1; 37*5113495bSYour Name uint32_t iv_byte_0 : 8, 38*5113495bSYour Name iv_byte_1 : 8, 39*5113495bSYour Name iv_byte_2 : 8, 40*5113495bSYour Name iv_byte_3 : 8; 41*5113495bSYour Name uint32_t iv_byte_4 : 8, 42*5113495bSYour Name iv_byte_5 : 8, 43*5113495bSYour Name iv_byte_6 : 8, 44*5113495bSYour Name iv_byte_7 : 8; 45*5113495bSYour Name uint32_t iv_byte_8 : 8, 46*5113495bSYour Name iv_byte_9 : 8, 47*5113495bSYour Name iv_byte_10 : 8, 48*5113495bSYour Name iv_byte_11 : 8; 49*5113495bSYour Name uint32_t iv_byte_12 : 8, 50*5113495bSYour Name iv_byte_13 : 8, 51*5113495bSYour Name iv_byte_14 : 8, 52*5113495bSYour Name iv_byte_15 : 8; 53*5113495bSYour Name uint32_t iv_byte_16 : 8, 54*5113495bSYour Name iv_byte_17 : 8, 55*5113495bSYour Name iv_len : 5, 56*5113495bSYour Name icv_len : 5, 57*5113495bSYour Name vht_control_offset : 6; 58*5113495bSYour Name uint32_t mpdu_type : 1, 59*5113495bSYour Name transmit_bw_restriction : 1, 60*5113495bSYour Name allowed_transmit_bw : 4, 61*5113495bSYour Name tx_notify_frame : 3, 62*5113495bSYour Name reserved_8a : 23; 63*5113495bSYour Name #else 64*5113495bSYour Name uint32_t wds : 1, 65*5113495bSYour Name retry_count : 7, 66*5113495bSYour Name mpdu_header_length : 8, 67*5113495bSYour Name vht_control_present : 1, 68*5113495bSYour Name frame_not_from_tqm : 1, 69*5113495bSYour Name mpdu_length : 14; 70*5113495bSYour Name uint32_t pn_31_0 : 32; 71*5113495bSYour Name uint32_t txdma_dropped_mpdu_warning : 1, 72*5113495bSYour Name frame_type : 2, 73*5113495bSYour Name raw_already_encrypted : 1, 74*5113495bSYour Name mpdu_sequence_number : 12, 75*5113495bSYour Name pn_47_32 : 16; 76*5113495bSYour Name uint32_t iv_byte_3 : 8, 77*5113495bSYour Name iv_byte_2 : 8, 78*5113495bSYour Name iv_byte_1 : 8, 79*5113495bSYour Name iv_byte_0 : 8; 80*5113495bSYour Name uint32_t iv_byte_7 : 8, 81*5113495bSYour Name iv_byte_6 : 8, 82*5113495bSYour Name iv_byte_5 : 8, 83*5113495bSYour Name iv_byte_4 : 8; 84*5113495bSYour Name uint32_t iv_byte_11 : 8, 85*5113495bSYour Name iv_byte_10 : 8, 86*5113495bSYour Name iv_byte_9 : 8, 87*5113495bSYour Name iv_byte_8 : 8; 88*5113495bSYour Name uint32_t iv_byte_15 : 8, 89*5113495bSYour Name iv_byte_14 : 8, 90*5113495bSYour Name iv_byte_13 : 8, 91*5113495bSYour Name iv_byte_12 : 8; 92*5113495bSYour Name uint32_t vht_control_offset : 6, 93*5113495bSYour Name icv_len : 5, 94*5113495bSYour Name iv_len : 5, 95*5113495bSYour Name iv_byte_17 : 8, 96*5113495bSYour Name iv_byte_16 : 8; 97*5113495bSYour Name uint32_t reserved_8a : 23, 98*5113495bSYour Name tx_notify_frame : 3, 99*5113495bSYour Name allowed_transmit_bw : 4, 100*5113495bSYour Name transmit_bw_restriction : 1, 101*5113495bSYour Name mpdu_type : 1; 102*5113495bSYour Name #endif 103*5113495bSYour Name }; 104*5113495bSYour Name 105*5113495bSYour Name #define TX_MPDU_START_MPDU_LENGTH_OFFSET 0x00000000 106*5113495bSYour Name #define TX_MPDU_START_MPDU_LENGTH_LSB 0 107*5113495bSYour Name #define TX_MPDU_START_MPDU_LENGTH_MSB 13 108*5113495bSYour Name #define TX_MPDU_START_MPDU_LENGTH_MASK 0x00003fff 109*5113495bSYour Name 110*5113495bSYour Name #define TX_MPDU_START_FRAME_NOT_FROM_TQM_OFFSET 0x00000000 111*5113495bSYour Name #define TX_MPDU_START_FRAME_NOT_FROM_TQM_LSB 14 112*5113495bSYour Name #define TX_MPDU_START_FRAME_NOT_FROM_TQM_MSB 14 113*5113495bSYour Name #define TX_MPDU_START_FRAME_NOT_FROM_TQM_MASK 0x00004000 114*5113495bSYour Name 115*5113495bSYour Name #define TX_MPDU_START_VHT_CONTROL_PRESENT_OFFSET 0x00000000 116*5113495bSYour Name #define TX_MPDU_START_VHT_CONTROL_PRESENT_LSB 15 117*5113495bSYour Name #define TX_MPDU_START_VHT_CONTROL_PRESENT_MSB 15 118*5113495bSYour Name #define TX_MPDU_START_VHT_CONTROL_PRESENT_MASK 0x00008000 119*5113495bSYour Name 120*5113495bSYour Name #define TX_MPDU_START_MPDU_HEADER_LENGTH_OFFSET 0x00000000 121*5113495bSYour Name #define TX_MPDU_START_MPDU_HEADER_LENGTH_LSB 16 122*5113495bSYour Name #define TX_MPDU_START_MPDU_HEADER_LENGTH_MSB 23 123*5113495bSYour Name #define TX_MPDU_START_MPDU_HEADER_LENGTH_MASK 0x00ff0000 124*5113495bSYour Name 125*5113495bSYour Name #define TX_MPDU_START_RETRY_COUNT_OFFSET 0x00000000 126*5113495bSYour Name #define TX_MPDU_START_RETRY_COUNT_LSB 24 127*5113495bSYour Name #define TX_MPDU_START_RETRY_COUNT_MSB 30 128*5113495bSYour Name #define TX_MPDU_START_RETRY_COUNT_MASK 0x7f000000 129*5113495bSYour Name 130*5113495bSYour Name #define TX_MPDU_START_WDS_OFFSET 0x00000000 131*5113495bSYour Name #define TX_MPDU_START_WDS_LSB 31 132*5113495bSYour Name #define TX_MPDU_START_WDS_MSB 31 133*5113495bSYour Name #define TX_MPDU_START_WDS_MASK 0x80000000 134*5113495bSYour Name 135*5113495bSYour Name #define TX_MPDU_START_PN_31_0_OFFSET 0x00000004 136*5113495bSYour Name #define TX_MPDU_START_PN_31_0_LSB 0 137*5113495bSYour Name #define TX_MPDU_START_PN_31_0_MSB 31 138*5113495bSYour Name #define TX_MPDU_START_PN_31_0_MASK 0xffffffff 139*5113495bSYour Name 140*5113495bSYour Name #define TX_MPDU_START_PN_47_32_OFFSET 0x00000008 141*5113495bSYour Name #define TX_MPDU_START_PN_47_32_LSB 0 142*5113495bSYour Name #define TX_MPDU_START_PN_47_32_MSB 15 143*5113495bSYour Name #define TX_MPDU_START_PN_47_32_MASK 0x0000ffff 144*5113495bSYour Name 145*5113495bSYour Name #define TX_MPDU_START_MPDU_SEQUENCE_NUMBER_OFFSET 0x00000008 146*5113495bSYour Name #define TX_MPDU_START_MPDU_SEQUENCE_NUMBER_LSB 16 147*5113495bSYour Name #define TX_MPDU_START_MPDU_SEQUENCE_NUMBER_MSB 27 148*5113495bSYour Name #define TX_MPDU_START_MPDU_SEQUENCE_NUMBER_MASK 0x0fff0000 149*5113495bSYour Name 150*5113495bSYour Name #define TX_MPDU_START_RAW_ALREADY_ENCRYPTED_OFFSET 0x00000008 151*5113495bSYour Name #define TX_MPDU_START_RAW_ALREADY_ENCRYPTED_LSB 28 152*5113495bSYour Name #define TX_MPDU_START_RAW_ALREADY_ENCRYPTED_MSB 28 153*5113495bSYour Name #define TX_MPDU_START_RAW_ALREADY_ENCRYPTED_MASK 0x10000000 154*5113495bSYour Name 155*5113495bSYour Name #define TX_MPDU_START_FRAME_TYPE_OFFSET 0x00000008 156*5113495bSYour Name #define TX_MPDU_START_FRAME_TYPE_LSB 29 157*5113495bSYour Name #define TX_MPDU_START_FRAME_TYPE_MSB 30 158*5113495bSYour Name #define TX_MPDU_START_FRAME_TYPE_MASK 0x60000000 159*5113495bSYour Name 160*5113495bSYour Name #define TX_MPDU_START_TXDMA_DROPPED_MPDU_WARNING_OFFSET 0x00000008 161*5113495bSYour Name #define TX_MPDU_START_TXDMA_DROPPED_MPDU_WARNING_LSB 31 162*5113495bSYour Name #define TX_MPDU_START_TXDMA_DROPPED_MPDU_WARNING_MSB 31 163*5113495bSYour Name #define TX_MPDU_START_TXDMA_DROPPED_MPDU_WARNING_MASK 0x80000000 164*5113495bSYour Name 165*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_0_OFFSET 0x0000000c 166*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_0_LSB 0 167*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_0_MSB 7 168*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_0_MASK 0x000000ff 169*5113495bSYour Name 170*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_1_OFFSET 0x0000000c 171*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_1_LSB 8 172*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_1_MSB 15 173*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_1_MASK 0x0000ff00 174*5113495bSYour Name 175*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_2_OFFSET 0x0000000c 176*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_2_LSB 16 177*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_2_MSB 23 178*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_2_MASK 0x00ff0000 179*5113495bSYour Name 180*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_3_OFFSET 0x0000000c 181*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_3_LSB 24 182*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_3_MSB 31 183*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_3_MASK 0xff000000 184*5113495bSYour Name 185*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_4_OFFSET 0x00000010 186*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_4_LSB 0 187*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_4_MSB 7 188*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_4_MASK 0x000000ff 189*5113495bSYour Name 190*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_5_OFFSET 0x00000010 191*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_5_LSB 8 192*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_5_MSB 15 193*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_5_MASK 0x0000ff00 194*5113495bSYour Name 195*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_6_OFFSET 0x00000010 196*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_6_LSB 16 197*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_6_MSB 23 198*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_6_MASK 0x00ff0000 199*5113495bSYour Name 200*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_7_OFFSET 0x00000010 201*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_7_LSB 24 202*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_7_MSB 31 203*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_7_MASK 0xff000000 204*5113495bSYour Name 205*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_8_OFFSET 0x00000014 206*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_8_LSB 0 207*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_8_MSB 7 208*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_8_MASK 0x000000ff 209*5113495bSYour Name 210*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_9_OFFSET 0x00000014 211*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_9_LSB 8 212*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_9_MSB 15 213*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_9_MASK 0x0000ff00 214*5113495bSYour Name 215*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_10_OFFSET 0x00000014 216*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_10_LSB 16 217*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_10_MSB 23 218*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_10_MASK 0x00ff0000 219*5113495bSYour Name 220*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_11_OFFSET 0x00000014 221*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_11_LSB 24 222*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_11_MSB 31 223*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_11_MASK 0xff000000 224*5113495bSYour Name 225*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_12_OFFSET 0x00000018 226*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_12_LSB 0 227*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_12_MSB 7 228*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_12_MASK 0x000000ff 229*5113495bSYour Name 230*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_13_OFFSET 0x00000018 231*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_13_LSB 8 232*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_13_MSB 15 233*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_13_MASK 0x0000ff00 234*5113495bSYour Name 235*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_14_OFFSET 0x00000018 236*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_14_LSB 16 237*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_14_MSB 23 238*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_14_MASK 0x00ff0000 239*5113495bSYour Name 240*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_15_OFFSET 0x00000018 241*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_15_LSB 24 242*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_15_MSB 31 243*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_15_MASK 0xff000000 244*5113495bSYour Name 245*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_16_OFFSET 0x0000001c 246*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_16_LSB 0 247*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_16_MSB 7 248*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_16_MASK 0x000000ff 249*5113495bSYour Name 250*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_17_OFFSET 0x0000001c 251*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_17_LSB 8 252*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_17_MSB 15 253*5113495bSYour Name #define TX_MPDU_START_IV_BYTE_17_MASK 0x0000ff00 254*5113495bSYour Name 255*5113495bSYour Name #define TX_MPDU_START_IV_LEN_OFFSET 0x0000001c 256*5113495bSYour Name #define TX_MPDU_START_IV_LEN_LSB 16 257*5113495bSYour Name #define TX_MPDU_START_IV_LEN_MSB 20 258*5113495bSYour Name #define TX_MPDU_START_IV_LEN_MASK 0x001f0000 259*5113495bSYour Name 260*5113495bSYour Name #define TX_MPDU_START_ICV_LEN_OFFSET 0x0000001c 261*5113495bSYour Name #define TX_MPDU_START_ICV_LEN_LSB 21 262*5113495bSYour Name #define TX_MPDU_START_ICV_LEN_MSB 25 263*5113495bSYour Name #define TX_MPDU_START_ICV_LEN_MASK 0x03e00000 264*5113495bSYour Name 265*5113495bSYour Name #define TX_MPDU_START_VHT_CONTROL_OFFSET_OFFSET 0x0000001c 266*5113495bSYour Name #define TX_MPDU_START_VHT_CONTROL_OFFSET_LSB 26 267*5113495bSYour Name #define TX_MPDU_START_VHT_CONTROL_OFFSET_MSB 31 268*5113495bSYour Name #define TX_MPDU_START_VHT_CONTROL_OFFSET_MASK 0xfc000000 269*5113495bSYour Name 270*5113495bSYour Name #define TX_MPDU_START_MPDU_TYPE_OFFSET 0x00000020 271*5113495bSYour Name #define TX_MPDU_START_MPDU_TYPE_LSB 0 272*5113495bSYour Name #define TX_MPDU_START_MPDU_TYPE_MSB 0 273*5113495bSYour Name #define TX_MPDU_START_MPDU_TYPE_MASK 0x00000001 274*5113495bSYour Name 275*5113495bSYour Name #define TX_MPDU_START_TRANSMIT_BW_RESTRICTION_OFFSET 0x00000020 276*5113495bSYour Name #define TX_MPDU_START_TRANSMIT_BW_RESTRICTION_LSB 1 277*5113495bSYour Name #define TX_MPDU_START_TRANSMIT_BW_RESTRICTION_MSB 1 278*5113495bSYour Name #define TX_MPDU_START_TRANSMIT_BW_RESTRICTION_MASK 0x00000002 279*5113495bSYour Name 280*5113495bSYour Name #define TX_MPDU_START_ALLOWED_TRANSMIT_BW_OFFSET 0x00000020 281*5113495bSYour Name #define TX_MPDU_START_ALLOWED_TRANSMIT_BW_LSB 2 282*5113495bSYour Name #define TX_MPDU_START_ALLOWED_TRANSMIT_BW_MSB 5 283*5113495bSYour Name #define TX_MPDU_START_ALLOWED_TRANSMIT_BW_MASK 0x0000003c 284*5113495bSYour Name 285*5113495bSYour Name #define TX_MPDU_START_TX_NOTIFY_FRAME_OFFSET 0x00000020 286*5113495bSYour Name #define TX_MPDU_START_TX_NOTIFY_FRAME_LSB 6 287*5113495bSYour Name #define TX_MPDU_START_TX_NOTIFY_FRAME_MSB 8 288*5113495bSYour Name #define TX_MPDU_START_TX_NOTIFY_FRAME_MASK 0x000001c0 289*5113495bSYour Name 290*5113495bSYour Name #define TX_MPDU_START_RESERVED_8A_OFFSET 0x00000020 291*5113495bSYour Name #define TX_MPDU_START_RESERVED_8A_LSB 9 292*5113495bSYour Name #define TX_MPDU_START_RESERVED_8A_MSB 31 293*5113495bSYour Name #define TX_MPDU_START_RESERVED_8A_MASK 0xfffffe00 294*5113495bSYour Name 295*5113495bSYour Name #endif 296