ipq4019: add support for ZTE MF287 Pro aka DreiNeo Pro
[openwrt/staging/neocturne.git] / package / kernel / rtl8812au-ct / patches / 006-os_dep-osdep_service-use-new-get_random_u32.patch
1 From e8f10b21abd8ae440632f561f8b65f37b4b55cc8 Mon Sep 17 00:00:00 2001
2 From: Christian Marangi <ansuelsmth@gmail.com>
3 Date: Sun, 30 Jul 2023 11:16:32 +0200
4 Subject: [PATCH 1/5] os_dep/osdep_service: use new get_random_u32
5
6 Drop prandom_u32 as got deprecated for get_random_u32.
7
8 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
9 ---
10 os_dep/osdep_service.c | 4 +++-
11 1 file changed, 3 insertions(+), 1 deletion(-)
12
13 --- a/os_dep/osdep_service.c
14 +++ b/os_dep/osdep_service.c
15 @@ -2335,7 +2335,9 @@ u64 rtw_division64(u64 x, u64 y)
16 inline u32 rtw_random32(void)
17 {
18 #ifdef PLATFORM_LINUX
19 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
20 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0))
21 + return get_random_u32();
22 +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
23 return prandom_u32();
24 #elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18))
25 u32 random_int;