mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-15 01:19:36 +00:00
rtl8188eu: Fix build on kernel 6.1
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
c4908ca4ca
commit
f99f244be3
1 changed files with 4 additions and 0 deletions
|
@ -1407,7 +1407,11 @@ u64 rtw_division64(u64 x, u64 y)
|
||||||
inline u32 rtw_random32(void)
|
inline u32 rtw_random32(void)
|
||||||
{
|
{
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
|
#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();
|
return prandom_u32();
|
||||||
|
#endif
|
||||||
#elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18))
|
#elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18))
|
||||||
u32 random_int;
|
u32 random_int;
|
||||||
get_random_bytes(&random_int , 4);
|
get_random_bytes(&random_int , 4);
|
||||||
|
|
Loading…
Reference in a new issue