diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index a9b9ebf..f741542 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -808,8 +808,13 @@ check_bss: DBG_871X(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter)); #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,0) + roam_info.links[0].channel = notify_channel; + roam_info.links[0].bssid = cur_network->network.MacAddress; +#else roam_info.channel = notify_channel; roam_info.bssid = cur_network->network.MacAddress; +#endif roam_info.req_ie = pmlmepriv->assoc_req+sizeof(struct ieee80211_hdr_3addr)+2; roam_info.req_ie_len = @@ -1517,9 +1522,11 @@ exit: } static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,0)) + int link_id, u8 key_index, bool pairwise, const u8 *mac_addr, +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE) u8 key_index, bool pairwise, const u8 *mac_addr, -#else // (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) +#else // (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) u8 key_index, const u8 *mac_addr, #endif // (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) struct key_params *params) @@ -1668,7 +1675,9 @@ addkey_end: } static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,0)) + int link_id, u8 key_index, bool pairwise, const u8 *mac_addr, +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE) u8 key_index, bool pairwise, const u8 *mac_addr, #else // (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) u8 key_index, const u8 *mac_addr, @@ -1701,7 +1710,9 @@ static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev, } static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,0)) + int link_id, u8 key_index, bool pairwise, const u8 *mac_addr) +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE) u8 key_index, bool pairwise, const u8 *mac_addr) #else // (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) u8 key_index, const u8 *mac_addr) @@ -1722,9 +1733,13 @@ static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev, } static int cfg80211_rtw_set_default_key(struct wiphy *wiphy, - struct net_device *ndev, u8 key_index + struct net_device *ndev, +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,0)) + int link_id, +#endif + u8 key_index, #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)) || defined(COMPAT_KERNEL_RELEASE) - , bool unicast, bool multicast + bool unicast, bool multicast #endif ) { diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index f178f1b..3d96afd 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -2312,7 +2312,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;