wifi: mac80211: Fix 320 MHz max TPE field parsing.
PATCH 1/1 wifi: mac80211: Fix 320 MHz max TPE field parsing.
Transmit Power Count will be one less than the number of HE fields, so if we do find an extension field, its index will be this number, plus one, rather than two.
This fixes an issue noted in the iwlmvm driver, where clients associated at 320 MHz had degraded performance.
---
We noticed and recently reported a 20-30% drop in transmit throughput on BE200 radios, and have identified the issue as being that the TPE sent to the firmware did not match the TPE reported by the AP. The fault appears to be an off-by-one error in IE parsing logic. This patch fixes that error.
net/mac80211/parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/mac80211/parse.c +2 -2
@@ -235,8 +235,8 @@ static void ieee80211_parse_tpe(struct ieee80211_parsed_tpe *tpe, *cnt_out = count +1 ;/* separately take 320 MHz if present */ if (count ==3 && len >sizeof (*env) + count +1 ) { - out[4 ] = env->variable[count +2 ]; - *cnt_out =5 ; + out[4 ] = env->variable[count +1 ]; + *cnt_out = count +2 ; }break ;case IEEE80211_TPE_LOCAL_EIRP_PSD :
Signature · 1 line
2.34.1
Johannes Berg
maintainerQuoted 7 lines · Rory Little
Transmit Power Count will be one less than the number of HE fields, so if we do find an extension field, its index will be this number, plus one, rather than two.
This fixes an issue noted in the iwlmvm driver, where clients associated at 320 MHz had degraded performance.
Quoted 9 lines
Fixes 584b4bfff5ce ("wifi: mac80211: pass parsed TPE data to drivers")Signed-off-by Rory Little <[email protected]>---
We noticed and recently reported a 20-30% drop in transmit throughput on BE200 radios, and have identified the issue as being that the TPE sent to the firmware did not match the TPE reported by the AP. The fault appears to be an off-by-one error in IE parsing logic. This patch fixes that error.
This should be equivalent to my previous fix 5f12dd57a071 ("wifi:
mac80211: correct EHT EIRP TPE parsing")
johannes