summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArunk Khandavalli <akhandav@codeaurora.org>2016-11-14 23:14:06 +0530
committerqcabuildsw <qcabuildsw@localhost>2016-11-29 16:07:35 -0800
commit85d956be26ce08a04fd04e9118e15be3c975ee21 (patch)
tree82f4637ce98c5e973ab7788020be08d0eb98f778
parentd2e230f8bd088bb44e5fd569f3d5982d7e0ccf4c (diff)
qcacld-3.0: Fill STATION_INFO_SIGNAL when returning cached value to upperlayer
qcacld-2.0 to qcacld-3.0 propogation. When there is an get_station request from the upper layer during roaming, the driver returns a cached rssi value but it dosent set the "sinfo->filled" (station_info_flags) bit flag for the NL80211_STA_INFO_SIGNAL. If this flag is not set the kernel dosen't update the cached rssi value to upper layer. To mitigate this issue, set the "sinfo->filled" when returning the cached value to the upper layer during roaming. CRs-Fixed: 1084502 Change-Id: If62f7482c8153131daa2d0ea83596e5cd4e3f104
-rw-r--r--core/hdd/src/wlan_hdd_stats.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c
index 95e68b93c902..50638d3eafcb 100644
--- a/core/hdd/src/wlan_hdd_stats.c
+++ b/core/hdd/src/wlan_hdd_stats.c
@@ -1707,6 +1707,20 @@ void wlan_hdd_cfg80211_stats_ext_callback(void *ctx,
}
#endif /* End of WLAN_FEATURE_STATS_EXT */
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)) && !defined(WITH_BACKPORTS)
+static inline void wlan_hdd_fill_station_info_signal(struct station_info
+ *sinfo)
+{
+ sinfo->filled |= STATION_INFO_SIGNAL;
+}
+#else
+static inline void wlan_hdd_fill_station_info_signal(struct station_info
+ *sinfo)
+{
+ sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
+}
+#endif
+
/**
* __wlan_hdd_cfg80211_get_station() - get station statistics
* @wiphy: Pointer to wiphy
@@ -1783,6 +1797,7 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
* send the cached rssi when get_station
*/
sinfo->signal = pAdapter->rssi;
+ wlan_hdd_fill_station_info_signal(sinfo);
return 0;
}
@@ -1801,11 +1816,7 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
pHddStaCtx->conn_info.noise =
pHddStaCtx->conn_info.signal - snr;
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)) && !defined(WITH_BACKPORTS)
- sinfo->filled |= STATION_INFO_SIGNAL;
-#else
- sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
-#endif
+ wlan_hdd_fill_station_info_signal(sinfo);
/*
* we notify connect to lpass here instead of during actual