ipq807x: Shorten the kernel backtrace warning msg for ieee80211_bss_get_elem

Fixes: WIFI-11006
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
This commit is contained in:
Tanya Singh
2024-10-24 11:46:59 +08:00
committed by John Crispin
parent f15e10bfdb
commit eb9cbaec72
2 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -1404,9 +1404,11 @@ static u32 cfg80211_calculate_bitrate_he
if (WARN_ON_ONCE(rate->he_ru_alloc >
NL80211_RATE_INFO_HE_RU_ALLOC_2x996))
return 0;
- if (WARN_ON_ONCE(rate->nss < 1 || rate->nss > 8))
+ if (rate->nss < 1 || rate->nss > 8) {
+ printk_once(1, "invalid rate->nss: %d\n", rate->nss);
return 0;
-
+ }
+
if (rate->bw == RATE_INFO_BW_160)
result = rates_160M[rate->he_gi];
else if (rate->bw == RATE_INFO_BW_80 ||