1*5113495bSYour Name /* 2*5113495bSYour Name * Copyright (c) 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 _REO_ENTRANCE_RING_H_ 20*5113495bSYour Name #define _REO_ENTRANCE_RING_H_ 21*5113495bSYour Name #if !defined(__ASSEMBLER__) 22*5113495bSYour Name #endif 23*5113495bSYour Name 24*5113495bSYour Name #include "rx_mpdu_details.h" 25*5113495bSYour Name 26*5113495bSYour Name // ################ START SUMMARY ################# 27*5113495bSYour Name // 28*5113495bSYour Name // Dword Fields 29*5113495bSYour Name // 0-3 struct rx_mpdu_details reo_level_mpdu_frame_info; 30*5113495bSYour Name // 4 rx_reo_queue_desc_addr_31_0[31:0] 31*5113495bSYour Name // 5 rx_reo_queue_desc_addr_39_32[7:0], rounded_mpdu_byte_count[21:8], reo_destination_indication[26:22], frameless_bar[27], reserved_5a[31:28] 32*5113495bSYour Name // 6 rxdma_push_reason[1:0], rxdma_error_code[6:2], mpdu_fragment_number[10:7], reserved_6a[31:11] 33*5113495bSYour Name // 7 reserved_7a[19:0], ring_id[27:20], looping_count[31:28] 34*5113495bSYour Name // 35*5113495bSYour Name // ################ END SUMMARY ################# 36*5113495bSYour Name 37*5113495bSYour Name #define NUM_OF_DWORDS_REO_ENTRANCE_RING 8 38*5113495bSYour Name 39*5113495bSYour Name struct reo_entrance_ring { 40*5113495bSYour Name struct rx_mpdu_details reo_level_mpdu_frame_info; 41*5113495bSYour Name uint32_t rx_reo_queue_desc_addr_31_0 : 32; //[31:0] 42*5113495bSYour Name uint32_t rx_reo_queue_desc_addr_39_32 : 8, //[7:0] 43*5113495bSYour Name rounded_mpdu_byte_count : 14, //[21:8] 44*5113495bSYour Name reo_destination_indication : 5, //[26:22] 45*5113495bSYour Name frameless_bar : 1, //[27] 46*5113495bSYour Name reserved_5a : 4; //[31:28] 47*5113495bSYour Name uint32_t rxdma_push_reason : 2, //[1:0] 48*5113495bSYour Name rxdma_error_code : 5, //[6:2] 49*5113495bSYour Name mpdu_fragment_number : 4, //[10:7] 50*5113495bSYour Name reserved_6a : 21; //[31:11] 51*5113495bSYour Name uint32_t reserved_7a : 20, //[19:0] 52*5113495bSYour Name ring_id : 8, //[27:20] 53*5113495bSYour Name looping_count : 4; //[31:28] 54*5113495bSYour Name }; 55*5113495bSYour Name 56*5113495bSYour Name /* 57*5113495bSYour Name 58*5113495bSYour Name struct rx_mpdu_details reo_level_mpdu_frame_info 59*5113495bSYour Name 60*5113495bSYour Name Consumer: REO 61*5113495bSYour Name 62*5113495bSYour Name Producer: RXDMA 63*5113495bSYour Name 64*5113495bSYour Name 65*5113495bSYour Name 66*5113495bSYour Name Details related to the MPDU being pushed into the REO 67*5113495bSYour Name 68*5113495bSYour Name rx_reo_queue_desc_addr_31_0 69*5113495bSYour Name 70*5113495bSYour Name Consumer: REO 71*5113495bSYour Name 72*5113495bSYour Name Producer: RXDMA 73*5113495bSYour Name 74*5113495bSYour Name 75*5113495bSYour Name 76*5113495bSYour Name Address (lower 32 bits) of the REO queue descriptor. 77*5113495bSYour Name 78*5113495bSYour Name <legal all> 79*5113495bSYour Name 80*5113495bSYour Name rx_reo_queue_desc_addr_39_32 81*5113495bSYour Name 82*5113495bSYour Name Consumer: REO 83*5113495bSYour Name 84*5113495bSYour Name Producer: RXDMA 85*5113495bSYour Name 86*5113495bSYour Name 87*5113495bSYour Name 88*5113495bSYour Name Address (upper 8 bits) of the REO queue descriptor. 89*5113495bSYour Name 90*5113495bSYour Name <legal all> 91*5113495bSYour Name 92*5113495bSYour Name rounded_mpdu_byte_count 93*5113495bSYour Name 94*5113495bSYour Name An approximation of the number of bytes received in this 95*5113495bSYour Name MPDU. 96*5113495bSYour Name 97*5113495bSYour Name Used to keeps stats on the amount of data flowing 98*5113495bSYour Name through a queue. 99*5113495bSYour Name 100*5113495bSYour Name <legal all> 101*5113495bSYour Name 102*5113495bSYour Name reo_destination_indication 103*5113495bSYour Name 104*5113495bSYour Name RXDMA copy the MPDU's first MSDU's destination 105*5113495bSYour Name indication field here. This is used for REO to be able to 106*5113495bSYour Name re-route the packet to a different SW destination ring if 107*5113495bSYour Name the packet is detected as error in REO. 108*5113495bSYour Name 109*5113495bSYour Name 110*5113495bSYour Name 111*5113495bSYour Name The ID of the REO exit ring where the MSDU frame shall 112*5113495bSYour Name push after (MPDU level) reordering has finished. 113*5113495bSYour Name 114*5113495bSYour Name 115*5113495bSYour Name 116*5113495bSYour Name <enum 0 reo_destination_tcl> Reo will push the frame 117*5113495bSYour Name into the REO2TCL ring 118*5113495bSYour Name 119*5113495bSYour Name <enum 1 reo_destination_sw1> Reo will push the frame 120*5113495bSYour Name into the REO2SW1 ring 121*5113495bSYour Name 122*5113495bSYour Name <enum 2 reo_destination_sw2> Reo will push the frame 123*5113495bSYour Name into the REO2SW1 ring 124*5113495bSYour Name 125*5113495bSYour Name <enum 3 reo_destination_sw3> Reo will push the frame 126*5113495bSYour Name into the REO2SW1 ring 127*5113495bSYour Name 128*5113495bSYour Name <enum 4 reo_destination_sw4> Reo will push the frame 129*5113495bSYour Name into the REO2SW1 ring 130*5113495bSYour Name 131*5113495bSYour Name <enum 5 reo_destination_release> Reo will push the frame 132*5113495bSYour Name into the REO_release ring 133*5113495bSYour Name 134*5113495bSYour Name <enum 6 reo_destination_fw> Reo will push the frame into 135*5113495bSYour Name the REO2FW ring 136*5113495bSYour Name 137*5113495bSYour Name <enum 7 reo_destination_7> REO remaps this 138*5113495bSYour Name 139*5113495bSYour Name <enum 8 reo_destination_8> REO remaps this <enum 9 140*5113495bSYour Name reo_destination_9> REO remaps this <enum 10 141*5113495bSYour Name reo_destination_10> REO remaps this 142*5113495bSYour Name 143*5113495bSYour Name <enum 11 reo_destination_11> REO remaps this 144*5113495bSYour Name 145*5113495bSYour Name <enum 12 reo_destination_12> REO remaps this <enum 13 146*5113495bSYour Name reo_destination_13> REO remaps this 147*5113495bSYour Name 148*5113495bSYour Name <enum 14 reo_destination_14> REO remaps this 149*5113495bSYour Name 150*5113495bSYour Name <enum 15 reo_destination_15> REO remaps this 151*5113495bSYour Name 152*5113495bSYour Name <enum 16 reo_destination_16> REO remaps this 153*5113495bSYour Name 154*5113495bSYour Name <enum 17 reo_destination_17> REO remaps this 155*5113495bSYour Name 156*5113495bSYour Name <enum 18 reo_destination_18> REO remaps this 157*5113495bSYour Name 158*5113495bSYour Name <enum 19 reo_destination_19> REO remaps this 159*5113495bSYour Name 160*5113495bSYour Name <enum 20 reo_destination_20> REO remaps this 161*5113495bSYour Name 162*5113495bSYour Name <enum 21 reo_destination_21> REO remaps this 163*5113495bSYour Name 164*5113495bSYour Name <enum 22 reo_destination_22> REO remaps this 165*5113495bSYour Name 166*5113495bSYour Name <enum 23 reo_destination_23> REO remaps this 167*5113495bSYour Name 168*5113495bSYour Name <enum 24 reo_destination_24> REO remaps this 169*5113495bSYour Name 170*5113495bSYour Name <enum 25 reo_destination_25> REO remaps this 171*5113495bSYour Name 172*5113495bSYour Name <enum 26 reo_destination_26> REO remaps this 173*5113495bSYour Name 174*5113495bSYour Name <enum 27 reo_destination_27> REO remaps this 175*5113495bSYour Name 176*5113495bSYour Name <enum 28 reo_destination_28> REO remaps this 177*5113495bSYour Name 178*5113495bSYour Name <enum 29 reo_destination_29> REO remaps this 179*5113495bSYour Name 180*5113495bSYour Name <enum 30 reo_destination_30> REO remaps this 181*5113495bSYour Name 182*5113495bSYour Name <enum 31 reo_destination_31> REO remaps this 183*5113495bSYour Name 184*5113495bSYour Name 185*5113495bSYour Name 186*5113495bSYour Name <legal all> 187*5113495bSYour Name 188*5113495bSYour Name frameless_bar 189*5113495bSYour Name 190*5113495bSYour Name When set, this REO entrance ring struct contains BAR 191*5113495bSYour Name info from a multi TID BAR frame. The original multi TID BAR 192*5113495bSYour Name frame itself contained all the REO info for the first TID, 193*5113495bSYour Name but all the subsequent TID info and their linkage to the REO 194*5113495bSYour Name descriptors is passed down as 'frameless' BAR info. 195*5113495bSYour Name 196*5113495bSYour Name 197*5113495bSYour Name 198*5113495bSYour Name The only fields valid in this descriptor when this bit 199*5113495bSYour Name is set are: 200*5113495bSYour Name 201*5113495bSYour Name Rx_reo_queue_desc_addr_31_0 202*5113495bSYour Name 203*5113495bSYour Name RX_reo_queue_desc_addr_39_32 204*5113495bSYour Name 205*5113495bSYour Name 206*5113495bSYour Name 207*5113495bSYour Name And within the 208*5113495bSYour Name 209*5113495bSYour Name Reo_level_mpdu_frame_info: 210*5113495bSYour Name 211*5113495bSYour Name Within Rx_mpdu_desc_info_details: 212*5113495bSYour Name 213*5113495bSYour Name Mpdu_Sequence_number 214*5113495bSYour Name 215*5113495bSYour Name BAR_frame 216*5113495bSYour Name 217*5113495bSYour Name Peer_meta_data 218*5113495bSYour Name 219*5113495bSYour Name All other fields shall be set to 0 220*5113495bSYour Name 221*5113495bSYour Name 222*5113495bSYour Name 223*5113495bSYour Name <legal all> 224*5113495bSYour Name 225*5113495bSYour Name reserved_5a 226*5113495bSYour Name 227*5113495bSYour Name <legal 0> 228*5113495bSYour Name 229*5113495bSYour Name rxdma_push_reason 230*5113495bSYour Name 231*5113495bSYour Name Indicates why rxdma pushed the frame to this ring 232*5113495bSYour Name 233*5113495bSYour Name 234*5113495bSYour Name 235*5113495bSYour Name This field is ignored by REO. 236*5113495bSYour Name 237*5113495bSYour Name 238*5113495bSYour Name 239*5113495bSYour Name <enum 0 rxdma_error_detected> RXDMA detected an error an 240*5113495bSYour Name pushed this frame to this queue 241*5113495bSYour Name 242*5113495bSYour Name <enum 1 rxdma_routing_instruction> RXDMA pushed the 243*5113495bSYour Name frame to this queue per received routing instructions. No 244*5113495bSYour Name error within RXDMA was detected 245*5113495bSYour Name 246*5113495bSYour Name <enum 2 rxdma_rx_flush> RXDMA received an RX_FLUSH. As a 247*5113495bSYour Name result the MSDU link descriptor might not have the 248*5113495bSYour Name last_msdu_in_mpdu_flag set, but instead WBM might just see a 249*5113495bSYour Name NULL pointer in the MSDU link descriptor. This is to be 250*5113495bSYour Name considered a normal condition for this scenario. 251*5113495bSYour Name 252*5113495bSYour Name 253*5113495bSYour Name 254*5113495bSYour Name <legal 0 - 2> 255*5113495bSYour Name 256*5113495bSYour Name rxdma_error_code 257*5113495bSYour Name 258*5113495bSYour Name Field only valid when 'rxdma_push_reason' set to 259*5113495bSYour Name 'rxdma_error_detected'. 260*5113495bSYour Name 261*5113495bSYour Name 262*5113495bSYour Name 263*5113495bSYour Name This field is ignored by REO. 264*5113495bSYour Name 265*5113495bSYour Name 266*5113495bSYour Name 267*5113495bSYour Name <enum 0 rxdma_overflow_err>MPDU frame is not complete 268*5113495bSYour Name due to a FIFO overflow error in RXPCU. 269*5113495bSYour Name 270*5113495bSYour Name <enum 1 rxdma_mpdu_length_err>MPDU frame is not complete 271*5113495bSYour Name due to receiving incomplete MPDU from the PHY 272*5113495bSYour Name 273*5113495bSYour Name 274*5113495bSYour Name <enum 3 rxdma_decrypt_err>CRYPTO reported a decryption 275*5113495bSYour Name error or CRYPTO received an encrypted frame, but did not get 276*5113495bSYour Name a valid corresponding key id in the peer entry. 277*5113495bSYour Name 278*5113495bSYour Name <enum 4 rxdma_tkip_mic_err>CRYPTO reported a TKIP MIC 279*5113495bSYour Name error 280*5113495bSYour Name 281*5113495bSYour Name <enum 5 rxdma_unecrypted_err>CRYPTO reported an 282*5113495bSYour Name unencrypted frame error when encrypted was expected 283*5113495bSYour Name 284*5113495bSYour Name <enum 6 rxdma_msdu_len_err>RX OLE reported an MSDU 285*5113495bSYour Name length error 286*5113495bSYour Name 287*5113495bSYour Name <enum 7 rxdma_msdu_limit_err>RX OLE reported that max 288*5113495bSYour Name number of MSDUs allowed in an MPDU got exceeded 289*5113495bSYour Name 290*5113495bSYour Name <enum 8 rxdma_wifi_parse_err>RX OLE reported a parsing 291*5113495bSYour Name error 292*5113495bSYour Name 293*5113495bSYour Name <enum 9 rxdma_amsdu_parse_err>RX OLE reported an A-MSDU 294*5113495bSYour Name parsing error 295*5113495bSYour Name 296*5113495bSYour Name <enum 10 rxdma_sa_timeout_err>RX OLE reported a timeout 297*5113495bSYour Name during SA search 298*5113495bSYour Name 299*5113495bSYour Name <enum 11 rxdma_da_timeout_err>RX OLE reported a timeout 300*5113495bSYour Name during DA search 301*5113495bSYour Name 302*5113495bSYour Name <enum 12 rxdma_flow_timeout_err>RX OLE reported a 303*5113495bSYour Name timeout during flow search 304*5113495bSYour Name 305*5113495bSYour Name <enum 13 rxdma_flush_request>RXDMA received a flush 306*5113495bSYour Name request 307*5113495bSYour Name 308*5113495bSYour Name <enum 14 rxdma_amsdu_fragment_err>Rx PCU reported A-MSDU 309*5113495bSYour Name present as well as a fragmented MPDU. A-MSDU defragmentation 310*5113495bSYour Name is not supported in Lithium SW so this is treated as an 311*5113495bSYour Name error. 312*5113495bSYour Name 313*5113495bSYour Name mpdu_fragment_number 314*5113495bSYour Name 315*5113495bSYour Name Field only valid when Reo_level_mpdu_frame_info. 316*5113495bSYour Name Rx_mpdu_desc_info_details.Fragment_flag is set. 317*5113495bSYour Name 318*5113495bSYour Name 319*5113495bSYour Name 320*5113495bSYour Name The fragment number from the 802.11 header. 321*5113495bSYour Name 322*5113495bSYour Name 323*5113495bSYour Name 324*5113495bSYour Name Note that the sequence number is embedded in the field: 325*5113495bSYour Name Reo_level_mpdu_frame_info. Rx_mpdu_desc_info_details. 326*5113495bSYour Name Mpdu_sequence_number 327*5113495bSYour Name 328*5113495bSYour Name 329*5113495bSYour Name 330*5113495bSYour Name <legal all> 331*5113495bSYour Name 332*5113495bSYour Name reserved_6a 333*5113495bSYour Name 334*5113495bSYour Name <legal 0> 335*5113495bSYour Name 336*5113495bSYour Name reserved_7a 337*5113495bSYour Name 338*5113495bSYour Name <legal 0> 339*5113495bSYour Name 340*5113495bSYour Name ring_id 341*5113495bSYour Name 342*5113495bSYour Name Consumer: SW/REO/DEBUG 343*5113495bSYour Name 344*5113495bSYour Name Producer: SRNG (of RXDMA) 345*5113495bSYour Name 346*5113495bSYour Name 347*5113495bSYour Name 348*5113495bSYour Name For debugging. 349*5113495bSYour Name 350*5113495bSYour Name This field is filled in by the SRNG module. 351*5113495bSYour Name 352*5113495bSYour Name It help to identify the ring that is being looked <legal 353*5113495bSYour Name all> 354*5113495bSYour Name 355*5113495bSYour Name looping_count 356*5113495bSYour Name 357*5113495bSYour Name Consumer: SW/REO/DEBUG 358*5113495bSYour Name 359*5113495bSYour Name Producer: SRNG (of RXDMA) 360*5113495bSYour Name 361*5113495bSYour Name 362*5113495bSYour Name 363*5113495bSYour Name For debugging. 364*5113495bSYour Name 365*5113495bSYour Name This field is filled in by the SRNG module. 366*5113495bSYour Name 367*5113495bSYour Name 368*5113495bSYour Name 369*5113495bSYour Name A count value that indicates the number of times the 370*5113495bSYour Name producer of entries into this Ring has looped around the 371*5113495bSYour Name ring. 372*5113495bSYour Name 373*5113495bSYour Name At initialization time, this value is set to 0. On the 374*5113495bSYour Name first loop, this value is set to 1. After the max value is 375*5113495bSYour Name reached allowed by the number of bits for this field, the 376*5113495bSYour Name count value continues with 0 again. 377*5113495bSYour Name 378*5113495bSYour Name 379*5113495bSYour Name 380*5113495bSYour Name In case SW is the consumer of the ring entries, it can 381*5113495bSYour Name use this field to figure out up to where the producer of 382*5113495bSYour Name entries has created new entries. This eliminates the need to 383*5113495bSYour Name check where the head pointer' of the ring is located once 384*5113495bSYour Name the SW starts processing an interrupt indicating that new 385*5113495bSYour Name entries have been put into this ring... 386*5113495bSYour Name 387*5113495bSYour Name 388*5113495bSYour Name 389*5113495bSYour Name Also note that SW if it wants only needs to look at the 390*5113495bSYour Name LSB bit of this count value. 391*5113495bSYour Name 392*5113495bSYour Name <legal all> 393*5113495bSYour Name */ 394*5113495bSYour Name 395*5113495bSYour Name #define REO_ENTRANCE_RING_0_RX_MPDU_DETAILS_REO_LEVEL_MPDU_FRAME_INFO_OFFSET 0x00000000 396*5113495bSYour Name #define REO_ENTRANCE_RING_0_RX_MPDU_DETAILS_REO_LEVEL_MPDU_FRAME_INFO_LSB 28 397*5113495bSYour Name #define REO_ENTRANCE_RING_0_RX_MPDU_DETAILS_REO_LEVEL_MPDU_FRAME_INFO_MASK 0xffffffff 398*5113495bSYour Name #define REO_ENTRANCE_RING_1_RX_MPDU_DETAILS_REO_LEVEL_MPDU_FRAME_INFO_OFFSET 0x00000004 399*5113495bSYour Name #define REO_ENTRANCE_RING_1_RX_MPDU_DETAILS_REO_LEVEL_MPDU_FRAME_INFO_LSB 28 400*5113495bSYour Name #define REO_ENTRANCE_RING_1_RX_MPDU_DETAILS_REO_LEVEL_MPDU_FRAME_INFO_MASK 0xffffffff 401*5113495bSYour Name #define REO_ENTRANCE_RING_2_RX_MPDU_DETAILS_REO_LEVEL_MPDU_FRAME_INFO_OFFSET 0x00000008 402*5113495bSYour Name #define REO_ENTRANCE_RING_2_RX_MPDU_DETAILS_REO_LEVEL_MPDU_FRAME_INFO_LSB 28 403*5113495bSYour Name #define REO_ENTRANCE_RING_2_RX_MPDU_DETAILS_REO_LEVEL_MPDU_FRAME_INFO_MASK 0xffffffff 404*5113495bSYour Name #define REO_ENTRANCE_RING_3_RX_MPDU_DETAILS_REO_LEVEL_MPDU_FRAME_INFO_OFFSET 0x0000000c 405*5113495bSYour Name #define REO_ENTRANCE_RING_3_RX_MPDU_DETAILS_REO_LEVEL_MPDU_FRAME_INFO_LSB 28 406*5113495bSYour Name #define REO_ENTRANCE_RING_3_RX_MPDU_DETAILS_REO_LEVEL_MPDU_FRAME_INFO_MASK 0xffffffff 407*5113495bSYour Name 408*5113495bSYour Name /* Description REO_ENTRANCE_RING_4_RX_REO_QUEUE_DESC_ADDR_31_0 409*5113495bSYour Name 410*5113495bSYour Name Consumer: REO 411*5113495bSYour Name 412*5113495bSYour Name Producer: RXDMA 413*5113495bSYour Name 414*5113495bSYour Name 415*5113495bSYour Name 416*5113495bSYour Name Address (lower 32 bits) of the REO queue descriptor. 417*5113495bSYour Name 418*5113495bSYour Name <legal all> 419*5113495bSYour Name */ 420*5113495bSYour Name #define REO_ENTRANCE_RING_4_RX_REO_QUEUE_DESC_ADDR_31_0_OFFSET 0x00000010 421*5113495bSYour Name #define REO_ENTRANCE_RING_4_RX_REO_QUEUE_DESC_ADDR_31_0_LSB 0 422*5113495bSYour Name #define REO_ENTRANCE_RING_4_RX_REO_QUEUE_DESC_ADDR_31_0_MASK 0xffffffff 423*5113495bSYour Name 424*5113495bSYour Name /* Description REO_ENTRANCE_RING_5_RX_REO_QUEUE_DESC_ADDR_39_32 425*5113495bSYour Name 426*5113495bSYour Name Consumer: REO 427*5113495bSYour Name 428*5113495bSYour Name Producer: RXDMA 429*5113495bSYour Name 430*5113495bSYour Name 431*5113495bSYour Name 432*5113495bSYour Name Address (upper 8 bits) of the REO queue descriptor. 433*5113495bSYour Name 434*5113495bSYour Name <legal all> 435*5113495bSYour Name */ 436*5113495bSYour Name #define REO_ENTRANCE_RING_5_RX_REO_QUEUE_DESC_ADDR_39_32_OFFSET 0x00000014 437*5113495bSYour Name #define REO_ENTRANCE_RING_5_RX_REO_QUEUE_DESC_ADDR_39_32_LSB 0 438*5113495bSYour Name #define REO_ENTRANCE_RING_5_RX_REO_QUEUE_DESC_ADDR_39_32_MASK 0x000000ff 439*5113495bSYour Name 440*5113495bSYour Name /* Description REO_ENTRANCE_RING_5_ROUNDED_MPDU_BYTE_COUNT 441*5113495bSYour Name 442*5113495bSYour Name An approximation of the number of bytes received in this 443*5113495bSYour Name MPDU. 444*5113495bSYour Name 445*5113495bSYour Name Used to keeps stats on the amount of data flowing 446*5113495bSYour Name through a queue. 447*5113495bSYour Name 448*5113495bSYour Name <legal all> 449*5113495bSYour Name */ 450*5113495bSYour Name #define REO_ENTRANCE_RING_5_ROUNDED_MPDU_BYTE_COUNT_OFFSET 0x00000014 451*5113495bSYour Name #define REO_ENTRANCE_RING_5_ROUNDED_MPDU_BYTE_COUNT_LSB 8 452*5113495bSYour Name #define REO_ENTRANCE_RING_5_ROUNDED_MPDU_BYTE_COUNT_MASK 0x003fff00 453*5113495bSYour Name 454*5113495bSYour Name /* Description REO_ENTRANCE_RING_5_REO_DESTINATION_INDICATION 455*5113495bSYour Name 456*5113495bSYour Name RXDMA copy the MPDU's first MSDU's destination 457*5113495bSYour Name indication field here. This is used for REO to be able to 458*5113495bSYour Name re-route the packet to a different SW destination ring if 459*5113495bSYour Name the packet is detected as error in REO. 460*5113495bSYour Name 461*5113495bSYour Name 462*5113495bSYour Name 463*5113495bSYour Name The ID of the REO exit ring where the MSDU frame shall 464*5113495bSYour Name push after (MPDU level) reordering has finished. 465*5113495bSYour Name 466*5113495bSYour Name 467*5113495bSYour Name 468*5113495bSYour Name <enum 0 reo_destination_tcl> Reo will push the frame 469*5113495bSYour Name into the REO2TCL ring 470*5113495bSYour Name 471*5113495bSYour Name <enum 1 reo_destination_sw1> Reo will push the frame 472*5113495bSYour Name into the REO2SW1 ring 473*5113495bSYour Name 474*5113495bSYour Name <enum 2 reo_destination_sw2> Reo will push the frame 475*5113495bSYour Name into the REO2SW1 ring 476*5113495bSYour Name 477*5113495bSYour Name <enum 3 reo_destination_sw3> Reo will push the frame 478*5113495bSYour Name into the REO2SW1 ring 479*5113495bSYour Name 480*5113495bSYour Name <enum 4 reo_destination_sw4> Reo will push the frame 481*5113495bSYour Name into the REO2SW1 ring 482*5113495bSYour Name 483*5113495bSYour Name <enum 5 reo_destination_release> Reo will push the frame 484*5113495bSYour Name into the REO_release ring 485*5113495bSYour Name 486*5113495bSYour Name <enum 6 reo_destination_fw> Reo will push the frame into 487*5113495bSYour Name the REO2FW ring 488*5113495bSYour Name 489*5113495bSYour Name <enum 7 reo_destination_7> REO remaps this 490*5113495bSYour Name 491*5113495bSYour Name <enum 8 reo_destination_8> REO remaps this <enum 9 492*5113495bSYour Name reo_destination_9> REO remaps this <enum 10 493*5113495bSYour Name reo_destination_10> REO remaps this 494*5113495bSYour Name 495*5113495bSYour Name <enum 11 reo_destination_11> REO remaps this 496*5113495bSYour Name 497*5113495bSYour Name <enum 12 reo_destination_12> REO remaps this <enum 13 498*5113495bSYour Name reo_destination_13> REO remaps this 499*5113495bSYour Name 500*5113495bSYour Name <enum 14 reo_destination_14> REO remaps this 501*5113495bSYour Name 502*5113495bSYour Name <enum 15 reo_destination_15> REO remaps this 503*5113495bSYour Name 504*5113495bSYour Name <enum 16 reo_destination_16> REO remaps this 505*5113495bSYour Name 506*5113495bSYour Name <enum 17 reo_destination_17> REO remaps this 507*5113495bSYour Name 508*5113495bSYour Name <enum 18 reo_destination_18> REO remaps this 509*5113495bSYour Name 510*5113495bSYour Name <enum 19 reo_destination_19> REO remaps this 511*5113495bSYour Name 512*5113495bSYour Name <enum 20 reo_destination_20> REO remaps this 513*5113495bSYour Name 514*5113495bSYour Name <enum 21 reo_destination_21> REO remaps this 515*5113495bSYour Name 516*5113495bSYour Name <enum 22 reo_destination_22> REO remaps this 517*5113495bSYour Name 518*5113495bSYour Name <enum 23 reo_destination_23> REO remaps this 519*5113495bSYour Name 520*5113495bSYour Name <enum 24 reo_destination_24> REO remaps this 521*5113495bSYour Name 522*5113495bSYour Name <enum 25 reo_destination_25> REO remaps this 523*5113495bSYour Name 524*5113495bSYour Name <enum 26 reo_destination_26> REO remaps this 525*5113495bSYour Name 526*5113495bSYour Name <enum 27 reo_destination_27> REO remaps this 527*5113495bSYour Name 528*5113495bSYour Name <enum 28 reo_destination_28> REO remaps this 529*5113495bSYour Name 530*5113495bSYour Name <enum 29 reo_destination_29> REO remaps this 531*5113495bSYour Name 532*5113495bSYour Name <enum 30 reo_destination_30> REO remaps this 533*5113495bSYour Name 534*5113495bSYour Name <enum 31 reo_destination_31> REO remaps this 535*5113495bSYour Name 536*5113495bSYour Name 537*5113495bSYour Name 538*5113495bSYour Name <legal all> 539*5113495bSYour Name */ 540*5113495bSYour Name #define REO_ENTRANCE_RING_5_REO_DESTINATION_INDICATION_OFFSET 0x00000014 541*5113495bSYour Name #define REO_ENTRANCE_RING_5_REO_DESTINATION_INDICATION_LSB 22 542*5113495bSYour Name #define REO_ENTRANCE_RING_5_REO_DESTINATION_INDICATION_MASK 0x07c00000 543*5113495bSYour Name 544*5113495bSYour Name /* Description REO_ENTRANCE_RING_5_FRAMELESS_BAR 545*5113495bSYour Name 546*5113495bSYour Name When set, this REO entrance ring struct contains BAR 547*5113495bSYour Name info from a multi TID BAR frame. The original multi TID BAR 548*5113495bSYour Name frame itself contained all the REO info for the first TID, 549*5113495bSYour Name but all the subsequent TID info and their linkage to the REO 550*5113495bSYour Name descriptors is passed down as 'frameless' BAR info. 551*5113495bSYour Name 552*5113495bSYour Name 553*5113495bSYour Name 554*5113495bSYour Name The only fields valid in this descriptor when this bit 555*5113495bSYour Name is set are: 556*5113495bSYour Name 557*5113495bSYour Name Rx_reo_queue_desc_addr_31_0 558*5113495bSYour Name 559*5113495bSYour Name RX_reo_queue_desc_addr_39_32 560*5113495bSYour Name 561*5113495bSYour Name 562*5113495bSYour Name 563*5113495bSYour Name And within the 564*5113495bSYour Name 565*5113495bSYour Name Reo_level_mpdu_frame_info: 566*5113495bSYour Name 567*5113495bSYour Name Within Rx_mpdu_desc_info_details: 568*5113495bSYour Name 569*5113495bSYour Name Mpdu_Sequence_number 570*5113495bSYour Name 571*5113495bSYour Name BAR_frame 572*5113495bSYour Name 573*5113495bSYour Name Peer_meta_data 574*5113495bSYour Name 575*5113495bSYour Name All other fields shall be set to 0 576*5113495bSYour Name 577*5113495bSYour Name 578*5113495bSYour Name 579*5113495bSYour Name <legal all> 580*5113495bSYour Name */ 581*5113495bSYour Name #define REO_ENTRANCE_RING_5_FRAMELESS_BAR_OFFSET 0x00000014 582*5113495bSYour Name #define REO_ENTRANCE_RING_5_FRAMELESS_BAR_LSB 27 583*5113495bSYour Name #define REO_ENTRANCE_RING_5_FRAMELESS_BAR_MASK 0x08000000 584*5113495bSYour Name 585*5113495bSYour Name /* Description REO_ENTRANCE_RING_5_RESERVED_5A 586*5113495bSYour Name 587*5113495bSYour Name <legal 0> 588*5113495bSYour Name */ 589*5113495bSYour Name #define REO_ENTRANCE_RING_5_RESERVED_5A_OFFSET 0x00000014 590*5113495bSYour Name #define REO_ENTRANCE_RING_5_RESERVED_5A_LSB 28 591*5113495bSYour Name #define REO_ENTRANCE_RING_5_RESERVED_5A_MASK 0xf0000000 592*5113495bSYour Name 593*5113495bSYour Name /* Description REO_ENTRANCE_RING_6_RXDMA_PUSH_REASON 594*5113495bSYour Name 595*5113495bSYour Name Indicates why rxdma pushed the frame to this ring 596*5113495bSYour Name 597*5113495bSYour Name 598*5113495bSYour Name 599*5113495bSYour Name This field is ignored by REO. 600*5113495bSYour Name 601*5113495bSYour Name 602*5113495bSYour Name 603*5113495bSYour Name <enum 0 rxdma_error_detected> RXDMA detected an error an 604*5113495bSYour Name pushed this frame to this queue 605*5113495bSYour Name 606*5113495bSYour Name <enum 1 rxdma_routing_instruction> RXDMA pushed the 607*5113495bSYour Name frame to this queue per received routing instructions. No 608*5113495bSYour Name error within RXDMA was detected 609*5113495bSYour Name 610*5113495bSYour Name <enum 2 rxdma_rx_flush> RXDMA received an RX_FLUSH. As a 611*5113495bSYour Name result the MSDU link descriptor might not have the 612*5113495bSYour Name last_msdu_in_mpdu_flag set, but instead WBM might just see a 613*5113495bSYour Name NULL pointer in the MSDU link descriptor. This is to be 614*5113495bSYour Name considered a normal condition for this scenario. 615*5113495bSYour Name 616*5113495bSYour Name 617*5113495bSYour Name 618*5113495bSYour Name <legal 0 - 2> 619*5113495bSYour Name */ 620*5113495bSYour Name #define REO_ENTRANCE_RING_6_RXDMA_PUSH_REASON_OFFSET 0x00000018 621*5113495bSYour Name #define REO_ENTRANCE_RING_6_RXDMA_PUSH_REASON_LSB 0 622*5113495bSYour Name #define REO_ENTRANCE_RING_6_RXDMA_PUSH_REASON_MASK 0x00000003 623*5113495bSYour Name 624*5113495bSYour Name /* Description REO_ENTRANCE_RING_6_RXDMA_ERROR_CODE 625*5113495bSYour Name 626*5113495bSYour Name Field only valid when 'rxdma_push_reason' set to 627*5113495bSYour Name 'rxdma_error_detected'. 628*5113495bSYour Name 629*5113495bSYour Name 630*5113495bSYour Name 631*5113495bSYour Name This field is ignored by REO. 632*5113495bSYour Name 633*5113495bSYour Name 634*5113495bSYour Name 635*5113495bSYour Name <enum 0 rxdma_overflow_err>MPDU frame is not complete 636*5113495bSYour Name due to a FIFO overflow error in RXPCU. 637*5113495bSYour Name 638*5113495bSYour Name <enum 1 rxdma_mpdu_length_err>MPDU frame is not complete 639*5113495bSYour Name due to receiving incomplete MPDU from the PHY 640*5113495bSYour Name 641*5113495bSYour Name 642*5113495bSYour Name <enum 3 rxdma_decrypt_err>CRYPTO reported a decryption 643*5113495bSYour Name error or CRYPTO received an encrypted frame, but did not get 644*5113495bSYour Name a valid corresponding key id in the peer entry. 645*5113495bSYour Name 646*5113495bSYour Name <enum 4 rxdma_tkip_mic_err>CRYPTO reported a TKIP MIC 647*5113495bSYour Name error 648*5113495bSYour Name 649*5113495bSYour Name <enum 5 rxdma_unecrypted_err>CRYPTO reported an 650*5113495bSYour Name unencrypted frame error when encrypted was expected 651*5113495bSYour Name 652*5113495bSYour Name <enum 6 rxdma_msdu_len_err>RX OLE reported an MSDU 653*5113495bSYour Name length error 654*5113495bSYour Name 655*5113495bSYour Name <enum 7 rxdma_msdu_limit_err>RX OLE reported that max 656*5113495bSYour Name number of MSDUs allowed in an MPDU got exceeded 657*5113495bSYour Name 658*5113495bSYour Name <enum 8 rxdma_wifi_parse_err>RX OLE reported a parsing 659*5113495bSYour Name error 660*5113495bSYour Name 661*5113495bSYour Name <enum 9 rxdma_amsdu_parse_err>RX OLE reported an A-MSDU 662*5113495bSYour Name parsing error 663*5113495bSYour Name 664*5113495bSYour Name <enum 10 rxdma_sa_timeout_err>RX OLE reported a timeout 665*5113495bSYour Name during SA search 666*5113495bSYour Name 667*5113495bSYour Name <enum 11 rxdma_da_timeout_err>RX OLE reported a timeout 668*5113495bSYour Name during DA search 669*5113495bSYour Name 670*5113495bSYour Name <enum 12 rxdma_flow_timeout_err>RX OLE reported a 671*5113495bSYour Name timeout during flow search 672*5113495bSYour Name 673*5113495bSYour Name <enum 13 rxdma_flush_request>RXDMA received a flush 674*5113495bSYour Name request 675*5113495bSYour Name 676*5113495bSYour Name <enum 14 rxdma_amsdu_fragment_err>Rx PCU reported A-MSDU 677*5113495bSYour Name present as well as a fragmented MPDU. A-MSDU defragmentation 678*5113495bSYour Name is not supported in Lithium SW so this is treated as an 679*5113495bSYour Name error. 680*5113495bSYour Name */ 681*5113495bSYour Name #define REO_ENTRANCE_RING_6_RXDMA_ERROR_CODE_OFFSET 0x00000018 682*5113495bSYour Name #define REO_ENTRANCE_RING_6_RXDMA_ERROR_CODE_LSB 2 683*5113495bSYour Name #define REO_ENTRANCE_RING_6_RXDMA_ERROR_CODE_MASK 0x0000007c 684*5113495bSYour Name 685*5113495bSYour Name /* Description REO_ENTRANCE_RING_6_MPDU_FRAGMENT_NUMBER 686*5113495bSYour Name 687*5113495bSYour Name Field only valid when Reo_level_mpdu_frame_info. 688*5113495bSYour Name Rx_mpdu_desc_info_details.Fragment_flag is set. 689*5113495bSYour Name 690*5113495bSYour Name 691*5113495bSYour Name 692*5113495bSYour Name The fragment number from the 802.11 header. 693*5113495bSYour Name 694*5113495bSYour Name 695*5113495bSYour Name 696*5113495bSYour Name Note that the sequence number is embedded in the field: 697*5113495bSYour Name Reo_level_mpdu_frame_info. Rx_mpdu_desc_info_details. 698*5113495bSYour Name Mpdu_sequence_number 699*5113495bSYour Name 700*5113495bSYour Name 701*5113495bSYour Name 702*5113495bSYour Name <legal all> 703*5113495bSYour Name */ 704*5113495bSYour Name #define REO_ENTRANCE_RING_6_MPDU_FRAGMENT_NUMBER_OFFSET 0x00000018 705*5113495bSYour Name #define REO_ENTRANCE_RING_6_MPDU_FRAGMENT_NUMBER_LSB 7 706*5113495bSYour Name #define REO_ENTRANCE_RING_6_MPDU_FRAGMENT_NUMBER_MASK 0x00000780 707*5113495bSYour Name 708*5113495bSYour Name /* Description REO_ENTRANCE_RING_6_RESERVED_6A 709*5113495bSYour Name 710*5113495bSYour Name <legal 0> 711*5113495bSYour Name */ 712*5113495bSYour Name #define REO_ENTRANCE_RING_6_RESERVED_6A_OFFSET 0x00000018 713*5113495bSYour Name #define REO_ENTRANCE_RING_6_RESERVED_6A_LSB 11 714*5113495bSYour Name #define REO_ENTRANCE_RING_6_RESERVED_6A_MASK 0xfffff800 715*5113495bSYour Name 716*5113495bSYour Name /* Description REO_ENTRANCE_RING_7_RESERVED_7A 717*5113495bSYour Name 718*5113495bSYour Name <legal 0> 719*5113495bSYour Name */ 720*5113495bSYour Name #define REO_ENTRANCE_RING_7_RESERVED_7A_OFFSET 0x0000001c 721*5113495bSYour Name #define REO_ENTRANCE_RING_7_RESERVED_7A_LSB 0 722*5113495bSYour Name #define REO_ENTRANCE_RING_7_RESERVED_7A_MASK 0x000fffff 723*5113495bSYour Name 724*5113495bSYour Name /* Description REO_ENTRANCE_RING_7_RING_ID 725*5113495bSYour Name 726*5113495bSYour Name Consumer: SW/REO/DEBUG 727*5113495bSYour Name 728*5113495bSYour Name Producer: SRNG (of RXDMA) 729*5113495bSYour Name 730*5113495bSYour Name 731*5113495bSYour Name 732*5113495bSYour Name For debugging. 733*5113495bSYour Name 734*5113495bSYour Name This field is filled in by the SRNG module. 735*5113495bSYour Name 736*5113495bSYour Name It help to identify the ring that is being looked <legal 737*5113495bSYour Name all> 738*5113495bSYour Name */ 739*5113495bSYour Name #define REO_ENTRANCE_RING_7_RING_ID_OFFSET 0x0000001c 740*5113495bSYour Name #define REO_ENTRANCE_RING_7_RING_ID_LSB 20 741*5113495bSYour Name #define REO_ENTRANCE_RING_7_RING_ID_MASK 0x0ff00000 742*5113495bSYour Name 743*5113495bSYour Name /* Description REO_ENTRANCE_RING_7_LOOPING_COUNT 744*5113495bSYour Name 745*5113495bSYour Name Consumer: SW/REO/DEBUG 746*5113495bSYour Name 747*5113495bSYour Name Producer: SRNG (of RXDMA) 748*5113495bSYour Name 749*5113495bSYour Name 750*5113495bSYour Name 751*5113495bSYour Name For debugging. 752*5113495bSYour Name 753*5113495bSYour Name This field is filled in by the SRNG module. 754*5113495bSYour Name 755*5113495bSYour Name 756*5113495bSYour Name 757*5113495bSYour Name A count value that indicates the number of times the 758*5113495bSYour Name producer of entries into this Ring has looped around the 759*5113495bSYour Name ring. 760*5113495bSYour Name 761*5113495bSYour Name At initialization time, this value is set to 0. On the 762*5113495bSYour Name first loop, this value is set to 1. After the max value is 763*5113495bSYour Name reached allowed by the number of bits for this field, the 764*5113495bSYour Name count value continues with 0 again. 765*5113495bSYour Name 766*5113495bSYour Name 767*5113495bSYour Name 768*5113495bSYour Name In case SW is the consumer of the ring entries, it can 769*5113495bSYour Name use this field to figure out up to where the producer of 770*5113495bSYour Name entries has created new entries. This eliminates the need to 771*5113495bSYour Name check where the head pointer' of the ring is located once 772*5113495bSYour Name the SW starts processing an interrupt indicating that new 773*5113495bSYour Name entries have been put into this ring... 774*5113495bSYour Name 775*5113495bSYour Name 776*5113495bSYour Name 777*5113495bSYour Name Also note that SW if it wants only needs to look at the 778*5113495bSYour Name LSB bit of this count value. 779*5113495bSYour Name 780*5113495bSYour Name <legal all> 781*5113495bSYour Name */ 782*5113495bSYour Name #define REO_ENTRANCE_RING_7_LOOPING_COUNT_OFFSET 0x0000001c 783*5113495bSYour Name #define REO_ENTRANCE_RING_7_LOOPING_COUNT_LSB 28 784*5113495bSYour Name #define REO_ENTRANCE_RING_7_LOOPING_COUNT_MASK 0xf0000000 785*5113495bSYour Name 786*5113495bSYour Name 787*5113495bSYour Name #endif // _REO_ENTRANCE_RING_H_ 788