summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHu Wang <huw@codeaurora.org>2016-08-25 15:15:54 +0800
committerqcabuildsw <qcabuildsw@localhost>2016-10-18 09:03:03 -0700
commit1f2b8a899bcff3f8803e356c1709a24e2259240e (patch)
treee014e877a4af0005c95208c87d45f803329679d7
parente22c4a0e678548013490787d1d29f7b0bfdc453d (diff)
qcacld-3.0: Report max MCS index 8 for VHT20
qcacld-2.0 to qcacld-3.0 propagation Currently driver reports max MCS index 9 for VHT20, but cfg802.11 doesn't support such case, which leads to link speed null returned to upper-layer. Update the driver to report max MCS index 8 for VHT20. Change-Id: I06c97db85d88decf418be602cb5f64135f61a686 CRs-Fixed: 1005141
-rw-r--r--core/hdd/src/wlan_hdd_stats.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c
index 6a1fc5a57085..c24dfe39d2c2 100644
--- a/core/hdd/src/wlan_hdd_stats.c
+++ b/core/hdd/src/wlan_hdd_stats.c
@@ -1864,8 +1864,15 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
maxMCSIdx = 8;
else if (DATA_RATE_11AC_MAX_MCS_9 ==
vhtMaxMcs) {
- /* VHT20 is supporting 0~8 */
- if (rate_flags & eHAL_TX_RATE_VHT20)
+ /*
+ * IEEE_P802.11ac_2013.pdf page 325, 326
+ * - MCS9 is valid for VHT20 when
+ * Nss = 3 or Nss = 6
+ * - MCS9 is not valid for VHT20 when
+ * Nss = 1,2,4,5,7,8
+ */
+ if ((rate_flags & eHAL_TX_RATE_VHT20) &&
+ (nss != 3 && nss != 6))
maxMCSIdx = 8;
else
maxMCSIdx = 9;
@@ -1973,6 +1980,18 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
maxSpeedMCS = 1;
maxMCSIdx =
pAdapter->hdd_stats.ClassA_stat.mcs_index;
+ /*
+ * IEEE_P802.11ac_2013.pdf page 325, 326
+ * - MCS9 is valid for VHT20 when
+ * Nss = 3 or Nss = 6
+ * - MCS9 is not valid for VHT20 when
+ * Nss = 1,2,4,5,7,8
+ */
+ if ((rate_flags & eHAL_TX_RATE_VHT20) &&
+ (maxMCSIdx > 8) &&
+ (nss != 3 && nss != 6)) {
+ maxMCSIdx = 8;
+ }
}
}