summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2026-09-28 19:38:31 +0200
committerJohannes Berg <johannes.berg@intel.com>2026-10-05 15:11:20 +0200
commitd160663ca2fadfa0ffbb674f8b3141c064c1d546 (patch)
tree24987597cb630d2bd157c224196ef8839a710df1
parent4ff2e13b696fad5ce36881e395e9844fa662b57b (diff)
wifi: mac80211: fix TPE in channel switch wrapper parsing
WLAN_EID_TX_POWER_ENVELOPE is a regular (non-extended) element, but I accidentally used cfg80211_find_ext_elem for it, and it should be a loop since multiple can be given. Fix both issues. Link: https://patch.msgid.link/20260928193832.a3deb0415eaf.I8b07b323ba83173b570bc07ed61f4130b8aff04f@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/mac80211/parse.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/mac80211/parse.c b/net/mac80211/parse.c
index 3b66ca7d7a5c..030da4679ca3 100644
--- a/net/mac80211/parse.c
+++ b/net/mac80211/parse.c
@@ -692,9 +692,8 @@ _ieee802_11_parse_elems_full(struct ieee80211_elems_parse_params *params,
IEEE80211_PARSE_ERR_BAD_ELEM_SIZE;
}
- subelem = cfg80211_find_ext_elem(WLAN_EID_TX_POWER_ENVELOPE,
- pos, elen);
- if (subelem)
+ for_each_element_id(subelem, WLAN_EID_TX_POWER_ENVELOPE,
+ pos, elen)
ieee80211_parse_tpe(&elems->csa_tpe,
subelem->data + 1,
subelem->datalen - 1);