Browse Source

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
Agrawal Ashish 8 years ago
parent
commit
569ad261ac
2 changed files with 6 additions and 0 deletions
  1. 4 0
      core/hdd/src/wlan_hdd_stats.c
  2. 2 0
      core/hdd/src/wlan_hdd_wext.c

+ 4 - 0
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 */

+ 2 - 0
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;
 	}