From 569ad261ac437cfe07d1161bfb2709da7e92e3ff Mon Sep 17 00:00:00 2001 From: Agrawal Ashish Date: Mon, 1 May 2017 14:06:36 +0530 Subject: [PATCH] qcacld-3.0: Correct NSS in case of DBS hw mode In case of DBS hw mode, NSS should be reduce by 1 Change-Id: I3d3f0dbd23a7336eb448628ade763668041a640d CRs-Fixed: 2038087 --- core/hdd/src/wlan_hdd_stats.c | 4 ++++ core/hdd/src/wlan_hdd_wext.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index f96a2e0e6f2c..c08c0af01e9d 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -3143,6 +3143,10 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, myRate = pAdapter->hdd_stats.ClassA_stat.tx_rate * 5; if (!(rate_flags & eHAL_TX_RATE_LEGACY)) { nss = pAdapter->hdd_stats.ClassA_stat.nss; + if (policy_mgr_is_current_hwmode_dbs(pHddCtx->hdd_psoc)) { + hdd_debug("Hw mode is DBS, Reduce nss to 1"); + nss--; + } if (eHDD_LINK_SPEED_REPORT_ACTUAL == pCfg->reportMaxLinkSpeed) { /* Get current rate flags if report actual */ diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index bfbf064d8638..46973971ee4b 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -9162,6 +9162,8 @@ static int __iw_setnone_getint(struct net_device *dev, { sme_get_config_param(hHal, &smeConfig); *value = (smeConfig.csrConfig.enable2x2 == 0) ? 1 : 2; + if (policy_mgr_is_current_hwmode_dbs(hdd_ctx->hdd_psoc)) + *value = *value-1; hdd_debug("GET_NSS: Current NSS:%d", *value); break; }