File kernel5.8.patch of Package rtl8822bu
diff -U 3 -H -d -r -N -- a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
--- a/os_dep/linux/ioctl_cfg80211.c 2020-07-23 15:29:37.000000000 +0200
+++ b/os_dep/linux/ioctl_cfg80211.c 2020-07-25 11:13:34.124600648 +0200
@@ -7325,6 +7325,8 @@
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,
@@ -7332,7 +7334,17 @@
struct net_device *ndev,
#endif
u16 frame_type, bool reg)
+
+#else
+static void cfg80211_rtw_update_mgmt_frame_register(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ struct mgmt_frame_regs *upd)
+#endif
{
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
+ u32 rtw_mask = BIT(IEEE80211_STYPE_PROBE_REQ >> 4);
+#endif
+
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
struct net_device *ndev = wdev_to_ndev(wdev);
#endif
@@ -7347,13 +7359,19 @@
pwdev_priv = adapter_wdev_data(adapter);
#ifdef CONFIG_DEBUG_CFG80211
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
RTW_INFO(FUNC_ADPT_FMT" frame_type:%x, reg:%d\n", FUNC_ADPT_ARG(adapter),
frame_type, reg);
+#else
+ RTW_INFO(FUNC_ADPT_FMT " old_regs:%x new_regs:%x\n",
+ FUNC_ADPT_ARG(adapter), pwdev_priv->mgmt_mask, upd->interface_stypes);
+#endif
#endif
/* Wait QC Verify */
return;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
switch (frame_type) {
case IEEE80211_STYPE_PROBE_REQ: /* 0x0040 */
SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_PROBE_REQ, reg);
@@ -7364,6 +7382,7 @@
default:
break;
}
+#endif
exit:
return;
@@ -9652,7 +9671,14 @@
#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
diff -U 3 -H -d -r -N -- a/os_dep/linux/ioctl_cfg80211.h b/os_dep/linux/ioctl_cfg80211.h
--- a/os_dep/linux/ioctl_cfg80211.h 2020-04-09 18:05:52.000000000 +0200
+++ b/os_dep/linux/ioctl_cfg80211.h 2020-07-25 11:06:10.206361447 +0200
@@ -168,7 +168,11 @@
bool block_scan;
bool power_mgmt;
- /* report mgmt_frame registered */
+ #if LINUX_VERSION_CODE <= KERNEL_VERSION(5,8,0)
+ u32 mgmt_mask;
+ #endif
+
+ /* report mgmt_frame registered */
u16 report_mgmt;
u8 is_mgmt_tx;