]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mwifiex: change default tx/rx win_size for BA setup
authorAvinash Patil <patila@marvell.com>
Thu, 28 Mar 2013 02:10:31 +0000 (19:10 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 1 Apr 2013 20:06:49 +0000 (16:06 -0400)
This patch fixes an issue where RX throughput values observed
were substantially lower than TX counterparts for PCIe8897 STA.
PCIe8897 supports larger rx_win_size. After changing these values
we see big improvement for TX and RX throughput values.

Different tx_win_size and rx_win_size are used for AP mode.

All BA setup related initialization has been moved to separate
function.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Sagar Bijwe <bsagar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/11n.c
drivers/net/wireless/mwifiex/decl.h
drivers/net/wireless/mwifiex/main.h
drivers/net/wireless/mwifiex/wmm.c

index 45f19716687ee2639fb80019227cddd9bd7ce64c..41e9d25a2d8e9d135a2f6b9b3b451149d36a0518 100644 (file)
@@ -679,3 +679,25 @@ void mwifiex_del_tx_ba_stream_tbl_by_ra(struct mwifiex_private *priv, u8 *ra)
 
        return;
 }
+
+/* This function initializes the BlockACK setup information for given
+ * mwifiex_private structure.
+ */
+void mwifiex_set_ba_params(struct mwifiex_private *priv)
+{
+       priv->add_ba_param.timeout = MWIFIEX_DEFAULT_BLOCK_ACK_TIMEOUT;
+
+       if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_UAP) {
+               priv->add_ba_param.tx_win_size =
+                                               MWIFIEX_UAP_AMPDU_DEF_TXWINSIZE;
+               priv->add_ba_param.rx_win_size =
+                                               MWIFIEX_UAP_AMPDU_DEF_RXWINSIZE;
+       } else {
+               priv->add_ba_param.tx_win_size =
+                                               MWIFIEX_STA_AMPDU_DEF_TXWINSIZE;
+               priv->add_ba_param.rx_win_size =
+                                               MWIFIEX_STA_AMPDU_DEF_RXWINSIZE;
+       }
+
+       return;
+}
index e8a569aaa2e8ca24298e8e1e25161bd5a9379943..2af2c7ce3ad7d256b4b7368441e2c6d7b709c4ca 100644 (file)
 #define MWIFIEX_MAX_TX_BASTREAM_SUPPORTED      2
 #define MWIFIEX_MAX_RX_BASTREAM_SUPPORTED      16
 
-#define MWIFIEX_AMPDU_DEF_TXWINSIZE        32
-#define MWIFIEX_AMPDU_DEF_RXWINSIZE        16
+#define MWIFIEX_STA_AMPDU_DEF_TXWINSIZE        16
+#define MWIFIEX_STA_AMPDU_DEF_RXWINSIZE        32
+#define MWIFIEX_UAP_AMPDU_DEF_TXWINSIZE        32
+#define MWIFIEX_UAP_AMPDU_DEF_RXWINSIZE        16
+
 #define MWIFIEX_DEFAULT_BLOCK_ACK_TIMEOUT  0xffff
 
 #define MWIFIEX_RATE_BITMAP_MCS0   32
index 535595eeb5c542168fd39a0244aed6f70fcb79ab..d03299808ffc5a673f8c7abf551ae907dcfcbda5 100644 (file)
@@ -924,6 +924,7 @@ void
 mwifiex_set_wmm_params(struct mwifiex_private *priv,
                       struct mwifiex_uap_bss_param *bss_cfg,
                       struct cfg80211_ap_settings *params);
+void mwifiex_set_ba_params(struct mwifiex_private *priv);
 
 /*
  * This function checks if the queuing is RA based or not.
index 32adc878041d252300c6fde9bd9d53ca049e902a..3ddae52ef88dd332eaa6d0d1c4820af00b8e2d8d 100644 (file)
@@ -436,10 +436,7 @@ mwifiex_wmm_init(struct mwifiex_adapter *adapter)
                                        = priv->aggr_prio_tbl[7].ampdu_user
                                        = BA_STREAM_NOT_ALLOWED;
 
-               priv->add_ba_param.timeout = MWIFIEX_DEFAULT_BLOCK_ACK_TIMEOUT;
-               priv->add_ba_param.tx_win_size = MWIFIEX_AMPDU_DEF_TXWINSIZE;
-               priv->add_ba_param.rx_win_size = MWIFIEX_AMPDU_DEF_RXWINSIZE;
-
+               mwifiex_set_ba_params(priv);
                mwifiex_reset_11n_rx_seq_num(priv);
 
                atomic_set(&priv->wmm.tx_pkts_queued, 0);