Przeglądaj źródła

qcacld-3.0: Fix rssi -128 issue on UI

If RSSI value driver sent is larger than 0, android framework will treat
it as -128, show level 0 on UI

To fix it, if RSSI larger than 0, driver reset it to -1 before send to
upper layer.

CRs-Fixed: 3673537
Change-Id: I09f014eb2fc077292e3b2cbe6ffe8bb62a62258c
Jianmin Zhu 1 rok temu
rodzic
commit
20ac103f2c
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      core/hdd/src/wlan_hdd_stats.c

+ 4 - 4
core/hdd/src/wlan_hdd_stats.c

@@ -7458,10 +7458,10 @@ static void wlan_hdd_update_rssi(struct wlan_hdd_link_info *link_info,
 	}
 
 	/* If RSSi is reported as positive then it is invalid */
-	if (link_info->rssi > 0) {
-		hdd_debug_rl("RSSI invalid %d", link_info->rssi);
-		link_info->rssi = 0;
-		link_info->hdd_stats.summary_stat.rssi = 0;
+	if (link_info->rssi >= 0) {
+		hdd_debug_rl("Invalid RSSI %d, reset to -1", link_info->rssi);
+		link_info->rssi = -1;
+		link_info->hdd_stats.summary_stat.rssi = -1;
 	}
 
 	sinfo->signal = link_info->rssi;