Browse Source

qcacld-3.0: Fix rx rate report issues in some legacy cases

Driver will refill rx rates info which has been filled according
to the rateflags obtained from FW. The problem occurs when DP
receives legacy data whereas the rateflags do not contain legacy
bit. This will lead to the GUI displaying non-legacy rates.This
change clears the rate flag to ensure kernel to use legacy rates.

Change-Id: I93f30170b6a4dd742d8c653ef62f82190f1da2ee
CRs-Fixed: 3277906
jinbaoliu 2 years ago
parent
commit
c2cd820a34
1 changed files with 8 additions and 0 deletions
  1. 8 0
      core/hdd/src/wlan_hdd_stats.c

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

@@ -6020,6 +6020,11 @@ wlan_hdd_refill_actual_rate(struct rate_info *os_rate,
 	os_rate->nss = nss;
 	if (preamble == DOT11_A || preamble == DOT11_B) {
 		os_rate->legacy = rate;
+		/*
+		 * Clear os rate flags set by hdd_report_actual_rate(),
+		 * otherwise, kernel will not display legacy rate
+		 */
+		os_rate->flags = 0;
 		hdd_debug("Reporting legacy rate %d", os_rate->legacy);
 		return;
 	}
@@ -6035,6 +6040,9 @@ wlan_hdd_refill_actual_rate(struct rate_info *os_rate,
 
 	if (guard_interval == TXRATE_GI_0_4_US)
 		os_rate->flags |= RATE_INFO_FLAGS_SHORT_GI;
+
+	hdd_debug("sgi=%d, preamble=%d, bw=%d, mcs=%d, nss=%d, rate_flag=0x%x",
+		  guard_interval, preamble, bw, mcs_index, nss, os_rate->flags);
 }
 #else
 static inline void