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
This commit is contained in:
Liangwei Dong 2017-08-09 13:39:57 +09:00 • committed by snandini
commit 05475a7868

View file

@ -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--;
}