brcm2708: switch to 3.14
[openwrt.git] / package / kernel / mac80211 / patches / 160-backports-only-add-net_get_random_once-when-not-avai.patch
1 From 6e5603fa9e5b0d3c602eb1672473e81a1692f61e Mon Sep 17 00:00:00 2001
2 From: Hauke Mehrtens <hauke@hauke-m.de>
3 Date: Sat, 31 May 2014 15:52:42 +0200
4 Subject: [PATCH] backports: only add net_get_random_once() when not available
5
6 Upstream commit: d787b3dd3b4fcb5f40eb6532163dc3abdca4fd45
7
8 net_get_random_once() was added unconditionally also when the kernel we
9 are compiling against already provided this function, this patch checks
10 that first.
11
12 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
13 ---
14  backport/backport-include/linux/net.h | 2 +-
15  1 file changed, 1 insertion(+), 1 deletion(-)
16
17 --- a/backport-include/linux/net.h
18 +++ b/backport-include/linux/net.h
19 @@ -64,7 +64,7 @@ do {                                                          \
20   * may affect tracing. My recommendation is that if you have a need for
21   * static keys you just require at least 3.5 to remain sane.
22   */
23 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
24 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) && !defined(net_get_random_once)
25  #define __BACKPORT_NET_GET_RANDOM_ONCE 1
26  #endif
27  #endif /* ___NET_RANDOM_STATIC_KEY_INIT */