diff --git a/drivers/net/wireless/realtek/rtl8821CU/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/realtek/rtl8821CU/os_dep/linux/ioctl_cfg80211.c index 7961df0f954c..4fba0fb18590 100644 --- a/drivers/net/wireless/realtek/rtl8821CU/os_dep/linux/ioctl_cfg80211.c +++ b/drivers/net/wireless/realtek/rtl8821CU/os_dep/linux/ioctl_cfg80211.c @@ -470,9 +470,13 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, #else cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false); #endif +#else +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 144)) + cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false, 0); #else cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, false); #endif +#endif #else cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0); #endif @@ -489,9 +493,13 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, #else cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0); #endif +#else +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)) + cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0); #else cfg80211_ch_switch_notify(adapter->pnetdev, &chdef); #endif +#endif #else int freq = rtw_ch2freq(ch); @@ -1159,7 +1167,7 @@ check_bss: #endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 81)) roam_info.links[0].bssid = cur_network->network.MacAddress; #else roam_info.bssid = cur_network->network.MacAddress; @@ -1923,7 +1931,7 @@ exit: } static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 81)) , int link_id #endif , u8 key_index @@ -2088,7 +2096,7 @@ addkey_end: } static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 81)) , int link_id #endif , u8 keyid @@ -2279,7 +2287,7 @@ exit: } static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 81)) int link_id, #endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) @@ -2303,7 +2311,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(6, 1, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 81)) int link_id, #endif u8 key_index @@ -2355,7 +2363,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(6, 1, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)) int link_id, #endif u8 key_index) @@ -5487,7 +5495,7 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd return ret; } -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 81)) static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id) #else @@ -6873,7 +6881,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, 19, 2)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0)) struct wireless_dev *wdev, unsigned int link_id, #else struct wireless_dev *wdev, @@ -10825,7 +10833,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, 19, 2)) + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 81)) if (wdev->links[0].client.current_bss) { #else if (wdev->current_bss) {