2
0
mirror of https://github.com/cilynx/rtl88x2bu synced 2025-08-22 02:01:55 +00:00

Switch to get_random_u32

The commit a251c17aa558d8e3128a528af5cf8b9d7caae4fd in the Linux Kernel
removes the deprecated wrapper `prandom_u32`. The obvious replacement is
named in the commit message and used here.
This commit is contained in:
Max Görner 2022-10-21 10:12:30 +02:00
parent df1250854b
commit 19db30f734

View File

@ -2699,7 +2699,9 @@ u64 rtw_division64(u64 x, u64 y)
inline u32 rtw_random32(void)
{
#ifdef PLATFORM_LINUX
#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;