diff options
author | Jiri Benc <jbenc@suse.cz> | 2008-09-26 16:20:36 +0200 |
---|---|---|
committer | Luis R. Rodriguez <lrodriguez@atheros.com> | 2008-09-26 15:58:49 -0700 |
commit | cd7615b4e5ad9793c20fb19cdd4e7525e9dd07b7 (patch) | |
tree | 1849fd58a43585d9e568bbc96746ca2bd489fb1a | |
parent | 110052de6cea4ce1a0d7987ba9ec6631a153d077 (diff) | |
download | compat-wireless-2.6-old-cd7615b4e5ad9793c20fb19cdd4e7525e9dd07b7.tar.gz |
Allow compilation on 2.6.22
This allows compilation of compat-wireless-old on 2.6.22 kernel. I suspect
some drivers don't work despite they compile, though.
Signed-off-by: Jiri Benc <jbenc@suse.cz>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
-rw-r--r-- | config.mk | 4 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/if_usb.c | 2 | ||||
-rw-r--r-- | include/net/compat.h | 17 | ||||
-rw-r--r-- | net/mac80211/wme.c | 2 |
4 files changed, 23 insertions, 2 deletions
@@ -27,7 +27,6 @@ CONFIG_MAC80211=m ifeq ($(shell test -e $(KLIB_BUILD)/Makefile && echo yes),yes) KERNEL_SUBLEVEL = $(shell $(MAKE) -C $(KLIB_BUILD) kernelversion | sed -n 's/^2\.6\.\([0-9]\+\).*/\1/p') ifeq ($(shell test $(KERNEL_SUBLEVEL) -lt 23 && echo yes),yes) -$(error "ERROR: There is a bug with compat-wireless on 2.6.22. Remove me if you want to fix me") CONFIG_MAC80211_QOS=y else @@ -154,7 +153,10 @@ CONFIG_P54_PCI=m CONFIG_SSB_PCIHOST=y CONFIG_SSB_DRIVER_PCICORE=y CONFIG_SSB_B43_PCI_BRIDGE=y +ifeq ($(shell test $(KERNEL_SUBLEVEL) -gt 22 && echo yes),yes) +# b44 is not ported to 2.6.22 CONFIG_B44=m +endif CONFIG_RTL8180=m CONFIG_ADM8211=m diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c index a8b4abc..cf5bfb4 100644 --- a/drivers/net/wireless/libertas/if_usb.c +++ b/drivers/net/wireless/libertas/if_usb.c @@ -947,7 +947,9 @@ static struct usb_driver if_usb_driver = { .id_table = if_usb_table, .suspend = if_usb_suspend, .resume = if_usb_resume, +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)) .reset_resume = if_usb_resume, +#endif }; static int __init if_usb_init_module(void) diff --git a/include/net/compat.h b/include/net/compat.h index dd0adde..0ccabcd 100644 --- a/include/net/compat.h +++ b/include/net/compat.h @@ -33,6 +33,7 @@ #include <net/arp.h> #include <net/neighbour.h> +#include <net/pkt_sched.h> #include <linux/compat_autoconf.h> @@ -173,6 +174,22 @@ static inline int netif_is_multiqueue(const struct net_device *dev) return (!!(NETIF_F_MULTI_QUEUE & dev->features)); } +/* 2.6.23 fixed a bug in tcf_destroy_chain and the parameter changed */ +static inline void tcf_destroy_chain_compat(struct tcf_proto **fl) +{ + struct tcf_proto *tp; + + while ((tp = *fl) != NULL) { + *fl = tp->next; + tp->ops->destroy(tp); + module_put(tp->ops->owner); + kfree(tp); + } +} + +#else + +#define tcf_destroy_chain_compat tcf_destroy_chain #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)) */ diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c index a432e31..b03049f 100644 --- a/net/mac80211/wme.c +++ b/net/mac80211/wme.c @@ -310,7 +310,7 @@ static void wme_qdiscop_destroy(struct Qdisc* qd) struct ieee80211_hw *hw = &local->hw; int queue; - tcf_destroy_chain(&q->filter_list); + tcf_destroy_chain_compat(&q->filter_list); for (queue = 0; queue < QD_NUM(hw); queue++) { skb_queue_purge(&q->requeued[queue]); |