From 05475a7868348e7a75bfaa7a0cf8bad260267729 Mon Sep 17 00:00:00 2001 From: Liangwei Dong Date: Wed, 9 Aug 2017 13:39:57 +0900 Subject: [PATCH] qcacld-3.0: Fix nss value zero issue If DUT connects to 1x1 AP in DBS mode, the nss value will be reduced to 0 in current logic. Fix by checking the nss > 1 before reduce. Change-Id: I908ba358411ec7c99f57bb472a0d52a24e0422c3 CRs-Fixed: 2089211 --- core/hdd/src/wlan_hdd_stats.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index 9844189eafbb..fbcd9c1f3e88 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -3208,8 +3208,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"); + if ((nss > 1) && + policy_mgr_is_current_hwmode_dbs(pHddCtx->hdd_psoc) && + !policy_mgr_is_hw_dbs_2x2_capable(pHddCtx->hdd_psoc)) { + hdd_debug("Hw mode is DBS, Reduce nss(%d) to 1", nss); nss--; }