blob: bce65e61ac33e9d2d70ed72f3e4197ec372ae9e3 [file] [log] [blame]
developer4f0d84b2023-03-03 14:21:44 +08001From 38e99f5b8641c3b1c054244d3c74229a9c0a470e 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
developer4f0d84b2023-03-03 14:21:44 +08004Subject: [PATCH 3007/3013] 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
developerfd8e1152023-02-14 11:29:23 +080013index c549a183..22d293e9 100644
developerfeeda732022-12-27 10:19:39 +080014--- a/mt7915/main.c
15+++ b/mt7915/main.c
developerfd8e1152023-02-14 11:29:23 +080016@@ -1602,6 +1602,21 @@ mt7915_net_fill_receive_path(struct ieee80211_hw *hw,
developerfeeda732022-12-27 10:19:39 +080017 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 = {
developerfd8e1152023-02-14 11:29:23 +080038@@ -1655,5 +1670,6 @@ const struct ieee80211_ops mt7915_ops = {
developerfeeda732022-12-27 10:19:39 +080039 #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