summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbings <bings@codeaurora.org>2018-11-05 10:08:01 +0800
committerbings <bings@codeaurora.org>2018-11-07 17:11:06 +0800
commitdd3ce456e46af6d6a5c89cf4704fed5c364a59c8 (patch)
tree18aec58042038f92f24456a60ac2b2413a7538b4
parenta124690bb86ca389452e54d640d0849fb28c8c3d (diff)
qcacld-2.0: Initialize bw in get station if 11ac feature is defined
When WLAN_FEATURE_11AC is defined, RATE_INFO_FLAGS_VHT_MCS will be set. Once RATE_INFO_FLAGS_VHT_MCS is set, bw should be no less than RATE_INFO_BW_20. Otherwise cfg80211 treats this as invlid setting. Initialize bw as RATE_INFO_BW_20 if 11ac feature is defined. Change-Id: I3d6174ea366f8e8e10d0efced38492ba47ea6e06 CRs-Fixed: 2342240
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index b48976033dd7..0fd76ae676dc 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -27456,15 +27456,13 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
sinfo->txrate.flags |= RATE_INFO_FLAGS_40_MHZ_WIDTH;
#endif
}
- else if (rate_flags & eHAL_TX_RATE_VHT20)
+ else
{
sinfo->txrate.flags |= RATE_INFO_FLAGS_VHT_MCS;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0))
sinfo->txrate.bw = RATE_INFO_BW_20;
#endif
}
- else
- sinfo->txrate.flags |= RATE_INFO_FLAGS_VHT_MCS;
#endif /* WLAN_FEATURE_11AC */
if (rate_flags & (eHAL_TX_RATE_HT20 | eHAL_TX_RATE_HT40))
{
@@ -27517,6 +27515,9 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
#ifdef WLAN_FEATURE_11AC
sinfo->txrate.nss = nss;
sinfo->txrate.flags |= RATE_INFO_FLAGS_VHT_MCS;
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0))
+ sinfo->txrate.bw = RATE_INFO_BW_20;
+#endif
if (rate_flags & eHAL_TX_RATE_VHT80)
{
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0))