blob: 4e69f7daf65b7f1d6fe0286c71b4fc473353c35d [file] [log] [blame]
From 9249b7fe460dca2eb73c3389689bfa1a9808a79b Mon Sep 17 00:00:00 2001
From: Sujuan Chen <sujuan.chen@mediatek.com>
Date: Fri, 23 Dec 2022 18:12:41 +0800
Subject: [PATCH 2/2] mac80211: mtk: register .ndo_setup_tc in wifi net
device
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
---
net/mac80211/iface.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 35f1233..73b00f5 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -932,6 +932,8 @@ static int ieee80211_netdev_fill_receive_path(struct net_device_path_ctx *ctx,
return ret;
}
+extern int mtk_eth_setup_tc(struct net_device *dev, enum tc_setup_type type,
+ void *type_data);
static const struct net_device_ops ieee80211_dataif_8023_ops = {
#if LINUX_VERSION_IS_LESS(4,10,0)
@@ -952,6 +954,9 @@ static const struct net_device_ops ieee80211_dataif_8023_ops = {
#endif
.ndo_fill_forward_path = ieee80211_netdev_fill_forward_path,
.ndo_fill_receive_path = ieee80211_netdev_fill_receive_path,
+#ifdef CONFIG_NET_MEDIATEK_SOC_WED
+ .ndo_setup_tc = mtk_eth_setup_tc,
+#endif
};
static bool ieee80211_iftype_supports_hdr_offload(enum nl80211_iftype iftype)
@@ -1504,6 +1509,9 @@ static void ieee80211_if_setup(struct net_device *dev)
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
dev->netdev_ops = &ieee80211_dataif_ops;
netdev_set_priv_destructor(dev, ieee80211_if_free);
+#if IS_ENABLED(CONFIG_NET_MEDIATEK_SOC_WED)
+ dev->features |= NETIF_F_HW_TC;
+#endif
}
static void ieee80211_if_setup_no_queue(struct net_device *dev)
--
2.18.0