Search Linux Wireless

[PATCH] compat-wireless:Fix interface redefine when backport to 2.6.32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Netdev_alloc_skb_ip_align already define at 2.6.32 kernel, so only < 2.6.32 
kernel needs it, so when backport latest compat-wirelss to 2.6.32, it report
redefine the interface.

This patch fix the above issue.

Signed-off-by: Youquan Song <youquan.song@xxxxxxxxx>
Signed-off-by: Hui Xiao <hui.xiao@xxxxxxxxx>
---


diff --git a/include/linux/compat-2.6.32.h b/include/linux/compat-2.6.32.h
index 321a89a..164aa6c 100644
--- a/include/linux/compat-2.6.32.h
+++ b/include/linux/compat-2.6.32.h
@@ -96,6 +96,16 @@ struct dev_pm_ops name = { \
 
 #define lockdep_assert_held(l)			do { } while (0)
 
+static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev,
+		unsigned int length)
+{
+	struct sk_buff *skb = netdev_alloc_skb(dev, length + NET_IP_ALIGN);
+
+	if (NET_IP_ALIGN && skb)
+		skb_reserve(skb, NET_IP_ALIGN);
+	return skb;
+}
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)) */
 
 #endif /* LINUX_26_32_COMPAT_H */
diff --git a/include/linux/compat-2.6.33.h b/include/linux/compat-2.6.33.h
index c2dbc1b..4646d28 100644
--- a/include/linux/compat-2.6.33.h
+++ b/include/linux/compat-2.6.33.h
@@ -55,16 +55,6 @@ static inline void compat_release_firmware(const struct firmware *fw)
 /* this will never happen on older kernels */
 #define NETDEV_POST_INIT 0xffff
 
-static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev,
-                unsigned int length)
-{
-	struct sk_buff *skb = netdev_alloc_skb(dev, length + NET_IP_ALIGN);
-
-	if (NET_IP_ALIGN && skb)
-		skb_reserve(skb, NET_IP_ALIGN);
-	return skb;
-}
-
 #if defined(CONFIG_PCCARD) || defined(CONFIG_PCCARD_MODULE)
 
 #if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux