Skip to content

Commit

Permalink
wifi: mac80211: remove element scratch_len
Browse files Browse the repository at this point in the history
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 <johannes.berg@intel.com>
  • Loading branch information
Johannes Berg committed Jun 6, 2023
1 parent acb8bca commit 91f53ae
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions net/mac80211/ieee80211_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 *
Expand Down
2 changes: 1 addition & 1 deletion net/mac80211/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 91f53ae

Please sign in to comment.