From: Johannes Berg Date: Tue, 6 Jun 2023 12:13:20 +0000 (+0200) Subject: wifi: mac80211: remove element scratch_len X-Git-Tag: v6.6.7~2536^2~132^2~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91f53ae97cb1a8c1c26f6cbcf9e2dc1cdff9b012;p=platform%2Fkernel%2Flinux-starfive.git wifi: mac80211: remove element scratch_len This isn't used, and there isn't really a good way it could be used, so just remove that. Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index a0a7839..007b36c 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -2269,8 +2269,6 @@ static inline void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, * (or re-association) response frame if this is given * @from_ap: frame is received from an AP (currently used only * for EHT capabilities parsing) - * @scratch_len: if non zero, specifies the requested length of the scratch - * buffer; otherwise, 'len' is used. */ struct ieee80211_elems_parse_params { const u8 *start; @@ -2281,7 +2279,6 @@ struct ieee80211_elems_parse_params { struct cfg80211_bss *bss; int link_id; bool from_ap; - size_t scratch_len; }; struct ieee802_11_elems * diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 75c517d..22871e4 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -1604,7 +1604,7 @@ ieee802_11_parse_elems_full(struct ieee80211_elems_parse_params *params) const struct element *non_inherit = NULL; u8 *nontransmitted_profile; int nontransmitted_profile_len = 0; - size_t scratch_len = params->scratch_len ?: 3 * params->len; + size_t scratch_len = 3 * params->len; elems = kzalloc(sizeof(*elems) + scratch_len, GFP_ATOMIC); if (!elems)