Map prandom_bytes() calls to get_random_bytes() for kernels before
3.8 kernel. This patch is needed by mac80211 rate control code
since following:

commit f7d8ad81ca8c447124821e58f876d1aff996c85f
Author: Karl Beldan <[email protected]>
Date:   Wed Nov 13 10:54:19 2013 +0100

    mac80211: minstrels: spare numerous useless calls to get_random_bytes

Signed-off-by: Arend van Spriel <[email protected]>
---
 backport/backport-include/linux/random.h |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/backport/backport-include/linux/random.h 
b/backport/backport-include/linux/random.h
index 812ce7f..3adde28 100644
--- a/backport/backport-include/linux/random.h
+++ b/backport/backport-include/linux/random.h
@@ -8,6 +8,8 @@
 #define prandom_seed(_seed)            srandom32(_seed)
 #define prandom_u32()                  random32()
 #define prandom_u32_state(_state)      prandom32(_state)
+/* use get_random_bytes() for lack of prandom_bytes() */
+#define prandom_bytes(a, b)            get_random_bytes(a, b)
 #endif
 
 #endif /* __BACKPORT_RANDOM_H */
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to