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. Fixes: 584b4bfff5ce ("wifi: mac80211: pass parsed TPE data to drivers") Signed-off-by: Rory Little <rory@xxxxxxxxxxxxxxx> --- 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(-) diff --git a/net/mac80211/parse.c b/net/mac80211/parse.c index 28aae14db8a9..36a844e536e6 100644 --- a/net/mac80211/parse.c +++ b/net/mac80211/parse.c @@ -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: -- 2.34.1