Browse Source

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
gaurank kathpalia 5 years ago
parent
commit
17b132d897
1 changed files with 7 additions and 0 deletions
  1. 7 0
      core/hdd/src/wlan_hdd_stats.c

+ 7 - 0
core/hdd/src/wlan_hdd_stats.c

@@ -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,