/* 2.6.28 compat code goes here */
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23))
/*
* Compat-wireless notes for USB backport stuff:
*
}
EXPORT_SYMBOL_GPL(usb_anchor_empty);
+#endif
void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar)
#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
spin_unlock_irqrestore(&anchor->lock, flags);
}
EXPORT_SYMBOL_GPL(usb_unpoison_anchored_urbs);
+#endif
/**
* eth_mac_addr - set new Ethernet hardware address
#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
#include <linux/usb.h>
#include <linux/types.h>
#include <linux/list.h>
+#include <linux/scatterlist.h>
#define KEY_BLUETOOTH 237
#define KEY_WLAN 238
**/
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
}
/**
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
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);
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)( \
{ \