build/patch/kernel/archive/sunxi-6.1/patches.megous/8723cs-Port-to-6.1-rc1.patch

35 lines
1.1 KiB
Diff

From 6e627b477d7ca7a58e68e51e4ed84d65948d7eef Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Mon, 17 Oct 2022 01:44:10 +0200
Subject: [PATCH 146/389] 8723cs: Port to 6.1-rc1
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
drivers/staging/rtl8723cs/os_dep/osdep_service.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/staging/rtl8723cs/os_dep/osdep_service.c b/drivers/staging/rtl8723cs/os_dep/osdep_service.c
index dd3fb044993c..0658fdd045dd 100644
--- a/drivers/staging/rtl8723cs/os_dep/osdep_service.c
+++ b/drivers/staging/rtl8723cs/os_dep/osdep_service.c
@@ -2863,15 +2863,7 @@ u64 rtw_division64(u64 x, u64 y)
inline u32 rtw_random32(void)
{
#ifdef PLATFORM_LINUX
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
- return prandom_u32();
-#elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18))
- u32 random_int;
- get_random_bytes(&random_int , 4);
- return random_int;
-#else
- return random32();
-#endif
+ return get_random_u32();
#elif defined(PLATFORM_WINDOWS)
#error "to be implemented\n"
#elif defined(PLATFORM_FREEBSD)
--
2.35.3