mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-10 03:09:08 +08:00
c741baa9e8
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
59 lines
2.2 KiB
Diff
59 lines
2.2 KiB
Diff
diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
|
|
index d9c81c9..3e7e27a 100755
|
|
--- a/os_dep/linux/ioctl_cfg80211.c
|
|
+++ b/os_dep/linux/ioctl_cfg80211.c
|
|
@@ -7149,7 +7149,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)
|
|
@@ -7178,7 +7178,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)
|
|
SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_PROBE_REQ, upd->interface_stypes & BIT(IEEE80211_STYPE_PROBE_REQ >> 4));
|
|
#else
|
|
switch (frame_type) {
|
|
@@ -9467,7 +9467,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,
|
|
diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c
|
|
index 257c581..f97fa24 100755
|
|
--- a/os_dep/linux/os_intfs.c
|
|
+++ b/os_dep/linux/os_intfs.c
|
|
@@ -1302,6 +1302,14 @@ unsigned int rtw_classify8021d(struct sk_buff *skb)
|
|
}
|
|
|
|
|
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0))
|
|
+static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb
|
|
+ , struct net_device *sb_dev
|
|
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(5,2,0))
|
|
+ , select_queue_fallback_t fallback
|
|
+ #endif
|
|
+)
|
|
+#else
|
|
static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb
|
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)
|
|
, void *accel_priv
|
|
@@ -1310,6 +1318,7 @@ static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb
|
|
#endif
|
|
#endif
|
|
)
|
|
+#endif
|
|
{
|
|
_adapter *padapter = rtw_netdev_priv(dev);
|
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|