blob: f5f46f48f9e73a09099d5e23505ba42421aa2312 [file] [log] [blame]
developerd5c8ff12023-03-28 11:56:21 +08001From 1b23af3704c18c7c111992940fc94d2cdef3b830 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
developerd5c8ff12023-03-28 11:56:21 +08004Subject: [PATCH] mt76: mt7915: wed: 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---
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
developerd5c8ff12023-03-28 11:56:21 +080013index 7e7f6073..146e3643 100644
developerfeeda732022-12-27 10:19:39 +080014--- a/mt7915/main.c
15+++ b/mt7915/main.c
developerd5c8ff12023-03-28 11:56:21 +080016@@ -1604,6 +1604,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 = {
developerd5c8ff12023-03-28 11:56:21 +080040@@ -1657,5 +1674,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--
482.18.0
49