]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: mac80211: carry element parsing frame type/from_ap
authorJohannes Berg <johannes.berg@intel.com>
Tue, 28 Apr 2026 09:25:31 +0000 (11:25 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 5 May 2026 12:49:02 +0000 (14:49 +0200)
Carry the frame type and from_ap indication in the parse
result, the caller should have it, but we often pass the
resulting data structure around, so this saves passing
more parameters.

Link: https://patch.msgid.link/20260428112708.e8e6479f6765.I4a56ad20d40bdbbaa72531208e092eb4fbf6b4d6@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/ieee80211_i.h
net/mac80211/parse.c

index b456b34a92ce20c5272ab5a64d8613d25a3e5fa3..fc4424b125c13b9a8c8738e8223c6605b9504d29 100644 (file)
@@ -1790,6 +1790,8 @@ struct ieee802_11_elems {
        const u8 *ie_start;
        size_t total_len;
        u32 crc;
+       u8 frame_type;
+       bool from_ap;
 
        /* pointers to IEs */
        const struct ieee80211_tdls_lnkie *lnk_id;
index 2b3632c6008af254cd529197190ee3f73cbb7f9d..5e61457be0f34697cd26188383815ddf7bc6e67b 100644 (file)
@@ -1053,6 +1053,9 @@ ieee802_11_parse_elems_full(struct ieee80211_elems_parse_params *params)
        if (!elems_parse)
                return NULL;
 
+       elems_parse->elems.frame_type = params->type;
+       elems_parse->elems.from_ap = params->from_ap;
+
        elems_parse->scratch_len = scratch_len;
        elems_parse->scratch_pos = elems_parse->scratch;