diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2014-08-11 20:23:20 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2014-08-11 20:23:20 +0000 |
commit | 33264155cb154d17c97c8861cd1bfbe011c170a5 (patch) | |
tree | 0d34f24506d5009d7f1165145e1734a5b23a606b | |
parent | f63509ac89d9b955a048846641a2937600066904 (diff) | |
download | mtk-20170518-33264155cb154d17c97c8861cd1bfbe011c170a5.zip mtk-20170518-33264155cb154d17c97c8861cd1bfbe011c170a5.tar.gz mtk-20170518-33264155cb154d17c97c8861cd1bfbe011c170a5.tar.bz2 |
mac80211: fix warning with kernel 3.14
This fixes a redefinition of net_get_random_once() warning.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
SVN-Revision: 42141
-rw-r--r-- | package/kernel/mac80211/patches/160-backports-only-add-net_get_random_once-when-not-avai.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/160-backports-only-add-net_get_random_once-when-not-avai.patch b/package/kernel/mac80211/patches/160-backports-only-add-net_get_random_once-when-not-avai.patch new file mode 100644 index 0000000..3114c16 --- /dev/null +++ b/package/kernel/mac80211/patches/160-backports-only-add-net_get_random_once-when-not-avai.patch @@ -0,0 +1,27 @@ +From 6e5603fa9e5b0d3c602eb1672473e81a1692f61e Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens <hauke@hauke-m.de> +Date: Sat, 31 May 2014 15:52:42 +0200 +Subject: [PATCH] backports: only add net_get_random_once() when not available + +Upstream commit: d787b3dd3b4fcb5f40eb6532163dc3abdca4fd45 + +net_get_random_once() was added unconditionally also when the kernel we +are compiling against already provided this function, this patch checks +that first. + +Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> +--- + backport/backport-include/linux/net.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/backport-include/linux/net.h ++++ b/backport-include/linux/net.h +@@ -64,7 +64,7 @@ do { \ + * may affect tracing. My recommendation is that if you have a need for + * static keys you just require at least 3.5 to remain sane. + */ +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) && !defined(net_get_random_once) + #define __BACKPORT_NET_GET_RANDOM_ONCE 1 + #endif + #endif /* ___NET_RANDOM_STATIC_KEY_INIT */ |