Jelajahi Sumber

qcacld-3.0: Update correct RSSI for connected case getstainfo

When a station is connected to SAP and host driver receives
getstainfo command, it gives rssi info as part of tihs command.
Currently host driver does not update this rssi information
correctly because of which userspace is getting rssi info as
positive value which is not correct.

To address above issue, update rssi info correctly in the host
driver.

Change-Id: I87033184644a1d246f8669c74153c46837a35276
CRs-Fixed: 3184344
Ashish 2 tahun lalu
induk
melakukan
cd5571ea06
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      core/hdd/src/wlan_hdd_stats.c

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

@@ -5240,7 +5240,7 @@ static int wlan_hdd_get_station_remote(struct wiphy *wiphy,
 
 	for (i = 0; i < WMI_MAX_CHAINS; i++)
 		stainfo->peer_rssi_per_chain[i] =
-			    stats->peer_stats_info_ext->peer_rssi_per_chain[i] +
+			    stats->peer_stats_info_ext->peer_rssi_per_chain[i] -
 			    WLAN_HDD_TGT_NOISE_FLOOR_DBM;
 
 	qdf_mem_zero(&txrx_stats, sizeof(txrx_stats));
@@ -5252,7 +5252,7 @@ static int wlan_hdd_get_station_remote(struct wiphy *wiphy,
 	txrx_stats.tx_failed = stats->peer_stats_info_ext->tx_failed;
 	txrx_stats.tx_succeed = stats->peer_stats_info_ext->tx_succeed;
 	txrx_stats.rssi = stats->peer_stats_info_ext->rssi
-			+ WLAN_HDD_TGT_NOISE_FLOOR_DBM;
+			- WLAN_HDD_TGT_NOISE_FLOOR_DBM;
 	wlan_hdd_fill_rate_info(&txrx_stats, stats->peer_stats_info_ext);
 	wlan_hdd_fill_station_info(hddctx->psoc, adapter,
 				   sinfo, stainfo, &txrx_stats);