blob: d672e1b6ac962bcaadc9f9064b9a3dcaa28f992d [file] [log] [blame]
developerc04f5402023-02-03 09:22:26 +08001From 8084e069b66a729e756e8bf4d8b283043990aa44 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
developerc04f5402023-02-03 09:22:26 +08004Subject: [PATCH 3009/3010] 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
developerc04f5402023-02-03 09:22:26 +080013index a9980e70..8ebea612 100644
developerfeeda732022-12-27 10:19:39 +080014--- a/mt7915/main.c
15+++ b/mt7915/main.c
developerc04f5402023-02-03 09:22:26 +080016@@ -1604,6 +1604,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 = {
developerc04f5402023-02-03 09:22:26 +080038@@ -1657,5 +1672,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