From: Antonio Larrosa Subject: Fix build with SLE 15-SP3 / Leap 15.3 The SLE 15 SP3/Leap 15.3's kernel includes backported patches to support update_mgmt_frame_registrations instead of mgmt_frame_register which would be expected according to the kernel version, so we force to use the more modern interface. Index: rtl8812au-5.9.3.2+git20210427.6ef5d8f/os_dep/linux/ioctl_cfg80211.c =================================================================== --- rtl8812au-5.9.3.2+git20210427.6ef5d8f.orig/os_dep/linux/ioctl_cfg80211.c +++ rtl8812au-5.9.3.2+git20210427.6ef5d8f/os_dep/linux/ioctl_cfg80211.c @@ -7902,61 +7902,6 @@ exit: return ret; } -#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)) -static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) - struct wireless_dev *wdev, -#else - struct net_device *ndev, -#endif - u16 frame_type, bool reg) -{ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) - struct net_device *ndev = wdev_to_ndev(wdev); -#endif - _adapter *adapter; - struct rtw_wdev_priv *pwdev_priv; - - if (ndev == NULL) - goto exit; - - adapter = (_adapter *)rtw_netdev_priv(ndev); - pwdev_priv = adapter_wdev_data(adapter); - -#ifdef CONFIG_DEBUG_CFG80211 - RTW_INFO(FUNC_ADPT_FMT" frame_type:%x, reg:%d\n", FUNC_ADPT_ARG(adapter), - frame_type, reg); -#endif - - switch (frame_type) { - case IEEE80211_STYPE_AUTH: /* 0x00B0 */ - if (reg > 0) - SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_AUTH); - else - CLR_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_AUTH); - break; -#ifdef not_yet - case IEEE80211_STYPE_PROBE_REQ: /* 0x0040 */ - if (reg > 0) - SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_PROBE_REQ); - else - CLR_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_PROBE_REQ); - break; - case IEEE80211_STYPE_ACTION: /* 0x00D0 */ - if (reg > 0) - SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_ACTION); - else - CLR_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_ACTION); - break; -#endif - default: - break; - } - -exit: - return; -} -#else static void cfg80211_rtw_update_mgmt_frame_register( struct wiphy *wiphy, struct wireless_dev *wdev, @@ -7995,7 +7940,6 @@ static void cfg80211_rtw_update_mgmt_fra exit: return; } -#endif #if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, @@ -10394,11 +10338,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)) - .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, -#else .update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_register, -#endif #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) .action = cfg80211_rtw_mgmt_tx, #endif