From dbd4c2f8a05c3be4e79fbb6a0aac134bc167234c Mon Sep 17 00:00:00 2001 From: "Edhar, Mahesh Kumar" Date: Mon, 21 Jul 2014 19:16:49 +0530 Subject: Update proper rate flags to user space while reporting linkspeed Currently while reporting actual link speed we are not properly updating the HT/VHT rate flags. changes are made to address the same. Change-Id: Icdfb9314379651fd61c9f78e49daedf913b54881 CRS-Fixed: 697046 --- CORE/HDD/src/wlan_hdd_cfg80211.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index a72b2954eaa5..27e549df9870 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -11146,29 +11146,29 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, sinfo->txrate.mcs = pAdapter->hdd_stats.ClassA_stat.mcs_index; #ifdef WLAN_FEATURE_11AC sinfo->txrate.nss = nss; + sinfo->txrate.flags |= RATE_INFO_FLAGS_VHT_MCS; if (rate_flags & eHAL_TX_RATE_VHT80) { - sinfo->txrate.flags |= RATE_INFO_FLAGS_VHT_MCS; + sinfo->txrate.flags |= RATE_INFO_FLAGS_80_MHZ_WIDTH; + } + else if (rate_flags & eHAL_TX_RATE_VHT40) + { + sinfo->txrate.flags |= RATE_INFO_FLAGS_40_MHZ_WIDTH; } - else #endif /* WLAN_FEATURE_11AC */ + if (rate_flags & (eHAL_TX_RATE_HT20 | eHAL_TX_RATE_HT40)) { sinfo->txrate.flags |= RATE_INFO_FLAGS_MCS; + if (rate_flags & eHAL_TX_RATE_HT40) + { + sinfo->txrate.flags |= RATE_INFO_FLAGS_40_MHZ_WIDTH; + } } if (rate_flags & eHAL_TX_RATE_SGI) { + sinfo->txrate.flags |= RATE_INFO_FLAGS_MCS; sinfo->txrate.flags |= RATE_INFO_FLAGS_SHORT_GI; } - if (rate_flags & eHAL_TX_RATE_HT40) - { - sinfo->txrate.flags |= RATE_INFO_FLAGS_40_MHZ_WIDTH; - } -#ifdef WLAN_FEATURE_11AC - else if (rate_flags & eHAL_TX_RATE_VHT80) - { - sinfo->txrate.flags |= RATE_INFO_FLAGS_80_MHZ_WIDTH; - } -#endif /* WLAN_FEATURE_11AC */ #ifdef LINKSPEED_DEBUG_ENABLED pr_info("Reporting actual MCS rate %d flags %x\n", sinfo->txrate.mcs, -- cgit v1.2.3