]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mwifiex: do not update MCS set from hostapd
authorGanapathi Bhat <gbhat@marvell.com>
Wed, 28 Jun 2017 06:56:58 +0000 (12:26 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 30 Jun 2017 06:54:59 +0000 (09:54 +0300)
We should not copy the MCS set from hostapd RX-STBC. We
have to just use the MCS set supported by the hardware.
This fixes an issue, where mwifiex is advertising wrong
MCS sets in beacons.

Fixes: 474a41e94dfc ("mwifiex: update MCS set as per RX-STBC bit from hostapd")
Signed-off-by: Ganapathi Bhat <gbhat@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/fw.h
drivers/net/wireless/marvell/mwifiex/uap_cmd.c

index b4d915b9232c9c207b64958d0c684636adbd4e0d..9e75522d248a3e621ee9a8d6a5cca5e9c0bab4e8 100644 (file)
@@ -247,11 +247,6 @@ enum MWIFIEX_802_11_PRIVACY_FILTER {
 
 #define MWIFIEX_DEF_AMPDU      IEEE80211_HT_AMPDU_PARM_FACTOR
 
-#define GET_RXSTBC(x) (x & IEEE80211_HT_CAP_RX_STBC)
-#define MWIFIEX_RX_STBC1       0x0100
-#define MWIFIEX_RX_STBC12      0x0200
-#define MWIFIEX_RX_STBC123     0x0300
-
 /* dev_cap bitmap
  * BIT
  * 0-16                reserved
index 35d8636bdb91d14c50b70e72c32e7ab0e10be3c0..477c29c9f5d90c0f1b3880149e955264d33e7207 100644 (file)
@@ -160,7 +160,6 @@ mwifiex_set_ht_params(struct mwifiex_private *priv,
                      struct cfg80211_ap_settings *params)
 {
        const u8 *ht_ie;
-       u16 cap_info;
 
        if (!ISSUPP_11NENABLED(priv->adapter->fw_cap_info))
                return;
@@ -170,27 +169,6 @@ mwifiex_set_ht_params(struct mwifiex_private *priv,
        if (ht_ie) {
                memcpy(&bss_cfg->ht_cap, ht_ie + 2,
                       sizeof(struct ieee80211_ht_cap));
-               cap_info = le16_to_cpu(bss_cfg->ht_cap.cap_info);
-               memset(&bss_cfg->ht_cap.mcs, 0,
-                      priv->adapter->number_of_antenna);
-               switch (GET_RXSTBC(cap_info)) {
-               case MWIFIEX_RX_STBC1:
-                       /* HT_CAP 1X1 mode */
-                       bss_cfg->ht_cap.mcs.rx_mask[0] = 0xff;
-                       break;
-               case MWIFIEX_RX_STBC12: /* fall through */
-               case MWIFIEX_RX_STBC123:
-                       /* HT_CAP 2X2 mode */
-                       bss_cfg->ht_cap.mcs.rx_mask[0] = 0xff;
-                       bss_cfg->ht_cap.mcs.rx_mask[1] = 0xff;
-                       break;
-               default:
-                       mwifiex_dbg(priv->adapter, WARN,
-                                   "Unsupported RX-STBC, default to 2x2\n");
-                       bss_cfg->ht_cap.mcs.rx_mask[0] = 0xff;
-                       bss_cfg->ht_cap.mcs.rx_mask[1] = 0xff;
-                       break;
-               }
                priv->ap_11n_enabled = 1;
        } else {
                memset(&bss_cfg->ht_cap, 0, sizeof(struct ieee80211_ht_cap));