소스 검색

qcacld-3.0: Fill actual rates if max rates calculation fails

Currently if host driver needs to fill max rates info as part of
get sta stats and if it fails to calculate the max rates info,
it does not fill any rate info and also does not fill other stats
like rssi, because of this user space shows incorrect stats.

To address above issue, fill actual rates info if driver fails to
calculate max rates info and also fill other stats as well.

Change-Id: I386fbc5a0dbe4f2abc6bac202ddfa49edd2c5b99
CRs-Fixed: 3278808
Ashish Kumar Dhanotiya 2 년 전
부모
커밋
f926a46bc2
1개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. 7 3
      core/hdd/src/wlan_hdd_stats.c

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

@@ -6262,9 +6262,13 @@ static int wlan_hdd_get_sta_stats(struct wiphy *wiphy,
 						   rx_nss_max);
 
 		if (!tx_rate_calc || !rx_rate_calc) {
-			hdd_objmgr_put_vdev_by_user(vdev, WLAN_OSIF_STATS_ID);
-			/* Keep GUI happy */
-			return 0;
+			hdd_report_actual_rate(tx_rate_flags, my_tx_rate,
+					       &sinfo->txrate, tx_mcs_index,
+					       tx_nss, tx_dcm, tx_gi);
+
+			hdd_report_actual_rate(rx_rate_flags, my_rx_rate,
+					       &sinfo->rxrate, rx_mcs_index,
+					       rx_nss, rx_dcm, rx_gi);
 		}
 	} else {
 		uint8_t rx_nss_max, rx_preamble;