qcacld-3.0: Handle positive RSSI case in stats

The HW is capable to send the RSSI from the range
0-127, and when the driver normalizes it with the
noise margin of -96db, then it may happen that the
net RSSI is still positive if the reported RSSI is
greater than 96 db. If this happens then the GUI
shows 0 signal as it considers this RSSI positive
value to be invalid, though the RSSI was very strong.

Fix is to override the RSSI as 0 if the net RSSI
obtained after normalization is positive.

Change-Id: Id00a2ef3bafe77a033627931ae62cd11f3ba4f27
CRs-Fixed: 2606589
This commit is contained in:
gaurank kathpalia 2020-01-20 18:16:44 +05:30 committed by nshrivas
parent 37151a5812
commit 17b132d897

View File

@ -4520,6 +4520,13 @@ static int wlan_hdd_get_sta_stats(struct wiphy *wiphy,
&adapter->rssi, &snr);
}
/* If RSSi is reported as positive then it is invalid */
if (adapter->rssi > 0) {
hdd_debug_rl("RSSI invalid %d", adapter->rssi);
adapter->rssi = 0;
adapter->hdd_stats.summary_stat.rssi = 0;
}
sinfo->signal = adapter->rssi;
hdd_debug("snr: %d, rssi: %d",
adapter->hdd_stats.summary_stat.snr,