diff options
| author | Service qcabuildsw <qcabuildsw@localhost> | 2016-11-18 15:40:45 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-11-18 15:40:45 -0800 |
| commit | 3a9ebfe6ccbf7d6702d2aa957ff71c1bee87ac4b (patch) | |
| tree | 2855f0ff59ec66cd30133bca6137dd210c5816f0 | |
| parent | 7418a87ce4e4fc74ba4736036a226fa2f8fe2b40 (diff) | |
| parent | 575415a8cfcef96dbacd4e6ddea298a8527c3d01 (diff) | |
Merge "qcacld-3.0: Default to MSC 0 when reporting invalid link speed" into wlan-cld3.driver.lnx.1.1-dev
| -rw-r--r-- | core/hdd/src/wlan_hdd_stats.c | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index b6357027e902..11e98cd3cacc 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -1682,6 +1682,7 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter); int ssidlen = pHddStaCtx->conn_info.SSID.SSID.length; uint8_t rate_flags; + uint8_t mcs_index; hdd_context_t *pHddCtx = (hdd_context_t *) wiphy_priv(wiphy); struct hdd_config *pCfg = pHddCtx->config; @@ -1772,6 +1773,7 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, hdd_lpass_notify_connect(pAdapter); rate_flags = pAdapter->hdd_stats.ClassA_stat.tx_rate_flags; + mcs_index = pAdapter->hdd_stats.ClassA_stat.mcs_index; /* convert to the UI units of 100kbps */ myRate = pAdapter->hdd_stats.ClassA_stat.tx_rate * 5; @@ -1785,18 +1787,14 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, promiscuous_rx_frag_cnt; } - if (pAdapter->hdd_stats.ClassA_stat.mcs_index == - INVALID_MCS_IDX) { - rate_flags = eHAL_TX_RATE_LEGACY; - pAdapter->hdd_stats.ClassA_stat.mcs_index = 0; - } + if (mcs_index == INVALID_MCS_IDX) + mcs_index = 0; } hdd_info("RSSI %d, RLMS %u, rate %d, rssi high %d, rssi mid %d, rssi low %d, rate_flags 0x%x, MCS %d", sinfo->signal, pCfg->reportMaxLinkSpeed, myRate, (int)pCfg->linkSpeedRssiHigh, (int)pCfg->linkSpeedRssiMid, - (int)pCfg->linkSpeedRssiLow, (int)rate_flags, - (int)pAdapter->hdd_stats.ClassA_stat.mcs_index); + (int)pCfg->linkSpeedRssiLow, (int)rate_flags, (int)mcs_index); #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)) || defined(WITH_BACKPORTS) /* assume basic BW. anything else will override this later */ @@ -1957,24 +1955,21 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, if (rate_flags & eHAL_TX_RATE_VHT80) { currentRate = - supported_vht_mcs_rate[pAdapter-> - hdd_stats.ClassA_stat.mcs_index]. + supported_vht_mcs_rate[mcs_index]. supported_VHT80_rate[rateFlag]; maxRate = supported_vht_mcs_rate[maxMCSIdx]. supported_VHT80_rate[rateFlag]; } else if (rate_flags & eHAL_TX_RATE_VHT40) { currentRate = - supported_vht_mcs_rate[pAdapter-> - hdd_stats.ClassA_stat.mcs_index]. + supported_vht_mcs_rate[mcs_index]. supported_VHT40_rate[rateFlag]; maxRate = supported_vht_mcs_rate[maxMCSIdx]. supported_VHT40_rate[rateFlag]; } else if (rate_flags & eHAL_TX_RATE_VHT20) { currentRate = - supported_vht_mcs_rate[pAdapter-> - hdd_stats.ClassA_stat.mcs_index]. + supported_vht_mcs_rate[mcs_index]. supported_VHT20_rate[rateFlag]; maxRate = supported_vht_mcs_rate[maxMCSIdx]. @@ -2036,7 +2031,7 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, else if (!(rate_flags & eHAL_TX_RATE_LEGACY)) { maxRate = myRate; maxSpeedMCS = 1; - maxMCSIdx = pAdapter->hdd_stats.ClassA_stat.mcs_index; + maxMCSIdx = mcs_index; } /* report a value at least as big as current rate */ if ((maxRate < myRate) || (0 == maxRate)) { @@ -2045,8 +2040,7 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, maxSpeedMCS = 0; } else { maxSpeedMCS = 1; - maxMCSIdx = - pAdapter->hdd_stats.ClassA_stat.mcs_index; + maxMCSIdx = mcs_index; /* * IEEE_P802.11ac_2013.pdf page 325, 326 * - MCS9 is valid for VHT20 when @@ -2128,8 +2122,7 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, #endif /* LINKSPEED_DEBUG_ENABLED */ } else { /* must be MCS */ - sinfo->txrate.mcs = - pAdapter->hdd_stats.ClassA_stat.mcs_index; + sinfo->txrate.mcs = mcs_index; sinfo->txrate.nss = nss; sinfo->txrate.flags |= RATE_INFO_FLAGS_VHT_MCS; if (rate_flags & eHAL_TX_RATE_VHT80) { |
