blob: e62d01c50db07334d1f0402eb0cfd8481111c77e [file] [log] [blame]
From 15e621e5bc992bf2a40f1897ca76fb63e93ba394 Mon Sep 17 00:00:00 2001
From: "sujuan.chen" <sujuan.chen@mediatek.com>
Date: Thu, 13 Apr 2023 14:12:16 +0800
Subject: [PATCH 2005/2012] wifi: mt76: mt7996: wed: add mt7996_net_setup_tc to
support wifi2wifi offload
Signed-off-by: sujuan.chen <sujuan.chen@mediatek.com>
---
mt7996/main.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/mt7996/main.c b/mt7996/main.c
index e6be05656..1ccd07802 100644
--- a/mt7996/main.c
+++ b/mt7996/main.c
@@ -1549,6 +1549,24 @@ mt7996_net_fill_forward_path(struct ieee80211_hw *hw,
return 0;
}
+static int mt7996_net_setup_tc(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif,
+ struct net_device *ndev,
+ enum tc_setup_type type,
+ void *type_data)
+
+{
+ struct mt7996_dev *dev = mt7996_hw_dev(hw);
+ struct mtk_wed_device *wed = &dev->mt76.mmio.wed;
+
+ if (!mtk_wed_device_active(wed))
+ return -ENODEV;
+
+ mtk_wed_device_setup_tc(wed, ndev, type, type_data);
+
+ return 0;
+}
+
#endif
const struct ieee80211_ops mt7996_ops = {
@@ -1599,5 +1617,6 @@ const struct ieee80211_ops mt7996_ops = {
.set_radar_background = mt7996_set_radar_background,
#ifdef CONFIG_NET_MEDIATEK_SOC_WED
.net_fill_forward_path = mt7996_net_fill_forward_path,
+ .net_setup_tc = mt7996_net_setup_tc,
#endif
};
--
2.39.2