diff options
| author | Johannes Berg <johannes.berg@intel.com> | 2026-09-28 19:38:31 +0200 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2026-10-05 15:11:20 +0200 |
| commit | d160663ca2fadfa0ffbb674f8b3141c064c1d546 (patch) | |
| tree | 24987597cb630d2bd157c224196ef8839a710df1 | |
| parent | 4ff2e13b696fad5ce36881e395e9844fa662b57b (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.c | 5 |
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); |
