rtl8188eu: Fix build on kernel 6.1

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2022-11-28 12:47:29 -06:00
parent c4908ca4ca
commit f99f244be3

View file

@ -1407,7 +1407,11 @@ 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();
#else
return prandom_u32();
#endif
#elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18))
u32 random_int;
get_random_bytes(&random_int , 4);