--- os_dep/linux/ioctl_cfg80211.c.orig 2022-01-02 11:38:57.841191219 -0800 +++ os_dep/linux/ioctl_cfg80211.c 2022-01-02 11:58:40.939268454 -0800 @@ -439,7 +439,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapte #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) if (started) { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)) cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, false); #else cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0); @@ -7456,7 +7456,7 @@ exit: return ret; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0) static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) struct wireless_dev *wdev, @@ -9920,7 +9920,7 @@ static struct cfg80211_ops rtw_cfg80211_ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) .mgmt_tx = cfg80211_rtw_mgmt_tx, -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0) .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, #else .update_mgmt_frame_registrations = cfg80211_rtw_mgmt_frame_register,