diff options
author | Fred Zhou <fred.zy@gmail.com> | 2013-09-23 22:33:01 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-10-01 06:20:38 -0400 |
commit | 15e230abaaa5a79feb25d1ef29b380e8b63aea0c (patch) | |
tree | 6960ab6a712d09c7c95f39355833c93cf42369fa /net/mac80211/util.c | |
parent | f0823475d57a1ece4fe1eafb1aef5c4fa79361aa (diff) |
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>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 3c8283b9b45a..1fb31f94bf89 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -1081,8 +1081,8 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata, | |||
1081 | struct ieee80211_mgmt *mgmt; | 1081 | struct ieee80211_mgmt *mgmt; |
1082 | int err; | 1082 | int err; |
1083 | 1083 | ||
1084 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + | 1084 | /* 24 + 6 = header + auth_algo + auth_transaction + status_code */ |
1085 | sizeof(*mgmt) + 6 + extra_len); | 1085 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + 24 + 6 + extra_len); |
1086 | if (!skb) | 1086 | if (!skb) |
1087 | return; | 1087 | return; |
1088 | 1088 | ||