diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2008-07-01 03:22:24 -0700 |
---|---|---|
committer | Luis R. Rodriguez <lrodriguez@atheros.com> | 2008-07-01 03:22:24 -0700 |
commit | 1d3498ac79d2c01e5b5fd66c934a6f20929ddb69 (patch) | |
tree | fce801f0c7493422b1bd759484384f5b634a3f3a | |
parent | ce86f126ec84a90257f489903949ffaefa15a5af (diff) | |
download | compat-wireless-2.6-old-1d3498ac79d2c01e5b5fd66c934a6f20929ddb69.tar.gz |
Update compat.diff
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
-rw-r--r-- | compat/compat.diff | 454 |
1 files changed, 227 insertions, 227 deletions
diff --git a/compat/compat.diff b/compat/compat.diff index f137a59..c22010f 100644 --- a/compat/compat.diff +++ b/compat/compat.diff @@ -349,55 +349,6 @@ 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 @@ @@ -471,64 +422,6 @@ 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 @@ @@ -907,8 +800,225 @@ struct ieee80211_tx_stored_packet pending_packet[IEEE80211_MAX_QUEUES]; struct tasklet_struct tx_pending_tasklet; ---- 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 +--- 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 @@ + + 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/ + +-# 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/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; + +- 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/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 @@ + } + + 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) { +@@ -1345,8 +1350,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)); +@@ -1451,8 +1461,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); + +@@ -1632,8 +1647,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-07-01 02:59:06.000000000 -0700 ++++ b/net/mac80211/tx.c 2008-07-01 02:59:07.000000000 -0700 @@ -18,12 +18,17 @@ #include <linux/etherdevice.h> #include <linux/bitmap.h> @@ -935,7 +1045,7 @@ static int inline is_ieee80211_device(struct net_device *dev, struct net_device *master) { -@@ -652,8 +658,12 @@ +@@ -658,8 +664,12 @@ * caution taken here as fragmented ampdu may cause Tx stop. */ if (WARN_ON(tx->flags & IEEE80211_TX_CTL_AMPDU || @@ -948,7 +1058,7 @@ return TX_DROP; first = tx->skb; -@@ -1149,8 +1159,9 @@ +@@ -1148,8 +1158,9 @@ u16 queue; queue = skb_get_queue_mapping(skb); @@ -959,7 +1069,7 @@ if (unlikely(skb->len < 10)) { dev_kfree_skb(skb); -@@ -1192,7 +1203,12 @@ +@@ -1191,7 +1202,12 @@ if (ret == IEEE80211_TX_FRAG_AGAIN) skb = NULL; @@ -972,7 +1082,7 @@ smp_mb(); /* * When the driver gets out of buffers during sending of -@@ -1206,7 +1222,12 @@ +@@ -1205,7 +1221,12 @@ * possible to have happened. */ if (!__netif_subqueue_stopped(local->mdev, queue)) { @@ -985,7 +1095,7 @@ retries++; /* * Driver bug, it's rejecting packets but -@@ -1640,8 +1661,13 @@ +@@ -1637,8 +1658,13 @@ info->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS; skb->dev = local->mdev; @@ -999,7 +1109,7 @@ /* Update skb pointers to various headers since this modified frame * is going to go through Linux networking code that may potentially -@@ -1673,14 +1699,24 @@ +@@ -1670,14 +1696,24 @@ struct ieee80211_tx_stored_packet *store; for (i = 0; i < ieee80211_num_regular_queues(&local->hw); i++) { @@ -1024,7 +1134,7 @@ } } -@@ -1701,8 +1737,11 @@ +@@ -1698,8 +1734,11 @@ /* Check that this queue is ok */ if (__netif_subqueue_stopped(local->mdev, i)) continue; @@ -1037,7 +1147,7 @@ ieee80211_wake_queue(&local->hw, i); continue; } -@@ -1719,7 +1758,12 @@ +@@ -1716,7 +1755,12 @@ if (ret == IEEE80211_TX_FRAG_AGAIN) store->skb = NULL; } else { @@ -1050,113 +1160,3 @@ ieee80211_wake_queue(&local->hw, i); } } ---- 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 @@ - - 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/ - --# 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/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; - -- 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; |