diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2008-07-06 23:11:10 -0700 |
---|---|---|
committer | Luis R. Rodriguez <lrodriguez@atheros.com> | 2008-07-06 23:11:10 -0700 |
commit | 2517422f706b0c4ac10d93552e41fda4cf06048d (patch) | |
tree | 10ca0dba866c0d1a9c2818803c6f9e9876db076d | |
parent | f5b8a24db8ef967cfb84bdb21bf4c9c0b961ab69 (diff) | |
download | compat-wireless-2.6-old-2517422f706b0c4ac10d93552e41fda4cf06048d.tar.gz |
Update compat.diff. Rename ONLY_WIRELESS to ONLY_CORE
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | compat/compat.diff | 286 |
2 files changed, 144 insertions, 144 deletions
@@ -17,7 +17,7 @@ include $(M)/$(COMPAT_CONFIG) NOSTDINC_FLAGS := -I$(M)/include/ -include $(M)/include/net/compat.h $(CFLAGS) obj-y := net/wireless/ net/mac80211/ -ifeq ($(ONLY_WIRELESS),) +ifeq ($(ONLY_CORE),) obj-y += net/ieee80211/ \ drivers/ssb/ \ drivers/misc/ \ diff --git a/compat/compat.diff b/compat/compat.diff index c22010f..51f0ab5 100644 --- a/compat/compat.diff +++ b/compat/compat.diff @@ -349,41 +349,6 @@ ret = dev_alloc_name(ndev, ndev->name); if (ret < 0) ---- a/include/net/mac80211.h 2008-06-04 00:38:13.000000000 -0700 -+++ b/include/net/mac80211.h 2008-06-09 01:25:08.000000000 -0700 -@@ -293,7 +293,11 @@ - s8 tx_rate_idx; - u8 antenna_sel_tx; - -+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,22)) -+ u8 queue; /* For compatibilty support for HT for kernels <= 2.6.22 */ -+#else - /* 1 byte hole */ -+#endif - - union { - struct { -@@ -323,6 +327,20 @@ - return (struct ieee80211_tx_info *)skb->cb; - } - -+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,22)) -+/* Added was added as of 2.6.24 in include/linux/skbuff.h, this for old kernels, -+ * we put it here instead of compat.h as we don't want to rely on mac80211.h in -+ * compat.h */ -+static inline u16 skb_get_queue_mapping(struct sk_buff *skb) -+{ -+ return IEEE80211_SKB_CB(skb)->queue; -+} -+ -+static inline void skb_set_queue_mapping(struct sk_buff *skb, u16 queue_mapping) -+{ -+ IEEE80211_SKB_CB(skb)->queue = queue_mapping; -+} -+#endif - - /** - * enum mac80211_rx_flags - receive flags --- a/net/mac80211/util.c 2008-06-20 16:39:59.000000000 +0530 +++ b/net/mac80211/util.c 2008-06-20 16:40:00.000000000 +0530 @@ -20,11 +20,20 @@ @@ -422,65 +387,6 @@ tasklet_schedule(&local->tx_pending_tasklet); } else { if (ieee80211_is_multiqueue(local)) { ---- a/net/mac80211/wme.c 2008-06-20 16:39:59.000000000 +0530 -+++ b/net/mac80211/wme.c 2008-06-20 16:40:00.000000000 +0530 -@@ -17,6 +17,9 @@ - #include <net/mac80211.h> - #include "ieee80211_i.h" - #include "wme.h" -+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,22)) -+#include "mq_compat.h" -+#endif - - /* maximum number of hardware queues we support. */ - #define QD_MAX_QUEUES (IEEE80211_MAX_AMPDU_QUEUES + IEEE80211_MAX_QUEUES) -@@ -320,14 +323,22 @@ - - - /* called whenever parameters are updated on existing qdisc */ -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)) -+static int wme_qdiscop_tune(struct Qdisc *qd, struct rtattr *opt) -+#else - static int wme_qdiscop_tune(struct Qdisc *qd, struct nlattr *opt) -+#endif - { - return 0; - } - - - /* called during initial creation of qdisc on device */ -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)) -+static int wme_qdiscop_init(struct Qdisc *qd, struct rtattr *opt) -+#else - static int wme_qdiscop_init(struct Qdisc *qd, struct nlattr *opt) -+#endif - { - struct ieee80211_sched_data *q = qdisc_priv(qd); - struct net_device *dev = qd->dev; -@@ -448,7 +459,11 @@ - - - static int wme_classop_change(struct Qdisc *qd, u32 handle, u32 parent, -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)) -+ struct rtattr **tca, unsigned long *arg) -+#else - struct nlattr **tca, unsigned long *arg) -+#endif - { - unsigned long cl = *arg; - struct ieee80211_local *local = wdev_priv(qd->dev->ieee80211_ptr); -@@ -532,7 +547,11 @@ - - /* this qdisc is classful (i.e. has classes, some of which may have leaf qdiscs attached) - * - these are the operations on the classes */ -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)) -+static struct Qdisc_class_ops class_ops = -+#else - static const struct Qdisc_class_ops class_ops = -+#endif - { - .graft = wme_classop_graft, - .leaf = wme_classop_leaf, --- a/drivers/net/usb/Makefile 2008-06-20 16:59:51.000000000 +0530 +++ b/drivers/net/usb/Makefile 2008-06-20 16:59:51.000000000 +0530 @@ -2,20 +2,8 @@ @@ -910,55 +816,6 @@ } mutex_unlock(&rdev->devlist_mtx); break; ---- a/net/mac80211/main.c 2008-07-01 02:59:06.000000000 -0700 -+++ b/net/mac80211/main.c 2008-07-01 02:59:07.000000000 -0700 -@@ -21,7 +21,9 @@ - #include <linux/wireless.h> - #include <linux/rtnetlink.h> - #include <linux/bitmap.h> -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) - #include <net/net_namespace.h> -+#endif - #include <net/cfg80211.h> - - #include "ieee80211_i.h" -@@ -982,6 +984,13 @@ - .cache_update = eth_header_cache_update, - }; - -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)) -+static struct net_device_stats *ieee80211_get_stats(struct net_device *dev) -+{ -+ return &IEEE80211_DEV_TO_SUB_IF(dev)->stats; -+} -+#endif -+ - /* Must not be called for mdev */ - void ieee80211_if_setup(struct net_device *dev) - { -@@ -993,6 +1002,9 @@ - dev->open = ieee80211_open; - dev->stop = ieee80211_stop; - dev->destructor = ieee80211_if_free; -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)) -+ dev->get_stats = ieee80211_get_stats; -+#endif - } - - /* everything else */ -@@ -1700,7 +1712,12 @@ - mdev->open = ieee80211_master_open; - mdev->stop = ieee80211_master_stop; - mdev->type = ARPHRD_IEEE80211; -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)) -+ mdev->get_stats = ieee80211_get_stats; -+#endif -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) - mdev->header_ops = &ieee80211_header_ops; -+#endif - mdev->set_multicast_list = ieee80211_master_set_multicast_list; - - sdata->vif.type = IEEE80211_IF_TYPE_AP; --- a/net/mac80211/rx.c 2008-07-01 02:59:06.000000000 -0700 +++ b/net/mac80211/rx.c 2008-07-01 02:59:07.000000000 -0700 @@ -305,8 +305,13 @@ @@ -1160,3 +1017,146 @@ ieee80211_wake_queue(&local->hw, i); } } +--- a/include/net/mac80211.h 2008-07-06 23:07:14.000000000 -0700 ++++ b/include/net/mac80211.h 2008-07-06 23:07:17.000000000 -0700 +@@ -296,7 +296,11 @@ + s8 tx_rate_idx; + u8 antenna_sel_tx; + ++#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,22)) ++ u8 queue; /* For compatibilty support for HT for kernels <= 2.6.22 */ ++#else + /* 1 byte hole */ ++#endif + + union { + struct { +@@ -326,6 +330,20 @@ + return (struct ieee80211_tx_info *)skb->cb; + } + ++#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,22)) ++/* Added was added as of 2.6.24 in include/linux/skbuff.h, this for old kernels, ++ * we put it here instead of compat.h as we don't want to rely on mac80211.h in ++ * compat.h */ ++static inline u16 skb_get_queue_mapping(struct sk_buff *skb) ++{ ++ return IEEE80211_SKB_CB(skb)->queue; ++} ++ ++static inline void skb_set_queue_mapping(struct sk_buff *skb, u16 queue_mapping) ++{ ++ IEEE80211_SKB_CB(skb)->queue = queue_mapping; ++} ++#endif + + /** + * enum mac80211_rx_flags - receive flags +--- a/net/mac80211/wme.c 2008-07-06 23:07:15.000000000 -0700 ++++ b/net/mac80211/wme.c 2008-07-06 23:07:17.000000000 -0700 +@@ -17,6 +17,9 @@ + #include <net/mac80211.h> + #include "ieee80211_i.h" + #include "wme.h" ++#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,22)) ++#include "mq_compat.h" ++#endif + + /* maximum number of hardware queues we support. */ + #define QD_MAX_QUEUES (IEEE80211_MAX_AMPDU_QUEUES + IEEE80211_MAX_QUEUES) +@@ -319,14 +322,22 @@ + + + /* called whenever parameters are updated on existing qdisc */ ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)) ++static int wme_qdiscop_tune(struct Qdisc *qd, struct rtattr *opt) ++#else + static int wme_qdiscop_tune(struct Qdisc *qd, struct nlattr *opt) ++#endif + { + return 0; + } + + + /* called during initial creation of qdisc on device */ ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)) ++static int wme_qdiscop_init(struct Qdisc *qd, struct rtattr *opt) ++#else + static int wme_qdiscop_init(struct Qdisc *qd, struct nlattr *opt) ++#endif + { + struct ieee80211_sched_data *q = qdisc_priv(qd); + struct net_device *dev = qd->dev; +@@ -447,7 +458,11 @@ + + + static int wme_classop_change(struct Qdisc *qd, u32 handle, u32 parent, ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)) ++ struct rtattr **tca, unsigned long *arg) ++#else + struct nlattr **tca, unsigned long *arg) ++#endif + { + unsigned long cl = *arg; + struct ieee80211_local *local = wdev_priv(qd->dev->ieee80211_ptr); +@@ -531,7 +546,11 @@ + + /* this qdisc is classful (i.e. has classes, some of which may have leaf qdiscs attached) + * - these are the operations on the classes */ ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)) ++static struct Qdisc_class_ops class_ops = ++#else + static const struct Qdisc_class_ops class_ops = ++#endif + { + .graft = wme_classop_graft, + .leaf = wme_classop_leaf, +--- a/net/mac80211/main.c 2008-07-06 23:07:14.000000000 -0700 ++++ b/net/mac80211/main.c 2008-07-06 23:07:17.000000000 -0700 +@@ -21,7 +21,9 @@ + #include <linux/wireless.h> + #include <linux/rtnetlink.h> + #include <linux/bitmap.h> ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) + #include <net/net_namespace.h> ++#endif + #include <net/cfg80211.h> + + #include "ieee80211_i.h" +@@ -982,6 +984,13 @@ + .cache_update = eth_header_cache_update, + }; + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)) ++static struct net_device_stats *ieee80211_get_stats(struct net_device *dev) ++{ ++ return &IEEE80211_DEV_TO_SUB_IF(dev)->stats; ++} ++#endif ++ + /* Must not be called for mdev */ + void ieee80211_if_setup(struct net_device *dev) + { +@@ -993,6 +1002,9 @@ + dev->open = ieee80211_open; + dev->stop = ieee80211_stop; + dev->destructor = ieee80211_if_free; ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)) ++ dev->get_stats = ieee80211_get_stats; ++#endif + } + + /* everything else */ +@@ -1717,7 +1729,12 @@ + mdev->open = ieee80211_master_open; + mdev->stop = ieee80211_master_stop; + mdev->type = ARPHRD_IEEE80211; ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)) ++ mdev->get_stats = ieee80211_get_stats; ++#endif ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) + mdev->header_ops = &ieee80211_header_ops; ++#endif + mdev->set_multicast_list = ieee80211_master_set_multicast_list; + + sdata->vif.type = IEEE80211_IF_TYPE_AP; |