From ea213471cc8a640c12ee30dc6af607ad728f4719 Mon Sep 17 00:00:00 2001 From: Vladimir Sokolovsky Date: Wed, 11 Jul 2012 10:36:25 +0300 Subject: [PATCH] compat: Export ip_tos2prio symbol Signed-off-by: Vladimir Sokolovsky --- compat/Makefile | 1 + compat/compat-3.5.c | 31 +++++++++++++++++++++++++++++++ include/linux/compat-3.5.h | 3 +++ 3 files changed, 35 insertions(+) create mode 100644 compat/compat-3.5.c diff --git a/compat/Makefile b/compat/Makefile index c661f5d..08b5fd7 100644 --- a/compat/Makefile +++ b/compat/Makefile @@ -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-$(CONFIG_COMPAT_KERNEL_3_5) += compat-3.5.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 index 0000000..8e87e18 --- /dev/null +++ b/compat/compat-3.5.c @@ -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 +#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); diff --git a/include/linux/compat-3.5.h b/include/linux/compat-3.5.h index badf7d6..eb11ba1 100644 --- a/include/linux/compat-3.5.h +++ b/include/linux/compat-3.5.h @@ -246,6 +246,9 @@ static inline struct ctl_table_header *register_net_sysctl(struct net *net, { return NULL; } + +extern const __u8 ip_tos2prio[16]; + #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) */ #endif /* LINUX_3_5_COMPAT_H */ -- 2.41.0