47 lines
1.7 KiB
Diff
Raw Normal View History

--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -7094,14 +7094,14 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
#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)
#endif
{
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) || defined(BUILD_OPENWRT)
u32 rtw_mask = BIT(IEEE80211_STYPE_PROBE_REQ >> 4);
#endif
@@ -7110,7 +7110,7 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
#endif
/* hardcoded always true, to make it pass compilation */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) || defined(BUILD_OPENWRT)
bool reg = true;
#endif
@@ -7137,7 +7137,7 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
/* Wait QC Verify */
return;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) || defined(BUILD_OPENWRT)
switch (upd->interface_stypes) {
#else
switch (frame_type) {
@@ -9463,7 +9463,7 @@ static struct cfg80211_ops rtw_cfg80211_ops = {
#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))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) || defined(BUILD_OPENWRT)
.update_mgmt_frame_registrations = cfg80211_rtw_mgmt_frame_register,
#else
.mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,