1From 9421b0763e5f20babb2c0fd437979a71fbac1739 Mon Sep 17 00:00:00 2001 2From: Christian Stewart <christian@paral.in> 3Date: Tue, 8 Sep 2020 22:46:45 -0700 4Subject: [PATCH] disable rtw_mgmt_frame_register on kernel 5.8.0 5 6rtl8812au: fix build for kernel 5.8 7 8[Source: https://github.com/lwfinger/rtl8812au/commit/ec1591b90dd323185717fa42887f96444cca5921.patch] 9Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> 10Signed-off-by: Christian Stewart <christian@paral.in> 11--- 12 os_dep/linux/ioctl_cfg80211.c | 4 ++++ 13 1 file changed, 4 insertions(+) 14 15diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c 16index 019daf9..13238cb 100644 17--- a/os_dep/linux/ioctl_cfg80211.c 18+++ b/os_dep/linux/ioctl_cfg80211.c 19@@ -5177,6 +5177,7 @@ exit: 20 return ret; 21 } 22 23+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0) 24 static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, 25 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) 26 struct wireless_dev *wdev, 27@@ -5205,6 +5206,7 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, 28 exit: 29 return; 30 } 31+#endif 32 33 #if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) 34 static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, 35@@ -6021,7 +6023,9 @@ static struct cfg80211_ops rtw_cfg80211_ops = { 36 37 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE) 38 .mgmt_tx = cfg80211_rtw_mgmt_tx, 39+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0) 40 .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, 41+#endif 42 #elif (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,34) && LINUX_VERSION_CODE<=KERNEL_VERSION(2,6,35)) 43 .action = cfg80211_rtw_mgmt_tx, 44 #endif 45-- 462.28.0 47 48