]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mwifiex: do not reconfigure tx buffer size in firmware while associating
authorBing Zhao <bzhao@marvell.com>
Thu, 31 Jan 2013 03:56:01 +0000 (19:56 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 1 Feb 2013 19:27:23 +0000 (14:27 -0500)
It's observed that reconfiguration of tx buffer size before
association can cause data path failure in firmware after
associated. Although this is only found with PCIe cards, but
potentially it could happen with any other interfaces as well.

The tx buffer reconfiguration is not really useful in firmware.
Let's remove it for all interfaces.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/11n.c
drivers/net/wireless/mwifiex/11n.h
drivers/net/wireless/mwifiex/join.c

index 9cd6216c61e6d802e140090b598f9f09e9d894c6..48cc46bc152f001e1ca8eddc22068e3c67afab85 100644 (file)
@@ -399,45 +399,6 @@ mwifiex_cmd_append_11n_tlv(struct mwifiex_private *priv,
        return ret_len;
 }
 
-/*
- * This function reconfigures the Tx buffer size in firmware.
- *
- * This function prepares a firmware command and issues it, if
- * the current Tx buffer size is different from the one requested.
- * Maximum configurable Tx buffer size is limited by the HT capability
- * field value.
- */
-void
-mwifiex_cfg_tx_buf(struct mwifiex_private *priv,
-                  struct mwifiex_bssdescriptor *bss_desc)
-{
-       u16 max_amsdu = MWIFIEX_TX_DATA_BUF_SIZE_2K;
-       u16 tx_buf, curr_tx_buf_size = 0;
-
-       if (bss_desc->bcn_ht_cap) {
-               if (le16_to_cpu(bss_desc->bcn_ht_cap->cap_info) &
-                               IEEE80211_HT_CAP_MAX_AMSDU)
-                       max_amsdu = MWIFIEX_TX_DATA_BUF_SIZE_8K;
-               else
-                       max_amsdu = MWIFIEX_TX_DATA_BUF_SIZE_4K;
-       }
-
-       tx_buf = min(priv->adapter->max_tx_buf_size, max_amsdu);
-
-       dev_dbg(priv->adapter->dev, "info: max_amsdu=%d, max_tx_buf=%d\n",
-               max_amsdu, priv->adapter->max_tx_buf_size);
-
-       if (priv->adapter->curr_tx_buf_size <= MWIFIEX_TX_DATA_BUF_SIZE_2K)
-               curr_tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K;
-       else if (priv->adapter->curr_tx_buf_size <= MWIFIEX_TX_DATA_BUF_SIZE_4K)
-               curr_tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_4K;
-       else if (priv->adapter->curr_tx_buf_size <= MWIFIEX_TX_DATA_BUF_SIZE_8K)
-               curr_tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_8K;
-       if (curr_tx_buf_size != tx_buf)
-               mwifiex_send_cmd_async(priv, HostCmd_CMD_RECONFIGURE_TX_BUFF,
-                                      HostCmd_ACT_GEN_SET, 0, &tx_buf);
-}
-
 /*
  * This function checks if the given pointer is valid entry of
  * Tx BA Stream table.
index 46006a54a6566ee1c744220926bc198159aac0dd..29a4c02479d62b19893cd8d7bdaa46fd3e1771e8 100644 (file)
@@ -34,8 +34,6 @@ int mwifiex_cmd_11n_cfg(struct host_cmd_ds_command *cmd, u16 cmd_action,
 int mwifiex_cmd_append_11n_tlv(struct mwifiex_private *priv,
                               struct mwifiex_bssdescriptor *bss_desc,
                               u8 **buffer);
-void mwifiex_cfg_tx_buf(struct mwifiex_private *priv,
-                       struct mwifiex_bssdescriptor *bss_desc);
 void mwifiex_fill_cap_info(struct mwifiex_private *, u8 radio_type,
                           struct mwifiex_ie_types_htcap *);
 int mwifiex_set_get_11n_htcap_cfg(struct mwifiex_private *priv,
index f0a634d237c12ecc9b2efbdd0e65f5215af8f223..a537297866c610e179788821ed26d4f402dd1a7a 100644 (file)
@@ -398,8 +398,6 @@ int mwifiex_cmd_802_11_associate(struct mwifiex_private *priv,
 
        pos = (u8 *) assoc;
 
-       mwifiex_cfg_tx_buf(priv, bss_desc);
-
        cmd->command = cpu_to_le16(HostCmd_CMD_802_11_ASSOCIATE);
 
        /* Save so we know which BSS Desc to use in the response handler */