summaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorIngo Molnar2008-06-23 11:53:03 +0200
committerIngo Molnar2008-06-23 11:53:03 +0200
commit009b9fc98ddd83f9139fdabb12c0d7a8535d5421 (patch)
treef7d3e182407d2ebe50a9b8db6361ac910027a1cf /net/mac80211/iface.c
parentx86: fixup the fallout of the bitops changes (diff)
parentSlab: Fix memory leak in fallback_alloc() (diff)
downloadkernel-qcow2-linux-009b9fc98ddd83f9139fdabb12c0d7a8535d5421.tar.gz
kernel-qcow2-linux-009b9fc98ddd83f9139fdabb12c0d7a8535d5421.tar.xz
kernel-qcow2-linux-009b9fc98ddd83f9139fdabb12c0d7a8535d5421.zip
Merge branch 'linus' into x86/threadinfo
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 80954a512185..06e88a5a036d 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -54,6 +54,15 @@ int ieee80211_if_add(struct net_device *dev, const char *name,
if (!ndev)
return -ENOMEM;
+ ndev->needed_headroom = local->tx_headroom +
+ 4*6 /* four MAC addresses */
+ + 2 + 2 + 2 + 2 /* ctl, dur, seq, qos */
+ + 6 /* mesh */
+ + 8 /* rfc1042/bridge tunnel */
+ - ETH_HLEN /* ethernet hard_header_len */
+ + IEEE80211_ENCRYPT_HEADROOM;
+ ndev->needed_tailroom = IEEE80211_ENCRYPT_TAILROOM;
+
ret = dev_alloc_name(ndev, ndev->name);
if (ret < 0)
goto fail;