mirror of
https://github.com/cilynx/rtl88x2bu
synced 2025-08-28 12:57:47 +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:
parent
df1250854b
commit
19db30f734
@ -2699,7 +2699,9 @@ u64 rtw_division64(u64 x, u64 y)
|
|||||||
inline u32 rtw_random32(void)
|
inline u32 rtw_random32(void)
|
||||||
{
|
{
|
||||||
#ifdef PLATFORM_LINUX
|
#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();
|
return prandom_u32();
|
||||||
#elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18))
|
#elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18))
|
||||||
u32 random_int;
|
u32 random_int;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user