blob: 6c8e2ee3bf10d190fc8d3d408b356d5e406fbedf [file] [log] [blame]
developerd75d3632023-01-05 14:31:01 +08001From 7786c799b9c6dfc3d09079e65e896467a62724c7 Mon Sep 17 00:00:00 2001
developerfeeda732022-12-27 10:19:39 +08002From: Sujuan Chen <sujuan.chen@mediatek.com>
3Date: Tue, 27 Dec 2022 09:45:14 +0800
developerf6ebf632023-01-06 19:15:00 +08004Subject: [PATCH 3013/3014] mt76: mt7915: add mt7915_net_setup_tc to support
developerd75d3632023-01-05 14:31:01 +08005 wifi2wifi offload
developerfeeda732022-12-27 10:19:39 +08006
7Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
8---
9 mt7915/main.c | 16 ++++++++++++++++
10 1 file changed, 16 insertions(+)
11
12diff --git a/mt7915/main.c b/mt7915/main.c
developerd75d3632023-01-05 14:31:01 +080013index c87f04b..c281b47 100644
developerfeeda732022-12-27 10:19:39 +080014--- a/mt7915/main.c
15+++ b/mt7915/main.c
16@@ -1598,6 +1598,21 @@ mt7915_net_fill_receive_path(struct ieee80211_hw *hw,
17 return 0;
18 }
19
20+static int mt7915_net_setup_tc(struct ieee80211_hw *hw,
21+ struct net_device *ndev,
22+ int type, void *type_data)
23+{
24+ struct mt7915_dev *dev = mt7915_hw_dev(hw);
25+ struct mtk_wed_device *wed = &dev->mt76.mmio.wed;
26+
27+ if (!mtk_wed_device_active(wed))
28+ return -ENODEV;
29+
30+ mtk_wed_device_setup_tc(wed, ndev, type, type_data);
31+
32+ return 0;
33+}
34+
35 #endif
36
37 const struct ieee80211_ops mt7915_ops = {
38@@ -1651,5 +1666,6 @@ const struct ieee80211_ops mt7915_ops = {
39 #ifdef CONFIG_NET_MEDIATEK_SOC_WED
40 .net_fill_forward_path = mt7915_net_fill_forward_path,
41 .net_fill_receive_path = mt7915_net_fill_receive_path,
42+ .net_setup_tc = mt7915_net_setup_tc,
43 #endif
44 };
45--
462.18.0
47