1*5113495bSYour Name 2*5113495bSYour Name /* Copyright (c) 2022, 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 19*5113495bSYour Name 20*5113495bSYour Name 21*5113495bSYour Name 22*5113495bSYour Name 23*5113495bSYour Name 24*5113495bSYour Name 25*5113495bSYour Name 26*5113495bSYour Name #ifndef _RX_MPDU_DESC_INFO_H_ 27*5113495bSYour Name #define _RX_MPDU_DESC_INFO_H_ 28*5113495bSYour Name #if !defined(__ASSEMBLER__) 29*5113495bSYour Name #endif 30*5113495bSYour Name 31*5113495bSYour Name #define NUM_OF_DWORDS_RX_MPDU_DESC_INFO 2 32*5113495bSYour Name 33*5113495bSYour Name 34*5113495bSYour Name struct rx_mpdu_desc_info { 35*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 36*5113495bSYour Name uint32_t msdu_count : 8, // [7:0] 37*5113495bSYour Name fragment_flag : 1, // [8:8] 38*5113495bSYour Name mpdu_retry_bit : 1, // [9:9] 39*5113495bSYour Name ampdu_flag : 1, // [10:10] 40*5113495bSYour Name bar_frame : 1, // [11:11] 41*5113495bSYour Name pn_fields_contain_valid_info : 1, // [12:12] 42*5113495bSYour Name raw_mpdu : 1, // [13:13] 43*5113495bSYour Name more_fragment_flag : 1, // [14:14] 44*5113495bSYour Name src_info : 12, // [26:15] 45*5113495bSYour Name mpdu_qos_control_valid : 1, // [27:27] 46*5113495bSYour Name tid : 4; // [31:28] 47*5113495bSYour Name uint32_t peer_meta_data : 32; // [31:0] 48*5113495bSYour Name #else 49*5113495bSYour Name uint32_t tid : 4, // [31:28] 50*5113495bSYour Name mpdu_qos_control_valid : 1, // [27:27] 51*5113495bSYour Name src_info : 12, // [26:15] 52*5113495bSYour Name more_fragment_flag : 1, // [14:14] 53*5113495bSYour Name raw_mpdu : 1, // [13:13] 54*5113495bSYour Name pn_fields_contain_valid_info : 1, // [12:12] 55*5113495bSYour Name bar_frame : 1, // [11:11] 56*5113495bSYour Name ampdu_flag : 1, // [10:10] 57*5113495bSYour Name mpdu_retry_bit : 1, // [9:9] 58*5113495bSYour Name fragment_flag : 1, // [8:8] 59*5113495bSYour Name msdu_count : 8; // [7:0] 60*5113495bSYour Name uint32_t peer_meta_data : 32; // [31:0] 61*5113495bSYour Name #endif 62*5113495bSYour Name }; 63*5113495bSYour Name 64*5113495bSYour Name 65*5113495bSYour Name /* Description MSDU_COUNT 66*5113495bSYour Name 67*5113495bSYour Name Consumer: REO/SW/FW 68*5113495bSYour Name Producer: RXDMA 69*5113495bSYour Name 70*5113495bSYour Name The number of MSDUs within the MPDU 71*5113495bSYour Name <legal all> 72*5113495bSYour Name */ 73*5113495bSYour Name 74*5113495bSYour Name #define RX_MPDU_DESC_INFO_MSDU_COUNT_OFFSET 0x00000000 75*5113495bSYour Name #define RX_MPDU_DESC_INFO_MSDU_COUNT_LSB 0 76*5113495bSYour Name #define RX_MPDU_DESC_INFO_MSDU_COUNT_MSB 7 77*5113495bSYour Name #define RX_MPDU_DESC_INFO_MSDU_COUNT_MASK 0x000000ff 78*5113495bSYour Name 79*5113495bSYour Name 80*5113495bSYour Name /* Description FRAGMENT_FLAG 81*5113495bSYour Name 82*5113495bSYour Name Consumer: REO/SW/FW 83*5113495bSYour Name Producer: RXDMA 84*5113495bSYour Name 85*5113495bSYour Name When set, this MPDU is a fragment and REO should forward 86*5113495bSYour Name this fragment MPDU to the REO destination ring without 87*5113495bSYour Name any reorder checks, pn checks or bitmap update. This implies 88*5113495bSYour Name that REO is forwarding the pointer to the MSDU link descriptor. 89*5113495bSYour Name The destination ring is coming from a programmable register 90*5113495bSYour Name setting in REO 91*5113495bSYour Name 92*5113495bSYour Name <legal all> 93*5113495bSYour Name */ 94*5113495bSYour Name 95*5113495bSYour Name #define RX_MPDU_DESC_INFO_FRAGMENT_FLAG_OFFSET 0x00000000 96*5113495bSYour Name #define RX_MPDU_DESC_INFO_FRAGMENT_FLAG_LSB 8 97*5113495bSYour Name #define RX_MPDU_DESC_INFO_FRAGMENT_FLAG_MSB 8 98*5113495bSYour Name #define RX_MPDU_DESC_INFO_FRAGMENT_FLAG_MASK 0x00000100 99*5113495bSYour Name 100*5113495bSYour Name 101*5113495bSYour Name /* Description MPDU_RETRY_BIT 102*5113495bSYour Name 103*5113495bSYour Name Consumer: REO/SW/FW 104*5113495bSYour Name Producer: RXDMA 105*5113495bSYour Name 106*5113495bSYour Name The retry bit setting from the MPDU header of the received 107*5113495bSYour Name frame 108*5113495bSYour Name <legal all> 109*5113495bSYour Name */ 110*5113495bSYour Name 111*5113495bSYour Name #define RX_MPDU_DESC_INFO_MPDU_RETRY_BIT_OFFSET 0x00000000 112*5113495bSYour Name #define RX_MPDU_DESC_INFO_MPDU_RETRY_BIT_LSB 9 113*5113495bSYour Name #define RX_MPDU_DESC_INFO_MPDU_RETRY_BIT_MSB 9 114*5113495bSYour Name #define RX_MPDU_DESC_INFO_MPDU_RETRY_BIT_MASK 0x00000200 115*5113495bSYour Name 116*5113495bSYour Name 117*5113495bSYour Name /* Description AMPDU_FLAG 118*5113495bSYour Name 119*5113495bSYour Name Consumer: REO/SW/FW 120*5113495bSYour Name Producer: RXDMA 121*5113495bSYour Name 122*5113495bSYour Name When set, the MPDU was received as part of an A-MPDU. 123*5113495bSYour Name <legal all> 124*5113495bSYour Name */ 125*5113495bSYour Name 126*5113495bSYour Name #define RX_MPDU_DESC_INFO_AMPDU_FLAG_OFFSET 0x00000000 127*5113495bSYour Name #define RX_MPDU_DESC_INFO_AMPDU_FLAG_LSB 10 128*5113495bSYour Name #define RX_MPDU_DESC_INFO_AMPDU_FLAG_MSB 10 129*5113495bSYour Name #define RX_MPDU_DESC_INFO_AMPDU_FLAG_MASK 0x00000400 130*5113495bSYour Name 131*5113495bSYour Name 132*5113495bSYour Name /* Description BAR_FRAME 133*5113495bSYour Name 134*5113495bSYour Name Consumer: REO/SW/FW 135*5113495bSYour Name Producer: RXDMA 136*5113495bSYour Name 137*5113495bSYour Name When set, the received frame is a BAR frame. After processing, 138*5113495bSYour Name this frame shall be pushed to SW or deleted. 139*5113495bSYour Name <legal all> 140*5113495bSYour Name */ 141*5113495bSYour Name 142*5113495bSYour Name #define RX_MPDU_DESC_INFO_BAR_FRAME_OFFSET 0x00000000 143*5113495bSYour Name #define RX_MPDU_DESC_INFO_BAR_FRAME_LSB 11 144*5113495bSYour Name #define RX_MPDU_DESC_INFO_BAR_FRAME_MSB 11 145*5113495bSYour Name #define RX_MPDU_DESC_INFO_BAR_FRAME_MASK 0x00000800 146*5113495bSYour Name 147*5113495bSYour Name 148*5113495bSYour Name /* Description PN_FIELDS_CONTAIN_VALID_INFO 149*5113495bSYour Name 150*5113495bSYour Name Consumer: REO/SW/FW 151*5113495bSYour Name Producer: RXDMA 152*5113495bSYour Name 153*5113495bSYour Name Copied here by RXDMA from RX_MPDU_END 154*5113495bSYour Name When not set, REO will Not perform a PN sequence number 155*5113495bSYour Name check 156*5113495bSYour Name */ 157*5113495bSYour Name 158*5113495bSYour Name #define RX_MPDU_DESC_INFO_PN_FIELDS_CONTAIN_VALID_INFO_OFFSET 0x00000000 159*5113495bSYour Name #define RX_MPDU_DESC_INFO_PN_FIELDS_CONTAIN_VALID_INFO_LSB 12 160*5113495bSYour Name #define RX_MPDU_DESC_INFO_PN_FIELDS_CONTAIN_VALID_INFO_MSB 12 161*5113495bSYour Name #define RX_MPDU_DESC_INFO_PN_FIELDS_CONTAIN_VALID_INFO_MASK 0x00001000 162*5113495bSYour Name 163*5113495bSYour Name 164*5113495bSYour Name /* Description RAW_MPDU 165*5113495bSYour Name 166*5113495bSYour Name Field only valid when first_msdu_in_mpdu_flag is set. 167*5113495bSYour Name 168*5113495bSYour Name When set, the contents in the MSDU buffer contains a 'RAW' 169*5113495bSYour Name MPDU. This 'RAW' MPDU might be spread out over multiple 170*5113495bSYour Name MSDU buffers. 171*5113495bSYour Name <legal all> 172*5113495bSYour Name */ 173*5113495bSYour Name 174*5113495bSYour Name #define RX_MPDU_DESC_INFO_RAW_MPDU_OFFSET 0x00000000 175*5113495bSYour Name #define RX_MPDU_DESC_INFO_RAW_MPDU_LSB 13 176*5113495bSYour Name #define RX_MPDU_DESC_INFO_RAW_MPDU_MSB 13 177*5113495bSYour Name #define RX_MPDU_DESC_INFO_RAW_MPDU_MASK 0x00002000 178*5113495bSYour Name 179*5113495bSYour Name 180*5113495bSYour Name /* Description MORE_FRAGMENT_FLAG 181*5113495bSYour Name 182*5113495bSYour Name The More Fragment bit setting from the MPDU header of the 183*5113495bSYour Name received frame 184*5113495bSYour Name 185*5113495bSYour Name <legal all> 186*5113495bSYour Name */ 187*5113495bSYour Name 188*5113495bSYour Name #define RX_MPDU_DESC_INFO_MORE_FRAGMENT_FLAG_OFFSET 0x00000000 189*5113495bSYour Name #define RX_MPDU_DESC_INFO_MORE_FRAGMENT_FLAG_LSB 14 190*5113495bSYour Name #define RX_MPDU_DESC_INFO_MORE_FRAGMENT_FLAG_MSB 14 191*5113495bSYour Name #define RX_MPDU_DESC_INFO_MORE_FRAGMENT_FLAG_MASK 0x00004000 192*5113495bSYour Name 193*5113495bSYour Name 194*5113495bSYour Name /* Description SRC_INFO 195*5113495bSYour Name 196*5113495bSYour Name Source (virtual) device/interface info. associated with 197*5113495bSYour Name this peer 198*5113495bSYour Name 199*5113495bSYour Name This field gets passed on by REO to PPE in the EDMA descriptor 200*5113495bSYour Name ('REO_TO_PPE_RING'). 201*5113495bSYour Name 202*5113495bSYour Name Hamilton v1 used this for 'vdev_id' instead. 203*5113495bSYour Name <legal all> 204*5113495bSYour Name */ 205*5113495bSYour Name 206*5113495bSYour Name #define RX_MPDU_DESC_INFO_SRC_INFO_OFFSET 0x00000000 207*5113495bSYour Name #define RX_MPDU_DESC_INFO_SRC_INFO_LSB 15 208*5113495bSYour Name #define RX_MPDU_DESC_INFO_SRC_INFO_MSB 26 209*5113495bSYour Name #define RX_MPDU_DESC_INFO_SRC_INFO_MASK 0x07ff8000 210*5113495bSYour Name 211*5113495bSYour Name 212*5113495bSYour Name /* Description MPDU_QOS_CONTROL_VALID 213*5113495bSYour Name 214*5113495bSYour Name When set, the MPDU has a QoS control field. 215*5113495bSYour Name 216*5113495bSYour Name In case of ndp or phy_err, this field will never be set. 217*5113495bSYour Name 218*5113495bSYour Name <legal all> 219*5113495bSYour Name */ 220*5113495bSYour Name 221*5113495bSYour Name #define RX_MPDU_DESC_INFO_MPDU_QOS_CONTROL_VALID_OFFSET 0x00000000 222*5113495bSYour Name #define RX_MPDU_DESC_INFO_MPDU_QOS_CONTROL_VALID_LSB 27 223*5113495bSYour Name #define RX_MPDU_DESC_INFO_MPDU_QOS_CONTROL_VALID_MSB 27 224*5113495bSYour Name #define RX_MPDU_DESC_INFO_MPDU_QOS_CONTROL_VALID_MASK 0x08000000 225*5113495bSYour Name 226*5113495bSYour Name 227*5113495bSYour Name /* Description TID 228*5113495bSYour Name 229*5113495bSYour Name Field only valid when mpdu_qos_control_valid is set 230*5113495bSYour Name 231*5113495bSYour Name The TID field in the QoS control field 232*5113495bSYour Name <legal all> 233*5113495bSYour Name */ 234*5113495bSYour Name 235*5113495bSYour Name #define RX_MPDU_DESC_INFO_TID_OFFSET 0x00000000 236*5113495bSYour Name #define RX_MPDU_DESC_INFO_TID_LSB 28 237*5113495bSYour Name #define RX_MPDU_DESC_INFO_TID_MSB 31 238*5113495bSYour Name #define RX_MPDU_DESC_INFO_TID_MASK 0xf0000000 239*5113495bSYour Name 240*5113495bSYour Name 241*5113495bSYour Name /* Description PEER_META_DATA 242*5113495bSYour Name 243*5113495bSYour Name Meta data that SW has programmed in the Peer table entry 244*5113495bSYour Name of the transmitting STA. 245*5113495bSYour Name <legal all> 246*5113495bSYour Name */ 247*5113495bSYour Name 248*5113495bSYour Name #define RX_MPDU_DESC_INFO_PEER_META_DATA_OFFSET 0x00000004 249*5113495bSYour Name #define RX_MPDU_DESC_INFO_PEER_META_DATA_LSB 0 250*5113495bSYour Name #define RX_MPDU_DESC_INFO_PEER_META_DATA_MSB 31 251*5113495bSYour Name #define RX_MPDU_DESC_INFO_PEER_META_DATA_MASK 0xffffffff 252*5113495bSYour Name 253*5113495bSYour Name 254*5113495bSYour Name 255*5113495bSYour Name #endif // RX_MPDU_DESC_INFO 256