mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-10 11:09:57 +08:00
2385571e45
Fixes build under kernel 5.15. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org> (cherry picked from commit a85e6c2568ffc5c5dc297253839da4a1be5fbe94) Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
30 lines
1.2 KiB
Diff
30 lines
1.2 KiB
Diff
--- a/os_dep/linux/ioctl_cfg80211.c
|
|
+++ b/os_dep/linux/ioctl_cfg80211.c
|
|
@@ -5569,7 +5569,7 @@ static void cfg80211_rtw_mgmt_frame_regi
|
|
#else
|
|
struct net_device *ndev,
|
|
#endif
|
|
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
|
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) || defined(BUILD_OPENWRT)
|
|
struct mgmt_frame_regs *upd)
|
|
#else
|
|
u16 frame_type, bool reg)
|
|
@@ -5579,7 +5579,7 @@ static void cfg80211_rtw_mgmt_frame_regi
|
|
struct net_device *ndev = wdev_to_ndev(wdev);
|
|
#endif
|
|
_adapter *adapter;
|
|
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
|
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) || defined(BUILD_OPENWRT)
|
|
u16 frame_type = BIT(upd->global_stypes << 4);
|
|
bool reg = false;
|
|
#endif
|
|
@@ -6510,7 +6510,7 @@ static struct cfg80211_ops rtw_cfg80211_
|
|
.action = cfg80211_rtw_mgmt_tx,
|
|
#endif
|
|
|
|
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
|
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) || defined(BUILD_OPENWRT)
|
|
.update_mgmt_frame_registrations = cfg80211_rtw_mgmt_frame_register,
|
|
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
|
|
.mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
|