From 5e5f5ef10ce2ce545e2523fb62a967081cfcada1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 17 Dec 2023 20:34:30 +0100 Subject: [PATCH] [RTL8852BU] Update for upstream change prandom_u32() => get_random_u32() https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=de492c8 Signed-off-by: MichaIng --- drivers/staging/rtl8852bu/os_dep/osdep_service_linux.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8852bu/os_dep/osdep_service_linux.c b/drivers/staging/rtl8852bu/os_dep/osdep_service_linux.c index ca5ce6942abb..d65a37864b7e 100644 --- a/drivers/staging/rtl8852bu/os_dep/osdep_service_linux.c +++ b/drivers/staging/rtl8852bu/os_dep/osdep_service_linux.c @@ -846,7 +846,9 @@ 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(); +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)) return prandom_u32(); #elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)) u32 random_int;