1 /** @file mlan_11n_rxreorder.h 2 * 3 * @brief This file contains related macros, enum, and struct 4 * of 11n RxReordering functionalities 5 * 6 * 7 * Copyright 2008-2021 NXP 8 * 9 * This software file (the File) is distributed by NXP 10 * under the terms of the GNU General Public License Version 2, June 1991 11 * (the License). You may use, redistribute and/or modify the File in 12 * accordance with the terms and conditions of the License, a copy of which 13 * is available by writing to the Free Software Foundation, Inc., 14 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the 15 * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. 16 * 17 * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE 18 * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE 19 * ARE EXPRESSLY DISCLAIMED. The License provides additional details about 20 * this warranty disclaimer. 21 * 22 */ 23 24 /******************************************************** 25 Change log: 26 11/10/2008: initial version 27 ********************************************************/ 28 29 #ifndef _MLAN_11N_RXREORDER_H_ 30 #define _MLAN_11N_RXREORDER_H_ 31 32 /** Max value a TID can take = 2^12 = 4096 */ 33 #define MAX_TID_VALUE (2 << 11) 34 /** 2^11 = 2048 */ 35 #define TWOPOW11 (2 << 10) 36 37 /** Tid Mask used for extracting TID from BlockAckParamSet */ 38 #define BLOCKACKPARAM_TID_MASK 0x3C 39 /** Tid position in BlockAckParamSet */ 40 #define BLOCKACKPARAM_TID_POS 2 41 /** WinSize Mask used for extracting WinSize from BlockAckParamSet */ 42 #define BLOCKACKPARAM_WINSIZE_MASK 0xffc0 43 /** WinSize Mask used for extracting WinSize from BlockAckParamSet */ 44 #define BLOCKACKPARAM_AMSDU_SUPP_MASK 0x1 45 /** WinSize position in BlockAckParamSet */ 46 #define BLOCKACKPARAM_WINSIZE_POS 6 47 /** Position of TID in DelBA Param set */ 48 #define DELBA_TID_POS 12 49 /** Position of INITIATOR in DelBA Param set */ 50 #define DELBA_INITIATOR_POS 11 51 /** Reason code: Requested from peer STA as it does not want to 52 * use the mechanism */ 53 #define REASON_CODE_STA_DONT_WANT 37 54 /** Reason code: Requested from peer STA due to timeout*/ 55 #define REASON_CODE_STA_TIMEOUT 39 56 /** Type: send delba command */ 57 #define TYPE_DELBA_SENT 1 58 /** Type: recieve delba command */ 59 #define TYPE_DELBA_RECEIVE 2 60 /** Set Initiator Bit */ 61 #define DELBA_INITIATOR(paramset) (paramset = (paramset | (1 << 11))) 62 /** Reset Initiator Bit for recipient */ 63 #define DELBA_RECIPIENT(paramset) (paramset = (paramset & ~(1 << 11))) 64 /** Immediate block ack */ 65 #define IMMEDIATE_BLOCK_ACK 0x2 66 67 /** The request has been declined */ 68 #define ADDBA_RSP_STATUS_DECLINED 37 69 /** ADDBA response status : Reject */ 70 #define ADDBA_RSP_STATUS_REJECT 1 71 /** ADDBA response status : Accept */ 72 #define ADDBA_RSP_STATUS_ACCEPT 0 73 74 /** DEFAULT SEQ NUM */ 75 #define DEFAULT_SEQ_NUM 0xffff 76 77 /** Indicate packet has been dropped in FW */ 78 #define RX_PKT_DROPPED_IN_FW 0xffffffff 79 80 mlan_status mlan_11n_rxreorder_pkt(void *priv, t_u16 seqNum, t_u16 tid, 81 t_u8 *ta, t_u8 pkttype, void *payload); 82 void mlan_11n_delete_bastream_tbl(mlan_private *priv, int tid, 83 t_u8 *PeerMACAddr, t_u8 type, int initiator, 84 t_u16 reason_code); 85 void wlan_11n_ba_stream_timeout(mlan_private *priv, 86 HostCmd_DS_11N_BATIMEOUT *event); 87 mlan_status wlan_ret_11n_addba_resp(mlan_private *priv, 88 HostCmd_DS_COMMAND *resp); 89 mlan_status wlan_cmd_11n_delba(mlan_private *priv, HostCmd_DS_COMMAND *cmd, 90 void *pdata_buf); 91 mlan_status wlan_cmd_11n_addba_rspgen(mlan_private *priv, 92 HostCmd_DS_COMMAND *cmd, void *pdata_buf); 93 mlan_status wlan_cmd_11n_addba_req(mlan_private *priv, HostCmd_DS_COMMAND *cmd, 94 void *pdata_buf); 95 void wlan_11n_cleanup_reorder_tbl(mlan_private *priv); 96 RxReorderTbl *wlan_11n_get_rxreorder_tbl(mlan_private *priv, int tid, t_u8 *ta); 97 void wlan_11n_rxba_sync_event(mlan_private *priv, t_u8 *event_buf, t_u16 len); 98 void wlan_update_rxreorder_tbl(pmlan_adapter pmadapter, t_u8 flag); 99 void wlan_flush_rxreorder_tbl(pmlan_adapter pmadapter); 100 void wlan_coex_ampdu_rxwinsize(pmlan_adapter pmadapter); 101 102 /** clean up reorder_tbl */ 103 void wlan_cleanup_reorder_tbl(mlan_private *priv, t_u8 *ta); 104 #endif /* _MLAN_11N_RXREORDER_H_ */ 105