compat-wireless:Fix interface redefine when backport to 2.6.32
PATCH 1/1 compat-wireless:Fix interface redefine when backport to 2.6.32
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.
---
include/linux/compat-2.6.32.h +10 -0
@@ -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 */
include/linux/compat-2.6.33.h +0 -10
@@ -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 )
Quoted 3 lines · Youquan Song
Netdev_alloc_skb_ip_alignalready 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.
That doesn't seem to be true:
$ git describe --contains --match=v* 61321bbd v2.6.33-rc1~388^2~825
Maybe you're using a patched (distro) kernel?
johannes
Quoted 11 lines · Johannes Berg
Quoted 3 lines · Youquan Song
Netdev_alloc_skb_ip_alignalready 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.That doesn't seem to be true:
$ git describe --contains --match=v* 61321bbd v2.6.33-rc1~388^2~825Maybe you're using a patched (distro) kernel?
Also please note that you sent a patch using compat-wireless but the code in questions is part of the compat.git tree:
git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/compat.git
Luis