]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/mac80211/util.c
mac80211: use exact-size allocation for authentication frame
[karo-tx-linux.git] / net / mac80211 / util.c
index 3c8283b9b45ae0e8499569b4c2e4f4d88649176c..1fb31f94bf89fc0f48c2feb25c14694852b0ee2d 100644 (file)
@@ -1081,8 +1081,8 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
        struct ieee80211_mgmt *mgmt;
        int err;
 
-       skb = dev_alloc_skb(local->hw.extra_tx_headroom +
-                           sizeof(*mgmt) + 6 + extra_len);
+       /* 24 + 6 = header + auth_algo + auth_transaction + status_code */
+       skb = dev_alloc_skb(local->hw.extra_tx_headroom + 24 + 6 + extra_len);
        if (!skb)
                return;