mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
qcacld-3.0: update the adapter->rssi from fw
Currently, sta's adapter.rssi does not reset when disconnect with the previous ap and for new connection there might be no valid rssi so it will get 0 when hdd_get_station_statistics_cb or hdd_get_rssi_cb is invoking. Then it uses the previous ap's rssi for the new conneciton. Per the code logic, it is ok to set adapter.rssi with 0 value. Because it invokes hdd_get_rssi_snr_by_bssid to get the rssi & snr when issue happens. Change-Id: I737cfcf16d58501546f2fceab06ed1e5418e7b06 CRs-Fixed: 2199782
This commit is contained in:
parent
47b4b77dc3
commit
b1f35df0b0
1 changed files with 5 additions and 10 deletions
|
|
@ -3971,18 +3971,17 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
|
|||
|
||||
wlan_hdd_get_station_stats(adapter);
|
||||
|
||||
if (adapter->hdd_stats.summary_stat.rssi)
|
||||
adapter->rssi = adapter->hdd_stats.summary_stat.rssi;
|
||||
adapter->rssi = adapter->hdd_stats.summary_stat.rssi;
|
||||
snr = adapter->hdd_stats.summary_stat.snr;
|
||||
|
||||
/* for new connection there might be no valid previous RSSI */
|
||||
if (!adapter->rssi) {
|
||||
hdd_get_rssi_snr_by_bssid(adapter,
|
||||
sta_ctx->conn_info.bssId.bytes,
|
||||
&adapter->rssi, NULL);
|
||||
&adapter->rssi, &snr);
|
||||
}
|
||||
|
||||
sinfo->signal = adapter->rssi;
|
||||
snr = adapter->hdd_stats.summary_stat.snr;
|
||||
hdd_debug("snr: %d, rssi: %d",
|
||||
adapter->hdd_stats.summary_stat.snr,
|
||||
adapter->hdd_stats.summary_stat.rssi);
|
||||
|
|
@ -5061,12 +5060,8 @@ QDF_STATUS wlan_hdd_get_rssi(struct hdd_adapter *adapter, int8_t *rssi_value)
|
|||
} else {
|
||||
/* update the adapter with the fresh results */
|
||||
priv = hdd_request_priv(request);
|
||||
/*
|
||||
* update rssi only if its valid else return previous
|
||||
* valid rssi.
|
||||
*/
|
||||
if (priv->rssi)
|
||||
adapter->rssi = priv->rssi;
|
||||
|
||||
adapter->rssi = priv->rssi;
|
||||
|
||||
/*
|
||||
* for new connection there might be no valid previous
|
||||
|
|
|
|||
Loading…
Reference in a new issue