From 7973e626adc951bffcc575ee25fe32e973a74ab3 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 27 Aug 2010 11:40:47 -0700 Subject: [PATCH] compat-wireless: do not use needed_headroom needed_headroom was introduced in kernel 2.6.26. Resize hard_header_len instead as it was done before using needed_headroom. Signed-off-by: Hauke Mehrtens --- patches/01-netdev.patch | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/patches/01-netdev.patch b/patches/01-netdev.patch index bb6b30da401c..e168105ec6f0 100644 --- a/patches/01-netdev.patch +++ b/patches/01-netdev.patch @@ -278,7 +278,7 @@ without creating a headache on maintenance of the pathes. dev->tx_queue_len = 0; --- a/drivers/net/wireless/orinoco/main.c +++ b/drivers/net/wireless/orinoco/main.c -@@ -2268,9 +2268,9 @@ int orinoco_if_add(struct orinoco_privat +@@ -2268,14 +2268,18 @@ int orinoco_if_add(struct orinoco_privat #endif /* Default to standard ops if not set */ if (ops) @@ -290,6 +290,15 @@ without creating a headache on maintenance of the pathes. /* we use the default eth_mac_addr for setting the MAC addr */ + /* Reserve space in skb for the SNAP header */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)) + dev->needed_headroom = ENCAPS_OVERHEAD; ++#else ++ dev->hard_header_len += ENCAPS_OVERHEAD; ++#endif + + netif_carrier_off(dev); + --- a/net/bluetooth/bnep/netdev.c +++ b/net/bluetooth/bnep/netdev.c @@ -170,8 +170,12 @@ static inline int bnep_net_proto_filter( -- 2.30.2