]> git.openfabrics.org - ~aditr/compat.git/commitdiff
Add initial 2.6.22 support
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Tue, 12 Jan 2010 01:52:30 +0000 (17:52 -0800)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Tue, 12 Jan 2010 01:52:30 +0000 (17:52 -0800)
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
compat/compat-2.6.28.c
compat/compat-2.6.29.c
include/linux/compat-2.6.23.h
include/linux/compat-2.6.24.h
include/linux/compat-2.6.28.h
include/linux/compat-2.6.29.h

index 959a4294608249df3a8600f79449e51c34f3588d..87ad2d58f2f43d504391cf29c8bf4c461c1785e8 100644 (file)
@@ -16,6 +16,7 @@
 
 /* 2.6.28 compat code goes here */
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23))
 /*
  * Compat-wireless notes for USB backport stuff:
  *
@@ -281,6 +282,7 @@ int usb_anchor_empty(struct usb_anchor *anchor)
 }
 
 EXPORT_SYMBOL_GPL(usb_anchor_empty);
+#endif
 
 
 void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar)
index ea2a99194130389e4ca8b18d25c9a8532382632f..50100d9a9cf886c54f460b66fb70107784436ab5 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/usb.h>
 #include <linux/etherdevice.h>
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23))
 /**
  * usb_unpoison_anchored_urbs - let an anchor be used successfully again
  * @anchor: anchor the requests are bound to
@@ -35,6 +36,7 @@ void usb_unpoison_anchored_urbs(struct usb_anchor *anchor)
        spin_unlock_irqrestore(&anchor->lock, flags);
 }
 EXPORT_SYMBOL_GPL(usb_unpoison_anchored_urbs);
+#endif
 
 /**
  * eth_mac_addr - set new Ethernet hardware address
index c36f90d4b6bf1b47d0360531dfec5720b182eb87..57b0642e8e0bf926a8bf005806925396624b0d37 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/sched.h>
 #include <linux/workqueue.h>
 #include <linux/genetlink.h>
+#include <net/sch_generic.h>
 
 /*
  * Tell gcc if a function is cold. The compiler will assume any path
index 246156c2692105d52a519bf2de104db1e92df972..7b16130048d854f41bb20f80324e8f49e290ab11 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/usb.h>
 #include <linux/types.h>
 #include <linux/list.h>
+#include <linux/scatterlist.h>
 
 #define KEY_BLUETOOTH  237
 #define KEY_WLAN       238
@@ -211,6 +212,16 @@ struct header_ops {
  **/
 static inline void sg_mark_end(struct scatterlist *sg)
 {
+#ifdef CONFIG_DEBUG_SG
+       BUG_ON(sg->sg_magic != SG_MAGIC);
+#endif
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
+       /*
+        * Set termination bit, clear potential chain bit
+       */
+       sg->page_link |= 0x02;
+       sg->page_link &= ~0x01;
+#endif
 }
 
 /**
index 8f90edc6d9bff052ff2da8792d2181d9b0dfaaa6..02297578ac6e2f1502b789144f830a2b01affc8f 100644 (file)
@@ -46,6 +46,8 @@ int pcmcia_loop_config(struct pcmcia_device *p_dev,
                                                 void *priv_data),
                       void *priv_data);
 
+/* USB anchors were added as of 2.6.23 */
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23))
 #if 0
 extern void usb_poison_urb(struct urb *urb);
 #endif
@@ -58,6 +60,7 @@ extern void usb_poison_anchored_urbs(struct usb_anchor *anchor);
 extern struct urb *usb_get_from_anchor(struct usb_anchor *anchor);
 extern void usb_scuttle_anchored_urbs(struct usb_anchor *anchor);
 extern int usb_anchor_empty(struct usb_anchor *anchor);
+#endif
 
 
 void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar);
index b31a58c95484fdbe13019cc5d3446a26bb166b8e..a1a956a38b1ad96584b9a89f98500961b8dc317e 100644 (file)
@@ -47,7 +47,9 @@ static inline struct net_device_stats *dev_get_stats(struct net_device *dev)
        return dev->get_stats(dev);
 }
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23))
 extern void usb_unpoison_anchored_urbs(struct usb_anchor *anchor);
+#endif
 
 #define DIV_ROUND_CLOSEST(x, divisor)(                 \
 {                                                      \