summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mediatek/mt76/mt7915/main.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2023-03-20 20:47:04 +0100
committerFelix Fietkau <nbd@nbd.name>2023-09-30 20:03:05 +0200
commit81af5418049ff673ddad0ba9377230bdb13a1f24 (patch)
tree4fb17772623a0cd9ae701de2461ebcacfc6ad3a3 /drivers/net/wireless/mediatek/mt76/mt7915/main.c
parentc948b5da6bbec742b433138e3e3f9537a85af2e5 (diff)
wifi: mt76: mt7915 add tc offloading support
This is used for offloading flows from WLAN to Ethernet, or from WLAN to WLAN Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7915/main.c')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7915/main.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
index d527ab28d4ef..a3fd54cc1911 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
@@ -1653,6 +1653,20 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
return 0;
}
+
+static int
+mt7915_net_setup_tc(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+ struct net_device *netdev, enum tc_setup_type type,
+ void *type_data)
+{
+ struct mt7915_dev *dev = mt7915_hw_dev(hw);
+ struct mtk_wed_device *wed = &dev->mt76.mmio.wed;
+
+ if (!mtk_wed_device_active(wed))
+ return -EOPNOTSUPP;
+
+ return mtk_wed_device_setup_tc(wed, netdev, type, type_data);
+}
#endif
const struct ieee80211_ops mt7915_ops = {
@@ -1707,5 +1721,6 @@ const struct ieee80211_ops mt7915_ops = {
.set_radar_background = mt7915_set_radar_background,
#ifdef CONFIG_NET_MEDIATEK_SOC_WED
.net_fill_forward_path = mt7915_net_fill_forward_path,
+ .net_setup_tc = mt7915_net_setup_tc,
#endif
};