diff --git a/ioctl_cfg80211.c b/ioctl_cfg80211.c index 0ea5460..ae9c125 100644 --- a/ioctl_cfg80211.c +++ b/ioctl_cfg80211.c @@ -1346,13 +1346,15 @@ exit: return ret; } -static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev, +static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) + , int link_id +#endif + , u8 key_index #if (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, -#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) */ - struct key_params *params) + , bool pairwise +#endif + , const u8 *mac_addr, struct key_params *params) { char *alg_name; u32 param_len; @@ -1483,14 +1485,16 @@ addkey_end: } -static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev, +static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) + , int link_id +#endif + , u8 keyid #if (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, -#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) */ - void *cookie, - void (*callback)(void *cookie, struct key_params *)) + , bool pairwise +#endif + , const u8 *mac_addr, void *cookie + , void (*callback)(void *cookie, struct key_params *)) { RTW_INFO(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev)); return 0; @@ -1498,6 +1502,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, 1, 0) + int link_id, +#endif 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) @@ -1517,7 +1524,11 @@ 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, 1, 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 #endif diff --git a/os_intfs.c b/os_intfs.c index 2f5dc6c..1e567c9 100644 --- a/os_intfs.c +++ b/os_intfs.c @@ -1319,7 +1319,11 @@ static int rtw_os_ndev_register(_adapter *adapter, const char *name) u8 rtnl_lock_needed = rtw_rtnl_lock_needed(dvobj); #ifdef CONFIG_RTW_NAPI +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1,0) netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT); +#else + netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll); +#endif #endif /* CONFIG_RTW_NAPI */ #if defined(CONFIG_IOCTL_CFG80211)