1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-19 14:08:17 +02:00
openwrt/package/kernel/rtl8812au-ct/patches/003-wireless-5.8.patch
John Thomson c123e4f053 rtl8812au-ct: bump to fix kernel 6.1 compile
9b2b203 fix usb_recv_tasklet -Wcast-function-type
 a027da5 fix kernel 6.1 80211 link_id
 7a9c802 fix build for kernel 6.1 prandom
 3a3eb24 fix build for kernel 5.17 PDE_DATA
 fe2afbd fix build for kernel 5.17 const netdev->dev_addr
 7275bae fix build for 5.17 kernel complete_and_exit
 c9c2aa7 Update usb_intf.c

revert the upstream 6.1 link_id (depend on kernel version) changes and
force 6.1 link_id

The downstream patch casting const off the direct dev_addr writes
triggers the runtime check from
Linux d07b26f5bbea ("dev_addr: add a modification check")

Fixes: #13261
Fixes: a07566ead82a ("rtl8812au-ct: fix even more compilation error with kernel 6.1")

Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
2023-08-19 16:38:48 +02:00

31 lines
1.2 KiB
Diff

--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -5196,6 +5196,15 @@ exit:
return ret;
}
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) || defined(BUILD_OPENWRT)
+static void cfg80211_rtw_update_mgmt_frame_registrations(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ struct mgmt_frame_regs *upd)
+{
+
+}
+#endif
+
#if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy,
struct net_device *ndev,
@@ -6009,7 +6018,10 @@ static struct cfg80211_ops rtw_cfg80211_
.cancel_remain_on_channel = cfg80211_rtw_cancel_remain_on_channel,
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0)) || defined(BUILD_OPENWRT)
+ .mgmt_tx = cfg80211_rtw_mgmt_tx,
+ .update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_registrations,
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
.mgmt_tx = cfg80211_rtw_mgmt_tx,
#elif (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,34) && LINUX_VERSION_CODE<=KERNEL_VERSION(2,6,35))
.action = cfg80211_rtw_mgmt_tx,