0001
0002
0003
0004
0005
0006
0007
0008 #ifndef _MWIFIEX_11N_RXREORDER_H_
0009 #define _MWIFIEX_11N_RXREORDER_H_
0010
0011 #define MIN_FLUSH_TIMER_MS 50
0012 #define MIN_FLUSH_TIMER_15_MS 15
0013 #define MWIFIEX_BA_WIN_SIZE_32 32
0014
0015 #define PKT_TYPE_BAR 0xE7
0016 #define MAX_TID_VALUE (2 << 11)
0017 #define TWOPOW11 (2 << 10)
0018
0019 #define BLOCKACKPARAM_TID_POS 2
0020 #define BLOCKACKPARAM_AMSDU_SUPP_MASK 0x1
0021 #define BLOCKACKPARAM_WINSIZE_POS 6
0022 #define DELBA_TID_POS 12
0023 #define DELBA_INITIATOR_POS 11
0024 #define TYPE_DELBA_SENT 1
0025 #define TYPE_DELBA_RECEIVE 2
0026 #define IMMEDIATE_BLOCK_ACK 0x2
0027
0028 #define ADDBA_RSP_STATUS_ACCEPT 0
0029
0030 #define MWIFIEX_DEF_11N_RX_SEQ_NUM 0xffff
0031 #define BA_SETUP_MAX_PACKET_THRESHOLD 16
0032 #define BA_SETUP_PACKET_OFFSET 16
0033
0034 enum mwifiex_rxreor_flags {
0035 RXREOR_FORCE_NO_DROP = 1<<0,
0036 RXREOR_INIT_WINDOW_SHIFT = 1<<1,
0037 };
0038
0039 static inline void mwifiex_reset_11n_rx_seq_num(struct mwifiex_private *priv)
0040 {
0041 memset(priv->rx_seq, 0xff, sizeof(priv->rx_seq));
0042 }
0043
0044 int mwifiex_11n_rx_reorder_pkt(struct mwifiex_private *,
0045 u16 seqNum,
0046 u16 tid, u8 *ta,
0047 u8 pkttype, void *payload);
0048 void mwifiex_del_ba_tbl(struct mwifiex_private *priv, int Tid,
0049 u8 *PeerMACAddr, u8 type, int initiator);
0050 void mwifiex_11n_ba_stream_timeout(struct mwifiex_private *priv,
0051 struct host_cmd_ds_11n_batimeout *event);
0052 int mwifiex_ret_11n_addba_resp(struct mwifiex_private *priv,
0053 struct host_cmd_ds_command
0054 *resp);
0055 int mwifiex_cmd_11n_delba(struct host_cmd_ds_command *cmd,
0056 void *data_buf);
0057 int mwifiex_cmd_11n_addba_rsp_gen(struct mwifiex_private *priv,
0058 struct host_cmd_ds_command *cmd,
0059 struct host_cmd_ds_11n_addba_req
0060 *cmd_addba_req);
0061 int mwifiex_cmd_11n_addba_req(struct host_cmd_ds_command *cmd,
0062 void *data_buf);
0063 void mwifiex_11n_cleanup_reorder_tbl(struct mwifiex_private *priv);
0064 struct mwifiex_rx_reorder_tbl *mwifiex_11n_get_rxreorder_tbl(struct
0065 mwifiex_private
0066 *priv, int tid,
0067 u8 *ta);
0068 struct mwifiex_rx_reorder_tbl *
0069 mwifiex_11n_get_rx_reorder_tbl(struct mwifiex_private *priv, int tid, u8 *ta);
0070 void mwifiex_11n_del_rx_reorder_tbl_by_ta(struct mwifiex_private *priv, u8 *ta);
0071 void mwifiex_update_rxreor_flags(struct mwifiex_adapter *adapter, u8 flags);
0072 void mwifiex_11n_rxba_sync_event(struct mwifiex_private *priv,
0073 u8 *event_buf, u16 len);
0074 #endif