summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2024-06-12 10:05:33 +0200
committerJohannes Berg <johannes.berg@intel.com>2024-06-12 12:25:54 +0200
commit5f12dd57a071daf896c00cb4572f2baebbddbb46 (patch)
tree4d2ddf82a5a80e02b0d7cd1af753bfdd7428b721 /net
parentMerge branch 'intel-wired-lan-driver-updates-2024-06-03' (diff)
downloadlinux-5f12dd57a071daf896c00cb4572f2baebbddbb46.tar.xz
linux-5f12dd57a071daf896c00cb4572f2baebbddbb46.zip
wifi: mac80211: correct EHT EIRP TPE parsing
For the EHT EIRP transmit power envelope, the 320 MHz is in the last octet, but if we've copied 4 octets (count == 3), the next one is at index 4 not 5 (count + 2). Fix this, and just hardcode the offset since count is always 3 here. Fixes: 39dc8b8ea387 ("wifi: mac80211: pass parsed TPE data to drivers") Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240612100533.f96c1e0fb758.I2f301c4341abb44dafd29128e7e32c66dc0e296d@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/parse.c b/net/mac80211/parse.c
index 28aae14db8a9..279c5143b335 100644
--- a/net/mac80211/parse.c
+++ b/net/mac80211/parse.c
@@ -235,7 +235,7 @@ 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];
+ out[4] = env->variable[4];
*cnt_out = 5;
}
break;