ath10k: Enable the MCS8 and MCS9 at 2.4G band
authorYanbo Li <yanbol@qti.qualcomm.com>
Fri, 23 Jan 2015 00:18:20 +0000 (08:18 +0800)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 29 Jan 2015 10:25:17 +0000 (12:25 +0200)
Enable the MCS8 and MCS9 support for 2.4G band, it will
use these data rate with other devices having the same
capability.

Signed-off-by: Yanbo Li <yanbol@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/mac.c
drivers/net/wireless/ath/ath10k/wmi.h

index 4ee74f660443a92edd06602ba600eba82dd52eda..f9440deffa261efcc693859b8c086dd00a34af2e 100644 (file)
@@ -1586,6 +1586,10 @@ static void ath10k_peer_assoc_h_vht(struct ath10k *ar,
                return;
 
        arg->peer_flags |= WMI_PEER_VHT;
+
+       if (ar->hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ)
+               arg->peer_flags |= WMI_PEER_VHT_2G;
+
        arg->peer_vht_caps = vht_cap->cap;
 
        ampdu_factor = (vht_cap->cap &
@@ -1664,7 +1668,12 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar,
 
        switch (ar->hw->conf.chandef.chan->band) {
        case IEEE80211_BAND_2GHZ:
-               if (sta->ht_cap.ht_supported) {
+               if (sta->vht_cap.vht_supported) {
+                       if (sta->bandwidth == IEEE80211_STA_RX_BW_40)
+                               phymode = MODE_11AC_VHT40;
+                       else
+                               phymode = MODE_11AC_VHT20;
+               } else if (sta->ht_cap.ht_supported) {
                        if (sta->bandwidth == IEEE80211_STA_RX_BW_40)
                                phymode = MODE_11NG_HT40;
                        else
@@ -5301,7 +5310,8 @@ int ath10k_mac_register(struct ath10k *ar)
                band->bitrates = ath10k_g_rates;
                band->ht_cap = ht_cap;
 
-               /* vht is not supported in 2.4 GHz */
+               /* Enable the VHT support at 2.4 GHz */
+               band->vht_cap = vht_cap;
 
                ar->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = band;
        }
index 4b654083b85727ed769b74237ed368f8adddf05a..20ce3603e64b73374aeb1ce452a930092189e974 100644 (file)
@@ -4514,7 +4514,7 @@ struct wmi_peer_set_q_empty_callback_cmd {
 #define WMI_PEER_SPATIAL_MUX    0x00200000
 #define WMI_PEER_VHT            0x02000000
 #define WMI_PEER_80MHZ          0x04000000
-#define WMI_PEER_PMF            0x08000000
+#define WMI_PEER_VHT_2G         0x08000000
 
 /*
  * Peer rate capabilities.