This is a note to let you know that I've just added the patch titled mac80211: move CRC into struct ieee802_11_elems to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mac80211-move-crc-into-struct-ieee802_11_elems.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From foo@baz Fri Oct 14 10:18:27 AM CEST 2022 From: Felix Fietkau <nbd@xxxxxxxx> Date: Thu, 13 Oct 2022 20:15:57 +0200 Subject: mac80211: move CRC into struct ieee802_11_elems To: stable@xxxxxxxxxxxxxxx Cc: johannes@xxxxxxxxxxxxxxxx Message-ID: <20221013181601.5712-2-nbd@xxxxxxxx> From: Johannes Berg <johannes.berg@xxxxxxxxx> commit c6e37ed498f958254b5459253199e816b6bfc52f upstream. We're currently returning this value, but to prepare for returning the allocated structure, move it into there. Link: https://lore.kernel.org/r/20210920154009.479b8ebf999d.If0d4ba75ee38998dc3eeae25058aa748efcb2fc9@changeid Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx> Cc: Felix Fietkau <nbd@xxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- net/mac80211/ieee80211_i.h | 9 +++++---- net/mac80211/mlme.c | 9 +++++---- net/mac80211/util.c | 10 +++++----- 3 files changed, 15 insertions(+), 13 deletions(-) --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -1532,6 +1532,7 @@ struct ieee80211_csa_ie { struct ieee802_11_elems { const u8 *ie_start; size_t total_len; + u32 crc; /* pointers to IEs */ const struct ieee80211_tdls_lnkie *lnk_id; @@ -2218,10 +2219,10 @@ static inline void ieee80211_tx_skb(stru ieee80211_tx_skb_tid(sdata, skb, 7); } -u32 ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action, - struct ieee802_11_elems *elems, - u64 filter, u32 crc, u8 *transmitter_bssid, - u8 *bss_bssid); +void ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action, + struct ieee802_11_elems *elems, + u64 filter, u32 crc, u8 *transmitter_bssid, + u8 *bss_bssid); static inline void ieee802_11_parse_elems(const u8 *start, size_t len, bool action, struct ieee802_11_elems *elems, --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -4102,10 +4102,11 @@ static void ieee80211_rx_mgmt_beacon(str */ if (!ieee80211_is_s1g_beacon(hdr->frame_control)) ncrc = crc32_be(0, (void *)&mgmt->u.beacon.beacon_int, 4); - ncrc = ieee802_11_parse_elems_crc(variable, - len - baselen, false, &elems, - care_about_ies, ncrc, - mgmt->bssid, bssid); + ieee802_11_parse_elems_crc(variable, + len - baselen, false, &elems, + care_about_ies, ncrc, + mgmt->bssid, bssid); + ncrc = elems.crc; if (ieee80211_hw_check(&local->hw, PS_NULLFUNC_STACK) && ieee80211_check_tim(elems.tim, elems.tim_len, bss_conf->aid)) { --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -1468,10 +1468,10 @@ static size_t ieee802_11_find_bssid_prof return found ? profile_len : 0; } -u32 ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action, - struct ieee802_11_elems *elems, - u64 filter, u32 crc, u8 *transmitter_bssid, - u8 *bss_bssid) +void ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action, + struct ieee802_11_elems *elems, + u64 filter, u32 crc, u8 *transmitter_bssid, + u8 *bss_bssid) { const struct element *non_inherit = NULL; u8 *nontransmitted_profile; @@ -1523,7 +1523,7 @@ u32 ieee802_11_parse_elems_crc(const u8 kfree(nontransmitted_profile); - return crc; + elems->crc = crc; } void ieee80211_regulatory_limit_wmm_params(struct ieee80211_sub_if_data *sdata, Patches currently in stable-queue which might be from nbd@xxxxxxxx are queue-5.15/mac80211-fix-memory-leaks-with-element-parsing.patch queue-5.15/mac80211-mlme-find-auth-challenge-directly.patch queue-5.15/mac80211-mesh-clean-up-rx_bcn_presp-api.patch queue-5.15/wifi-mac80211-fix-mbssid-parsing-use-after-free.patch queue-5.15/mac80211-always-allocate-struct-ieee802_11_elems.patch queue-5.15/mac80211-move-crc-into-struct-ieee802_11_elems.patch