From f99f244be346544b97a4a1d84228a1226f848bd6 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Mon, 28 Nov 2022 12:47:29 -0600 Subject: [PATCH] rtl8188eu: Fix build on kernel 6.1 Signed-off-by: Larry Finger --- osdep_service.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/osdep_service.c b/osdep_service.c index 0388a1c..de76d75 100644 --- a/osdep_service.c +++ b/osdep_service.c @@ -1407,7 +1407,11 @@ u64 rtw_division64(u64 x, u64 y) inline u32 rtw_random32(void) { #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)) +#if LINUX_VERSION_CODE >- KERNEL_VERSION(6, 1, 0) + return get_random_u32(); +#else return prandom_u32(); +#endif #elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)) u32 random_int; get_random_bytes(&random_int , 4);