compat: Export ip_tos2prio symbol
authorVladimir Sokolovsky <vlad@mellanox.com>
Wed, 11 Jul 2012 07:36:25 +0000 (10:36 +0300)
committerVladimir Sokolovsky <vlad@mellanox.com>
Wed, 11 Jul 2012 07:52:11 +0000 (10:52 +0300)
Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
compat/Makefile
compat/compat-3.5.c [new file with mode: 0644]
include/linux/compat-3.5.h

index c661f5d..08b5fd7 100644 (file)
@@ -43,6 +43,7 @@ compat-$(CONFIG_COMPAT_KERNEL_3_3) += \
        compat-3.3.o \
        flow_dissector.o
 compat-$(CONFIG_COMPAT_KERNEL_3_4) += compat-3.4.o
        compat-3.3.o \
        flow_dissector.o
 compat-$(CONFIG_COMPAT_KERNEL_3_4) += compat-3.4.o
+compat-$(CONFIG_COMPAT_KERNEL_3_5) += compat-3.5.o
 
 compat-$(CONFIG_COMPAT_CORDIC) += cordic.o
 compat-$(CONFIG_COMPAT_CRC8) += crc8.o
 
 compat-$(CONFIG_COMPAT_CORDIC) += cordic.o
 compat-$(CONFIG_COMPAT_CRC8) += crc8.o
diff --git a/compat/compat-3.5.c b/compat/compat-3.5.c
new file mode 100644 (file)
index 0000000..8e87e18
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2012 Mellanox Technologies Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Compatibility file for Linux wireless for kernels 3.4.
+ */
+#include <linux/pkt_sched.h>
+#define ECN_OR_COST(class)     TC_PRIO_##class
+
+const __u8 ip_tos2prio[16] = {
+       TC_PRIO_BESTEFFORT,
+       ECN_OR_COST(BESTEFFORT),
+       TC_PRIO_BESTEFFORT,
+       ECN_OR_COST(BESTEFFORT),
+       TC_PRIO_BULK,
+       ECN_OR_COST(BULK),
+       TC_PRIO_BULK,
+       ECN_OR_COST(BULK),
+       TC_PRIO_INTERACTIVE,
+       ECN_OR_COST(INTERACTIVE),
+       TC_PRIO_INTERACTIVE,
+       ECN_OR_COST(INTERACTIVE),
+       TC_PRIO_INTERACTIVE_BULK,
+       ECN_OR_COST(INTERACTIVE_BULK),
+       TC_PRIO_INTERACTIVE_BULK,
+       ECN_OR_COST(INTERACTIVE_BULK)
+};
+EXPORT_SYMBOL(ip_tos2prio);
index badf7d6..eb11ba1 100644 (file)
@@ -246,6 +246,9 @@ static inline struct ctl_table_header *register_net_sysctl(struct net *net,
 {
        return NULL;
 }
 {
        return NULL;
 }
+
+extern const __u8 ip_tos2prio[16];
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) */
 
 #endif /* LINUX_3_5_COMPAT_H */
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) */
 
 #endif /* LINUX_3_5_COMPAT_H */