aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@winlab.rutgers.edu>2008-06-27 14:24:48 -0700
committerLuis R. Rodriguez <mcgrof@winlab.rutgers.edu>2008-06-27 14:24:48 -0700
commit8d7d201d1f210572c10158ecddde6e5f9d7897c3 (patch)
tree840f1166c77256834218d4ea368da17acc4d3315
parentd5beeb15d6e0fe28f352f9a8320377594d58e6db (diff)
downloadcompat-wireless-2.6-old-8d7d201d1f210572c10158ecddde6e5f9d7897c3.tar.gz
Update compat.diff
Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
-rw-r--r--compat/compat.diff837
1 files changed, 418 insertions, 419 deletions
diff --git a/compat/compat.diff b/compat/compat.diff
index e476fbe..f137a59 100644
--- a/compat/compat.diff
+++ b/compat/compat.diff
@@ -101,57 +101,6 @@
-cfg80211-y += core.o sysfs.o radiotap.o util.o reg.o
+cfg80211-y += core.o sysfs.o radiotap.o util.o reg.o compat.o
cfg80211-$(CONFIG_NL80211) += nl80211.o
---- a/drivers/net/wireless/Makefile 2008-03-11 19:54:52.000000000 +0100
-+++ b/drivers/net/wireless/Makefile 2008-03-11 19:54:53.000000000 +0100
-@@ -6,48 +6,13 @@ obj-$(CONFIG_IPW2100) += ipw2100.o
-
- obj-$(CONFIG_IPW2200) += ipw2200.o
-
--obj-$(CONFIG_STRIP) += strip.o
--obj-$(CONFIG_ARLAN) += arlan.o
--
--arlan-objs := arlan-main.o arlan-proc.o
--
--# Obsolete cards
--obj-$(CONFIG_WAVELAN) += wavelan.o
--obj-$(CONFIG_PCMCIA_NETWAVE) += netwave_cs.o
--obj-$(CONFIG_PCMCIA_WAVELAN) += wavelan_cs.o
--
--obj-$(CONFIG_HERMES) += orinoco.o hermes.o
--obj-$(CONFIG_PCMCIA_HERMES) += orinoco_cs.o
--obj-$(CONFIG_APPLE_AIRPORT) += airport.o
--obj-$(CONFIG_PLX_HERMES) += orinoco_plx.o
--obj-$(CONFIG_PCI_HERMES) += orinoco_pci.o
--obj-$(CONFIG_TMD_HERMES) += orinoco_tmd.o
--obj-$(CONFIG_NORTEL_HERMES) += orinoco_nortel.o
--obj-$(CONFIG_PCMCIA_SPECTRUM) += spectrum_cs.o
--
--obj-$(CONFIG_AIRO) += airo.o
--obj-$(CONFIG_AIRO_CS) += airo_cs.o airo.o
--
--obj-$(CONFIG_ATMEL) += atmel.o
--obj-$(CONFIG_PCI_ATMEL) += atmel_pci.o
--obj-$(CONFIG_PCMCIA_ATMEL) += atmel_cs.o
--
- obj-$(CONFIG_USB_ATMEL) += at76_usb.o
--
--obj-$(CONFIG_PRISM54) += prism54/
--
--obj-$(CONFIG_HOSTAP) += hostap/
- obj-$(CONFIG_B43) += b43/
- obj-$(CONFIG_B43LEGACY) += b43legacy/
- obj-$(CONFIG_ZD1211RW) += zd1211rw/
-
--# 16-bit wireless PCMCIA client drivers
--obj-$(CONFIG_PCMCIA_RAYCS) += ray_cs.o
--obj-$(CONFIG_PCMCIA_WL3501) += wl3501_cs.o
--
- obj-$(CONFIG_USB_NET_RNDIS_WLAN) += rndis_wlan.o
-
--obj-$(CONFIG_USB_ZD1201) += zd1201.o
- obj-$(CONFIG_LIBERTAS) += libertas/
-
- rtl8180-objs := rtl8180_dev.o rtl8180_rtl8225.o rtl8180_sa2400.o rtl8180_max2820.o rtl8180_grf5101.o
--- a/net/wireless/nl80211.c 2008-06-11 13:10:36.000000000 -0700
+++ b/net/wireless/nl80211.c 2008-06-11 13:10:37.000000000 -0700
@@ -1065,7 +1065,7 @@
@@ -320,66 +269,6 @@
-obj-$(CONFIG_ENCLOSURE_SERVICES) += enclosure.o
-obj-$(CONFIG_KGDB_TESTS) += kgdbts.o
-obj-$(CONFIG_SGI_XP) += sgi-xp/
---- a/net/wireless/core.c 2008-05-15 07:15:18.000000000 -0700
-+++ b/net/wireless/core.c 2008-05-15 07:15:19.000000000 -0700
-@@ -71,9 +71,9 @@
- ifindex = nla_get_u32(info->attrs[NL80211_ATTR_IFINDEX]);
- dev = dev_get_by_index(&init_net, ifindex);
- if (dev) {
-- if (dev->ieee80211_ptr)
-+ if (((struct wireless_dev *)dev->ieee80211_ptr))
- byifidx =
-- wiphy_to_dev(dev->ieee80211_ptr->wiphy);
-+ wiphy_to_dev(((struct wireless_dev *)dev->ieee80211_ptr)->wiphy);
- dev_put(dev);
- }
- err = -ENODEV;
-@@ -123,8 +123,8 @@
- dev = dev_get_by_index(&init_net, ifindex);
- if (!dev)
- goto out;
-- if (dev->ieee80211_ptr) {
-- drv = wiphy_to_dev(dev->ieee80211_ptr->wiphy);
-+ if (((struct wireless_dev *)dev->ieee80211_ptr)) {
-+ drv = wiphy_to_dev(((struct wireless_dev *)dev->ieee80211_ptr)->wiphy);
- mutex_lock(&drv->mtx);
- } else
- drv = ERR_PTR(-ENODEV);
-@@ -368,28 +368,28 @@
- struct net_device *dev = ndev;
- struct cfg80211_registered_device *rdev;
-
-- if (!dev->ieee80211_ptr)
-+ if (!((struct wireless_dev *)dev->ieee80211_ptr))
- return 0;
-
-- rdev = wiphy_to_dev(dev->ieee80211_ptr->wiphy);
-+ rdev = wiphy_to_dev(((struct wireless_dev *)dev->ieee80211_ptr)->wiphy);
-
- switch (state) {
- case NETDEV_REGISTER:
- mutex_lock(&rdev->devlist_mtx);
-- list_add(&dev->ieee80211_ptr->list, &rdev->netdev_list);
-+ list_add(&((struct wireless_dev *)dev->ieee80211_ptr)->list, &rdev->netdev_list);
- if (sysfs_create_link(&dev->dev.kobj, &rdev->wiphy.dev.kobj,
- "phy80211")) {
- printk(KERN_ERR "wireless: failed to add phy80211 "
- "symlink to netdev!\n");
- }
-- dev->ieee80211_ptr->netdev = dev;
-+ ((struct wireless_dev *)dev->ieee80211_ptr)->netdev = dev;
- mutex_unlock(&rdev->devlist_mtx);
- break;
- case NETDEV_UNREGISTER:
- mutex_lock(&rdev->devlist_mtx);
-- if (!list_empty(&dev->ieee80211_ptr->list)) {
-+ if (!list_empty(&((struct wireless_dev *)dev->ieee80211_ptr)->list)) {
- sysfs_remove_link(&dev->dev.kobj, "phy80211");
-- list_del_init(&dev->ieee80211_ptr->list);
-+ list_del_init(&((struct wireless_dev *)dev->ieee80211_ptr)->list);
- }
- mutex_unlock(&rdev->devlist_mtx);
- break;
--- a/drivers/net/wireless/libertas/ethtool.c 2008-05-20 22:04:10.000000000 -0700
+++ b/drivers/net/wireless/libertas/ethtool.c 2008-05-20 22:06:48.000000000 -0700
@@ -111,6 +111,7 @@
@@ -434,8 +323,296 @@
u32 nar;
---- a/drivers/net/wireless/adm8211.c 2008-05-23 11:55:04.000000000 +0530
-+++ b/drivers/net/wireless/adm8211.c 2008-05-23 11:55:05.000000000 +0530
+--- a/net/mac80211/iface.c 2008-05-23 14:02:26.000000000 +0530
++++ b/net/mac80211/iface.c 2008-05-23 14:11:06.000000000 +0530
+@@ -53,6 +53,15 @@
+ if (!ndev)
+ return -ENOMEM;
+
++
++ /* 2.6.26 added ndev->needed_headroom and dev->needed_tailroom.
++ * Then commit SHA1
++ * f5184d267c1aedb9b7a8cc44e08ff6b8d382c3b5
++ * added LL_ALLOCATED_SPACE and made most users of
++ * LL_RESERVED_SPACE make use LL_ALLOCATED_SPACE instead. We
++ * let the old kernels through as they still are using
++ * LL_ALLOCATED_SPACE */
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26))
+ ndev->needed_headroom = local->tx_headroom +
+ 4*6 /* four MAC addresses */
+ + 2 + 2 + 2 + 2 /* ctl, dur, seq, qos */
+@@ -61,6 +70,7 @@
+ - ETH_HLEN /* ethernet hard_header_len */
+ + IEEE80211_ENCRYPT_HEADROOM;
+ ndev->needed_tailroom = IEEE80211_ENCRYPT_TAILROOM;
++#endif
+
+ ret = dev_alloc_name(ndev, ndev->name);
+ if (ret < 0)
+--- a/net/mac80211/main.c 2008-06-11 13:10:36.000000000 -0700
++++ b/net/mac80211/main.c 2008-06-11 13:10:37.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"
+@@ -960,6 +962,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)
+ {
+@@ -971,6 +980,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 */
+@@ -1677,7 +1689,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/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 @@
+ #include <linux/if_arp.h>
+ #include <linux/wireless.h>
+ #include <linux/bitmap.h>
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
+ #include <net/net_namespace.h>
++#endif
+ #include <net/cfg80211.h>
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22))
+ #include <net/rtnetlink.h>
++#else
++#include <linux/rtnetlink.h>
++#endif
+
+ #include "ieee80211_i.h"
++#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,22))
++#include "mq_compat.h"
++#endif
+ #include "rate.h"
+ #include "mesh.h"
+ #include "wme.h"
+@@ -360,7 +369,14 @@
+ {
+ struct ieee80211_local *local = hw_to_local(hw);
+
++/* 2.6.22 doesn't have CONFIG_NETDEVICES_MULTIQUEUE so lets not make use
++ * of queues_pending map and use our own old hack */
++#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,22))
++ if (test_and_clear_bit(IEEE80211_LINK_STATE_XOFF,
++ &local->state[queue])) {
++#else
+ if (test_bit(queue, local->queues_pending)) {
++#endif
+ tasklet_schedule(&local->tx_pending_tasklet);
+ } else {
+ if (ieee80211_is_multiqueue(local)) {
+--- a/net/mac80211/rx.c 2008-06-20 16:39:59.000000000 +0530
++++ b/net/mac80211/rx.c 2008-06-20 16:40:00.000000000 +0530
+@@ -305,8 +305,13 @@
+ }
+
+ prev_dev = sdata->dev;
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22))
++ sdata->stats.rx_packets++;
++ sdata->stats.rx_bytes += skb->len;
++#else
+ sdata->dev->stats.rx_packets++;
+ sdata->dev->stats.rx_bytes += skb->len;
++#endif
+ }
+
+ if (prev_dev) {
+@@ -1397,8 +1402,13 @@
+
+ skb->dev = dev;
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22))
++ IEEE80211_DEV_TO_SUB_IF(dev)->stats.rx_packets++;
++ IEEE80211_DEV_TO_SUB_IF(dev)->stats.rx_bytes += skb->len;
++#else
+ dev->stats.rx_packets++;
+ dev->stats.rx_bytes += skb->len;
++#endif
+
+ /* skip the wrapping header */
+ eth = (struct ethhdr *) skb_pull(skb, sizeof(struct ethhdr));
+@@ -1507,8 +1517,13 @@
+
+ rx->skb->dev = dev;
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22))
++ rx->sdata->stats.rx_packets++;
++ rx->sdata->stats.rx_bytes += rx->skb->len;
++#else
+ dev->stats.rx_packets++;
+ dev->stats.rx_bytes += rx->skb->len;
++#endif
+
+ ieee80211_deliver_skb(rx);
+
+@@ -1714,8 +1729,13 @@
+ }
+
+ prev_dev = sdata->dev;
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22))
++ sdata->stats.rx_packets++;
++ sdata->stats.rx_bytes += skb->len;
++#else
+ sdata->dev->stats.rx_packets++;
+ sdata->dev->stats.rx_bytes += skb->len;
++#endif
+ }
+
+ if (prev_dev) {
+--- 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 @@
+ # Makefile for USB Network drivers
+ #
+
+-obj-$(CONFIG_USB_CATC) += catc.o
+-obj-$(CONFIG_USB_KAWETH) += kaweth.o
+-obj-$(CONFIG_USB_PEGASUS) += pegasus.o
+-obj-$(CONFIG_USB_RTL8150) += rtl8150.o
+-obj-$(CONFIG_USB_NET_AX8817X) += asix.o
+ obj-$(CONFIG_USB_NET_CDCETHER) += cdc_ether.o
+-obj-$(CONFIG_USB_NET_DM9601) += dm9601.o
+-obj-$(CONFIG_USB_NET_GL620A) += gl620a.o
+-obj-$(CONFIG_USB_NET_NET1080) += net1080.o
+-obj-$(CONFIG_USB_NET_PLUSB) += plusb.o
+ obj-$(CONFIG_USB_NET_RNDIS_HOST) += rndis_host.o
+-obj-$(CONFIG_USB_NET_CDC_SUBSET) += cdc_subset.o
+-obj-$(CONFIG_USB_NET_ZAURUS) += zaurus.o
+-obj-$(CONFIG_USB_NET_MCS7830) += mcs7830.o
+ obj-$(CONFIG_USB_USBNET) += usbnet.o
+
+ ifeq ($(CONFIG_USB_DEBUG),y)
+--- a/drivers/net/wireless/adm8211.c 2008-06-27 13:39:54.000000000 -0700
++++ b/drivers/net/wireless/adm8211.c 2008-06-27 13:39:54.000000000 -0700
@@ -143,7 +143,11 @@
break;
@@ -650,7 +827,7 @@
reg = ADM8211_CSR_READ(CSR_TEST1);
reg &= ~((1 << 4) | (1 << 5));
ADM8211_CSR_WRITE(CSR_TEST1, reg);
-@@ -1876,6 +1952,9 @@
+@@ -1869,6 +1945,9 @@
pci_name(pdev));
goto err_iounmap;
}
@@ -660,7 +837,7 @@
*(__le32 *)perm_addr = cpu_to_le32(ADM8211_CSR_READ(PAR0));
*(__le16 *)&perm_addr[4] =
-@@ -1905,7 +1984,11 @@
+@@ -1898,7 +1977,11 @@
priv->mode = IEEE80211_IF_TYPE_INVALID;
/* Power-on issue. EEPROM won't read correctly without */
@@ -672,7 +849,7 @@
ADM8211_CSR_WRITE(FRCTL, 0);
ADM8211_CSR_READ(FRCTL);
ADM8211_CSR_WRITE(FRCTL, 1);
-@@ -1933,7 +2016,11 @@
+@@ -1926,7 +2009,11 @@
printk(KERN_INFO "%s: hwaddr %s, Rev 0x%02x\n",
wiphy_name(dev->wiphy), print_mac(mac, dev->wiphy->perm_addr),
@@ -684,44 +861,18 @@
return 0;
---- a/drivers/net/wireless/zd1211rw/zd_mac.c 2008-05-23 11:55:04.000000000 +0530
-+++ b/drivers/net/wireless/zd1211rw/zd_mac.c 2008-05-23 11:55:05.000000000 +0530
-@@ -984,5 +984,5 @@
+--- a/drivers/net/wireless/zd1211rw/zd_mac.c 2008-06-27 13:39:54.000000000 -0700
++++ b/drivers/net/wireless/zd1211rw/zd_mac.c 2008-06-27 13:39:54.000000000 -0700
+@@ -974,5 +974,5 @@
dev_dbg_f(zd_mac_dev(mac), "\n");
cancel_rearming_delayed_workqueue(zd_workqueue,
&mac->housekeeping.link_led_work);
- zd_chip_control_leds(&mac->chip, LED_OFF);
+ zd_chip_control_leds(&mac->chip, LED_OFF_ZD);
}
---- a/net/mac80211/iface.c 2008-05-23 14:02:26.000000000 +0530
-+++ b/net/mac80211/iface.c 2008-05-23 14:11:06.000000000 +0530
-@@ -53,6 +53,15 @@
- if (!ndev)
- return -ENOMEM;
-
-+
-+ /* 2.6.26 added ndev->needed_headroom and dev->needed_tailroom.
-+ * Then commit SHA1
-+ * f5184d267c1aedb9b7a8cc44e08ff6b8d382c3b5
-+ * added LL_ALLOCATED_SPACE and made most users of
-+ * LL_RESERVED_SPACE make use LL_ALLOCATED_SPACE instead. We
-+ * let the old kernels through as they still are using
-+ * LL_ALLOCATED_SPACE */
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26))
- ndev->needed_headroom = local->tx_headroom +
- 4*6 /* four MAC addresses */
- + 2 + 2 + 2 + 2 /* ctl, dur, seq, qos */
-@@ -61,6 +70,7 @@
- - ETH_HLEN /* ethernet hard_header_len */
- + IEEE80211_ENCRYPT_HEADROOM;
- ndev->needed_tailroom = IEEE80211_ENCRYPT_TAILROOM;
-+#endif
-
- ret = dev_alloc_name(ndev, ndev->name);
- if (ret < 0)
---- a/net/mac80211/ieee80211_i.h 2008-06-04 00:38:14.000000000 -0700
-+++ b/net/mac80211/ieee80211_i.h 2008-06-08 05:49:26.000000000 -0700
-@@ -406,6 +406,10 @@
+--- a/net/mac80211/ieee80211_i.h 2008-06-27 13:39:54.000000000 -0700
++++ b/net/mac80211/ieee80211_i.h 2008-06-27 13:39:54.000000000 -0700
+@@ -407,6 +407,10 @@
struct wireless_dev wdev;
@@ -732,7 +883,7 @@
/* keys */
struct list_head key_list;
-@@ -532,7 +536,7 @@
+@@ -533,7 +537,7 @@
return container_of(p, struct ieee80211_sub_if_data, vif);
}
@@ -741,7 +892,7 @@
enum {
IEEE80211_RX_MSG = 1,
-@@ -589,7 +593,14 @@
+@@ -590,7 +594,14 @@
struct sta_info *sta_hash[STA_HASH_SIZE];
struct timer_list sta_cleanup;
@@ -756,188 +907,8 @@
struct ieee80211_tx_stored_packet pending_packet[IEEE80211_MAX_QUEUES];
struct tasklet_struct tx_pending_tasklet;
---- a/net/mac80211/main.c 2008-06-11 13:10:36.000000000 -0700
-+++ b/net/mac80211/main.c 2008-06-11 13:10:37.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"
-@@ -960,6 +962,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)
- {
-@@ -971,6 +980,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 */
-@@ -1677,7 +1689,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/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 @@
- #include <linux/if_arp.h>
- #include <linux/wireless.h>
- #include <linux/bitmap.h>
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
- #include <net/net_namespace.h>
-+#endif
- #include <net/cfg80211.h>
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22))
- #include <net/rtnetlink.h>
-+#else
-+#include <linux/rtnetlink.h>
-+#endif
-
- #include "ieee80211_i.h"
-+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,22))
-+#include "mq_compat.h"
-+#endif
- #include "rate.h"
- #include "mesh.h"
- #include "wme.h"
-@@ -360,7 +369,14 @@
- {
- struct ieee80211_local *local = hw_to_local(hw);
-
-+/* 2.6.22 doesn't have CONFIG_NETDEVICES_MULTIQUEUE so lets not make use
-+ * of queues_pending map and use our own old hack */
-+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,22))
-+ if (test_and_clear_bit(IEEE80211_LINK_STATE_XOFF,
-+ &local->state[queue])) {
-+#else
- if (test_bit(queue, local->queues_pending)) {
-+#endif
- tasklet_schedule(&local->tx_pending_tasklet);
- } else {
- if (ieee80211_is_multiqueue(local)) {
---- a/net/mac80211/rx.c 2008-06-20 16:39:59.000000000 +0530
-+++ b/net/mac80211/rx.c 2008-06-20 16:40:00.000000000 +0530
-@@ -305,8 +305,13 @@
- }
-
- prev_dev = sdata->dev;
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22))
-+ sdata->stats.rx_packets++;
-+ sdata->stats.rx_bytes += skb->len;
-+#else
- sdata->dev->stats.rx_packets++;
- sdata->dev->stats.rx_bytes += skb->len;
-+#endif
- }
-
- if (prev_dev) {
-@@ -1397,8 +1402,13 @@
-
- skb->dev = dev;
-
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22))
-+ IEEE80211_DEV_TO_SUB_IF(dev)->stats.rx_packets++;
-+ IEEE80211_DEV_TO_SUB_IF(dev)->stats.rx_bytes += skb->len;
-+#else
- dev->stats.rx_packets++;
- dev->stats.rx_bytes += skb->len;
-+#endif
-
- /* skip the wrapping header */
- eth = (struct ethhdr *) skb_pull(skb, sizeof(struct ethhdr));
-@@ -1507,8 +1517,13 @@
-
- rx->skb->dev = dev;
-
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22))
-+ rx->sdata->stats.rx_packets++;
-+ rx->sdata->stats.rx_bytes += rx->skb->len;
-+#else
- dev->stats.rx_packets++;
- dev->stats.rx_bytes += rx->skb->len;
-+#endif
-
- ieee80211_deliver_skb(rx);
-
-@@ -1714,8 +1729,13 @@
- }
-
- prev_dev = sdata->dev;
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22))
-+ sdata->stats.rx_packets++;
-+ sdata->stats.rx_bytes += skb->len;
-+#else
- sdata->dev->stats.rx_packets++;
- sdata->dev->stats.rx_bytes += skb->len;
-+#endif
- }
-
- if (prev_dev) {
---- a/net/mac80211/tx.c 2008-06-20 16:39:59.000000000 +0530
-+++ b/net/mac80211/tx.c 2008-06-20 16:40:00.000000000 +0530
+--- a/net/mac80211/tx.c 2008-06-27 13:39:54.000000000 -0700
++++ b/net/mac80211/tx.c 2008-06-27 13:44:37.000000000 -0700
@@ -18,12 +18,17 @@
#include <linux/etherdevice.h>
#include <linux/bitmap.h>
@@ -956,15 +927,15 @@
#include "ieee80211_i.h"
#include "led.h"
#include "mesh.h"
-@@ -213,6 +218,7 @@
- return dur;
+@@ -211,6 +216,7 @@
+ return cpu_to_le16(dur);
}
+
static int inline is_ieee80211_device(struct net_device *dev,
struct net_device *master)
{
-@@ -664,8 +670,12 @@
+@@ -652,8 +658,12 @@
* caution taken here as fragmented ampdu may cause Tx stop.
*/
if (WARN_ON(tx->flags & IEEE80211_TX_CTL_AMPDU ||
@@ -977,7 +948,7 @@
return TX_DROP;
first = tx->skb;
-@@ -1095,8 +1105,9 @@
+@@ -1149,8 +1159,9 @@
u16 queue;
queue = skb_get_queue_mapping(skb);
@@ -988,7 +959,7 @@
if (unlikely(skb->len < 10)) {
dev_kfree_skb(skb);
-@@ -1174,7 +1185,12 @@
+@@ -1192,7 +1203,12 @@
if (ret == IEEE80211_TX_FRAG_AGAIN)
skb = NULL;
@@ -1001,7 +972,7 @@
smp_mb();
/*
* When the driver gets out of buffers during sending of
-@@ -1188,7 +1204,12 @@
+@@ -1206,7 +1222,12 @@
* possible to have happened.
*/
if (!__netif_subqueue_stopped(local->mdev, queue)) {
@@ -1011,10 +982,10 @@
+#else
clear_bit(queue, local->queues_pending);
+#endif
- goto retry;
- }
- store->skb = skb;
-@@ -1613,8 +1634,13 @@
+ retries++;
+ /*
+ * Driver bug, it's rejecting packets but
+@@ -1640,8 +1661,13 @@
info->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS;
skb->dev = local->mdev;
@@ -1028,7 +999,7 @@
/* Update skb pointers to various headers since this modified frame
* is going to go through Linux networking code that may potentially
-@@ -1646,14 +1672,24 @@
+@@ -1673,14 +1699,24 @@
struct ieee80211_tx_stored_packet *store;
for (i = 0; i < ieee80211_num_regular_queues(&local->hw); i++) {
@@ -1053,7 +1024,7 @@
}
}
-@@ -1674,8 +1710,11 @@
+@@ -1701,8 +1737,11 @@
/* Check that this queue is ok */
if (__netif_subqueue_stopped(local->mdev, i))
continue;
@@ -1066,7 +1037,7 @@
ieee80211_wake_queue(&local->hw, i);
continue;
}
-@@ -1692,7 +1731,12 @@
+@@ -1719,7 +1758,12 @@
if (ret == IEEE80211_TX_FRAG_AGAIN)
store->skb = NULL;
} else {
@@ -1079,85 +1050,113 @@
ieee80211_wake_queue(&local->hw, i);
}
}
---- 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
+--- a/drivers/net/wireless/Makefile 2008-06-27 13:50:28.000000000 -0700
++++ b/drivers/net/wireless/Makefile 2008-06-27 13:54:14.000000000 -0700
+@@ -6,47 +6,13 @@
- /* 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;
- }
+ obj-$(CONFIG_IPW2200) += ipw2200.o
+-obj-$(CONFIG_ARLAN) += arlan.o
+-
+-arlan-objs := arlan-main.o arlan-proc.o
+-
+-# Obsolete cards
+-obj-$(CONFIG_WAVELAN) += wavelan.o
+-obj-$(CONFIG_PCMCIA_NETWAVE) += netwave_cs.o
+-obj-$(CONFIG_PCMCIA_WAVELAN) += wavelan_cs.o
+-
+-obj-$(CONFIG_HERMES) += orinoco.o hermes.o
+-obj-$(CONFIG_PCMCIA_HERMES) += orinoco_cs.o
+-obj-$(CONFIG_APPLE_AIRPORT) += airport.o
+-obj-$(CONFIG_PLX_HERMES) += orinoco_plx.o
+-obj-$(CONFIG_PCI_HERMES) += orinoco_pci.o
+-obj-$(CONFIG_TMD_HERMES) += orinoco_tmd.o
+-obj-$(CONFIG_NORTEL_HERMES) += orinoco_nortel.o
+-obj-$(CONFIG_PCMCIA_SPECTRUM) += spectrum_cs.o
+-
+-obj-$(CONFIG_AIRO) += airo.o
+-obj-$(CONFIG_AIRO_CS) += airo_cs.o airo.o
+-
+-obj-$(CONFIG_ATMEL) += atmel.o
+-obj-$(CONFIG_PCI_ATMEL) += atmel_pci.o
+-obj-$(CONFIG_PCMCIA_ATMEL) += atmel_cs.o
+-
+ obj-$(CONFIG_USB_ATMEL) += at76_usb.o
+-
+-obj-$(CONFIG_PRISM54) += prism54/
+-
+-obj-$(CONFIG_HOSTAP) += hostap/
+ obj-$(CONFIG_B43) += b43/
+ obj-$(CONFIG_B43LEGACY) += b43legacy/
+ obj-$(CONFIG_ZD1211RW) += zd1211rw/
- /* 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 @@
+-# 16-bit wireless PCMCIA client drivers
+-obj-$(CONFIG_PCMCIA_RAYCS) += ray_cs.o
+-obj-$(CONFIG_PCMCIA_WL3501) += wl3501_cs.o
+-
+ obj-$(CONFIG_USB_NET_RNDIS_WLAN) += rndis_wlan.o
+-obj-$(CONFIG_USB_ZD1201) += zd1201.o
+ obj-$(CONFIG_LIBERTAS) += libertas/
- 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 @@
+ rtl8180-objs := rtl8180_dev.o rtl8180_rtl8225.o rtl8180_sa2400.o rtl8180_max2820.o rtl8180_grf5101.o
+--- a/net/wireless/core.c 2008-06-27 13:55:48.000000000 -0700
++++ b/net/wireless/core.c 2008-06-27 13:55:49.000000000 -0700
+@@ -71,9 +71,9 @@
+ ifindex = nla_get_u32(info->attrs[NL80211_ATTR_IFINDEX]);
+ dev = dev_get_by_index(&init_net, ifindex);
+ if (dev) {
+- if (dev->ieee80211_ptr)
++ if (((struct wireless_dev *)dev->ieee80211_ptr))
+ byifidx =
+- wiphy_to_dev(dev->ieee80211_ptr->wiphy);
++ wiphy_to_dev(((struct wireless_dev *)dev->ieee80211_ptr)->wiphy);
+ dev_put(dev);
+ }
+ err = -ENODEV;
+@@ -123,8 +123,8 @@
+ dev = dev_get_by_index(&init_net, ifindex);
+ if (!dev)
+ goto out;
+- if (dev->ieee80211_ptr) {
+- drv = wiphy_to_dev(dev->ieee80211_ptr->wiphy);
++ if (((struct wireless_dev *)dev->ieee80211_ptr)) {
++ drv = wiphy_to_dev(((struct wireless_dev *)dev->ieee80211_ptr)->wiphy);
+ mutex_lock(&drv->mtx);
+ } else
+ drv = ERR_PTR(-ENODEV);
+@@ -368,28 +368,28 @@
+ struct net_device *dev = ndev;
+ struct cfg80211_registered_device *rdev;
- /* 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 @@
- # Makefile for USB Network drivers
- #
+- if (!dev->ieee80211_ptr)
++ if (!((struct wireless_dev *)dev->ieee80211_ptr))
+ return 0;
--obj-$(CONFIG_USB_CATC) += catc.o
--obj-$(CONFIG_USB_KAWETH) += kaweth.o
--obj-$(CONFIG_USB_PEGASUS) += pegasus.o
--obj-$(CONFIG_USB_RTL8150) += rtl8150.o
--obj-$(CONFIG_USB_NET_AX8817X) += asix.o
- obj-$(CONFIG_USB_NET_CDCETHER) += cdc_ether.o
--obj-$(CONFIG_USB_NET_DM9601) += dm9601.o
--obj-$(CONFIG_USB_NET_GL620A) += gl620a.o
--obj-$(CONFIG_USB_NET_NET1080) += net1080.o
--obj-$(CONFIG_USB_NET_PLUSB) += plusb.o
- obj-$(CONFIG_USB_NET_RNDIS_HOST) += rndis_host.o
--obj-$(CONFIG_USB_NET_CDC_SUBSET) += cdc_subset.o
--obj-$(CONFIG_USB_NET_ZAURUS) += zaurus.o
--obj-$(CONFIG_USB_NET_MCS7830) += mcs7830.o
- obj-$(CONFIG_USB_USBNET) += usbnet.o
+- rdev = wiphy_to_dev(dev->ieee80211_ptr->wiphy);
++ rdev = wiphy_to_dev(((struct wireless_dev *)dev->ieee80211_ptr)->wiphy);
- ifeq ($(CONFIG_USB_DEBUG),y)
+ switch (state) {
+ case NETDEV_REGISTER:
+ mutex_lock(&rdev->devlist_mtx);
+- list_add(&dev->ieee80211_ptr->list, &rdev->netdev_list);
++ list_add(&((struct wireless_dev *)dev->ieee80211_ptr)->list, &rdev->netdev_list);
+ if (sysfs_create_link(&dev->dev.kobj, &rdev->wiphy.dev.kobj,
+ "phy80211")) {
+ printk(KERN_ERR "wireless: failed to add phy80211 "
+ "symlink to netdev!\n");
+ }
+- dev->ieee80211_ptr->netdev = dev;
++ ((struct wireless_dev *)dev->ieee80211_ptr)->netdev = dev;
+ mutex_unlock(&rdev->devlist_mtx);
+ break;
+ case NETDEV_UNREGISTER:
+ mutex_lock(&rdev->devlist_mtx);
+- if (!list_empty(&dev->ieee80211_ptr->list)) {
++ if (!list_empty(&((struct wireless_dev *)dev->ieee80211_ptr)->list)) {
+ sysfs_remove_link(&dev->dev.kobj, "phy80211");
+- list_del_init(&dev->ieee80211_ptr->list);
++ list_del_init(&((struct wireless_dev *)dev->ieee80211_ptr)->list);
+ }
+ mutex_unlock(&rdev->devlist_mtx);
+ break;