mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-07 23:25:45 +00:00
mac80211: use exact-size allocation for authentication frame
The authentication frame has a fixied size of 30 bytes (including header, algo num, trans seq num, and status) followed by a variable challenge text. Allocate using exact size, instead of over-allocation by sizeof(ieee80211_mgmt). Signed-off-by: Fred Zhou <fred.zy@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
f0823475d5
commit
15e230abaa
1 changed files with 2 additions and 2 deletions
|
@ -1081,8 +1081,8 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
|
||||||
struct ieee80211_mgmt *mgmt;
|
struct ieee80211_mgmt *mgmt;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
skb = dev_alloc_skb(local->hw.extra_tx_headroom +
|
/* 24 + 6 = header + auth_algo + auth_transaction + status_code */
|
||||||
sizeof(*mgmt) + 6 + extra_len);
|
skb = dev_alloc_skb(local->hw.extra_tx_headroom + 24 + 6 + extra_len);
|
||||||
if (!skb)
|
if (!skb)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue