blob: 7fdee4c43afeaf6cef2019f33db3b6f4b237b165 [file] [log] [blame]
developer064da3c2023-06-13 15:57:26 +08001From e5136e5f940adf55f1e7604960dba89e24a187bb Mon Sep 17 00:00:00 2001
2From: "sujuan.chen" <sujuan.chen@mediatek.com>
3Date: Thu, 13 Apr 2023 14:12:16 +0800
4Subject: [PATCH 2005/2008] wifi: mt76: mt7996: wed: add mt7996_net_setup_tc to
5 support wifi2wifi offload
6
7Signed-off-by: sujuan.chen <sujuan.chen@mediatek.com>
8---
9 mt7996/main.c | 19 +++++++++++++++++++
10 1 file changed, 19 insertions(+)
11
12diff --git a/mt7996/main.c b/mt7996/main.c
13index 50fa6523..cebac4ab 100644
14--- a/mt7996/main.c
15+++ b/mt7996/main.c
16@@ -1446,6 +1446,24 @@ mt7996_net_fill_forward_path(struct ieee80211_hw *hw,
17 return 0;
18 }
19
20+static int mt7996_net_setup_tc(struct ieee80211_hw *hw,
21+ struct ieee80211_vif *vif,
22+ struct net_device *ndev,
23+ enum tc_setup_type type,
24+ void *type_data)
25+
26+{
27+ struct mt7996_dev *dev = mt7996_hw_dev(hw);
28+ struct mtk_wed_device *wed = &dev->mt76.mmio.wed;
29+
30+ if (!mtk_wed_device_active(wed))
31+ return -ENODEV;
32+
33+ mtk_wed_device_setup_tc(wed, ndev, type, type_data);
34+
35+ return 0;
36+}
37+
38 #endif
39
40 const struct ieee80211_ops mt7996_ops = {
41@@ -1496,5 +1514,6 @@ const struct ieee80211_ops mt7996_ops = {
42 .set_radar_background = mt7996_set_radar_background,
43 #ifdef CONFIG_NET_MEDIATEK_SOC_WED
44 .net_fill_forward_path = mt7996_net_fill_forward_path,
45+ .net_setup_tc = mt7996_net_setup_tc,
46 #endif
47 };
48--
492.39.2
50