aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2008-05-29 17:31:46 +0530
committerLuis R. Rodriguez <lrodriguez@atheros.com>2008-05-29 17:31:46 +0530
commit6e8d419d680fdd95d48b5e2aa5c59ff845362919 (patch)
tree0a5f3c23a5968a5d79df8a7a64ccff1e78e6e961
parent65721c860e8481a6969c072058ee8f4d19060ae8 (diff)
downloadcompat-wireless-2.6-old-6e8d419d680fdd95d48b5e2aa5c59ff845362919.tar.gz
Port skb_get_queue_mapping().
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
-rw-r--r--compat/compat.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/compat/compat.h b/compat/compat.h
index a5a412e..a844214 100644
--- a/compat/compat.h
+++ b/compat/compat.h
@@ -135,6 +135,25 @@ static inline void pci_clear_mwi(struct pci_dev *dev)
/* Compat work for 2.6.21, 2.6.22 and 2.6.23 */
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
+/* Added as of 2.6.24 in include/linux/skbuff.h.
+ *
+ * Although 2.6.23 does support for CONFIG_NETDEVICES_MULTIQUEUE
+ * this helper was not added until 2.6.24. This implementation
+ * is exactly as it is on newer kernels.
+ *
+ * Older kernels just use queue 0 as it didn't support
+ * CONFIG_NETDEVICES_MULTIQUEUE. This added support on
+ * the network stack to use multiple hardware TX queues */
+static inline u16 skb_get_queue_mapping(struct sk_buff *skb)
+{
+#ifdef CONFIG_NETDEVICES_MULTIQUEUE
+ return skb->queue_mapping;
+#else
+ return 0;
+#endif
+}
+
+
/*
* Force link bug if constructor is used, can't be done compatibly
* because constructor arguments were swapped since then!