diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2008-05-23 14:19:08 +0530 |
---|---|---|
committer | Luis R. Rodriguez <lrodriguez@atheros.com> | 2008-05-23 14:19:08 +0530 |
commit | 65721c860e8481a6969c072058ee8f4d19060ae8 (patch) | |
tree | 6e1450dd0aacaf6ffd87a582e2f7a9c2a96e53be | |
parent | 701067d296ac4544935fb94baea7caa4e6572f7c (diff) | |
download | compat-wireless-2.6-old-65721c860e8481a6969c072058ee8f4d19060ae8.tar.gz |
Port LL_ALLOCATED_SPACE from 2.6.26
2.6.26 added:
ndev->needed_headroom
ndev->needed_tailroom
Then commit SHA1 f5184d267c1aedb9b7a8cc44e08ff6b8d382c3b5
added LL_ALLOCATED_SPACE and made most users of
LL_RESERVED_SPACE make use LL_ALLOCATED_SPACE instead.
Where needed_headroom and needed_tailroom is set we
let the old kernels through as they still are using
LL_ALLOCATED_SPACE
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
-rw-r--r-- | compat/compat.diff | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/compat/compat.diff b/compat/compat.diff index 32cb4be..47b7847 100644 --- a/compat/compat.diff +++ b/compat/compat.diff @@ -890,3 +890,29 @@ mdev->set_multicast_list = ieee80211_master_set_multicast_list; sdata->vif.type = IEEE80211_IF_TYPE_AP; +--- a/net/mac80211/iface.c 2008-05-23 14:02:26.000000000 +0530 ++++ b/net/mac80211/iface.c 2008-05-23 14:11:06.000000000 +0530 +@@ -53,6 +53,15 @@ + if (!ndev) + return -ENOMEM; + ++ ++ /* 2.6.26 added ndev->needed_headroom and dev->needed_tailroom. ++ * Then commit SHA1 ++ * f5184d267c1aedb9b7a8cc44e08ff6b8d382c3b5 ++ * added LL_ALLOCATED_SPACE and made most users of ++ * LL_RESERVED_SPACE make use LL_ALLOCATED_SPACE instead. We ++ * let the old kernels through as they still are using ++ * LL_ALLOCATED_SPACE */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)) + ndev->needed_headroom = local->tx_headroom + + 4*6 /* four MAC addresses */ + + 2 + 2 + 2 + 2 /* ctl, dur, seq, qos */ +@@ -61,6 +70,7 @@ + - ETH_HLEN /* ethernet hard_header_len */ + + IEEE80211_ENCRYPT_HEADROOM; + ndev->needed_tailroom = IEEE80211_ENCRYPT_TAILROOM; ++#endif + + ret = dev_alloc_name(ndev, ndev->name); + if (ret < 0) |