AmadeusGhost 124116564e
rtl8189es: add new package
(cherry picked from commit b8d43ba477534cf1723c1d50a50abaeca1e2c3fa)
2022-01-23 11:54:58 +08:00

32 lines
1.3 KiB
Diff

diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
index b5eb513..901501a 100644
--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -5573,7 +5573,7 @@ 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)
@@ -5583,7 +5583,7 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
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
@@ -6516,7 +6516,7 @@ static struct cfg80211_ops rtw_cfg80211_ops = {
.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,