blob: c96a09c224f996066287a7ecfd1b34fc06be4f39 [file] [log] [blame]
developer1d9da7d2023-04-15 12:45:34 +08001From 9fa461b123446cb78316366dfb289226ebec9290 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
developer2324aa22023-04-12 11:30:15 +08004Subject: [PATCH 3006/3013] wifi: mt76: mt7915: wed: add mt7915_net_setup_tc to
developerc9233442023-04-04 06:06:17 +08005 support wifi2wifi offload
developerfeeda732022-12-27 10:19:39 +08006
7Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
8---
developerd5c8ff12023-03-28 11:56:21 +08009 mt7915/main.c | 18 ++++++++++++++++++
10 1 file changed, 18 insertions(+)
developerfeeda732022-12-27 10:19:39 +080011
12diff --git a/mt7915/main.c b/mt7915/main.c
developer1d9da7d2023-04-15 12:45:34 +080013index ca42a05..779d038 100644
developerfeeda732022-12-27 10:19:39 +080014--- a/mt7915/main.c
15+++ b/mt7915/main.c
developer1d9da7d2023-04-15 12:45:34 +080016@@ -1613,6 +1613,23 @@ 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,
developerd5c8ff12023-03-28 11:56:21 +080021+ struct ieee80211_vif *vif,
22+ struct net_device *ndev,
23+ enum tc_setup_type type,
24+ void *type_data)
developerfeeda732022-12-27 10:19:39 +080025+{
26+ struct mt7915_dev *dev = mt7915_hw_dev(hw);
27+ struct mtk_wed_device *wed = &dev->mt76.mmio.wed;
28+
29+ if (!mtk_wed_device_active(wed))
30+ return -ENODEV;
31+
32+ mtk_wed_device_setup_tc(wed, ndev, type, type_data);
33+
34+ return 0;
35+}
36+
37 #endif
38
39 const struct ieee80211_ops mt7915_ops = {
developer1d9da7d2023-04-15 12:45:34 +080040@@ -1666,5 +1683,6 @@ const struct ieee80211_ops mt7915_ops = {
developerfeeda732022-12-27 10:19:39 +080041 #ifdef CONFIG_NET_MEDIATEK_SOC_WED
42 .net_fill_forward_path = mt7915_net_fill_forward_path,
43 .net_fill_receive_path = mt7915_net_fill_receive_path,
44+ .net_setup_tc = mt7915_net_setup_tc,
45 #endif
46 };
47--
developer2324aa22023-04-12 11:30:15 +0800482.18.0
developerfeeda732022-12-27 10:19:39 +080049