diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index d7364ca..b6294b6 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -464,7 +464,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, * called by others with block-tx. */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0))) cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false, 0); #else @@ -483,7 +483,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, if (!rtw_cfg80211_allow_ch_switch_notify(adapter)) goto exit; -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0))) cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0); #else @@ -1159,7 +1159,7 @@ check_bss: #endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)) roam_info.links[0].bssid = cur_network->network.MacAddress; #else roam_info.bssid = cur_network->network.MacAddress; @@ -1923,7 +1923,7 @@ exit: } static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) , int link_id #endif , u8 key_index @@ -2088,7 +2088,7 @@ addkey_end: } static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) , int link_id #endif , u8 keyid @@ -2279,7 +2279,7 @@ exit: } static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) int link_id, #endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) @@ -2303,7 +2303,7 @@ 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, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) int link_id, #endif u8 key_index @@ -2355,7 +2355,7 @@ static int cfg80211_rtw_set_default_key(struct wiphy *wiphy, #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)) int cfg80211_rtw_set_default_mgmt_key(struct wiphy *wiphy, struct net_device *ndev, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) int link_id, #endif u8 key_index) @@ -5448,7 +5448,7 @@ exit: } static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0)) struct cfg80211_ap_update *info) #else struct cfg80211_beacon_data *info) @@ -5469,7 +5469,7 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd rtw_cfg80211_set_proberesp_ies(ndev, info->proberesp_ies, info->proberesp_ies_len); #endif /* not_yet */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0)) if (info->beacon.assocresp_ies_len > 0) rtw_cfg80211_set_assocresp_ies(ndev, info->beacon.assocresp_ies, info->beacon.assocresp_ies_len); @@ -5484,7 +5484,7 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd return ret; } -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id) #else @@ -6870,7 +6870,7 @@ exit: #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)) static int cfg80211_rtw_get_channel(struct wiphy *wiphy, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) struct wireless_dev *wdev, unsigned int link_id, #else struct wireless_dev *wdev, @@ -10819,7 +10819,7 @@ void rtw_wdev_unregister(struct wireless_dev *wdev) rtw_cfg80211_indicate_scan_done(adapter, _TRUE); #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) || defined(COMPAT_KERNEL_RELEASE) - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) if (wdev->links[0].client.current_bss) { #else if (wdev->current_bss) { diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index d9562cc..8610688 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -2148,7 +2148,7 @@ 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(5, 14, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) netif_napi_add_weight(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT); #else netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT); diff --git a/os_dep/linux/usb_intf.c b/os_dep/linux/usb_intf.c index 8e36e48..2cb028c 100644 --- a/os_dep/linux/usb_intf.c +++ b/os_dep/linux/usb_intf.c @@ -336,7 +336,7 @@ struct rtw_usb_drv usb_drv = { .usbdrv.reset_resume = rtw_resume, #endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)) .usbdrv.drvwrap.driver.shutdown = rtw_dev_shutdown, #else .usbdrv.driver.shutdown = rtw_dev_shutdown, diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index d6bf839..fc56358 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -1309,7 +1309,7 @@ u32 _rtw_down_sema(_sema *sema) inline void thread_exit(_completion *comp) { #ifdef PLATFORM_LINUX -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)) kthread_complete_and_exit(comp, 0); #else complete_and_exit(comp, 0);