blob: 98ec448c6ec0b3b9207af2bc5054930471cdd879 [file] [log] [blame]
developer3f52c302024-04-08 14:36:46 +08001From 6fa429e617e59379bd82c8dbef851e99954676ed Mon Sep 17 00:00:00 2001
developerad9333b2023-05-22 15:16:16 +08002From: Evelyn Tsai <evelyn.tsai@mediatek.com>
3Date: Fri, 19 May 2023 07:05:22 +0800
developer3f52c302024-04-08 14:36:46 +08004Subject: [PATCH 2002/2014] wifi: mt76: mt7915: wed: add fill receive path to
developer78848c62023-04-06 13:44:00 +08005 report wed idx
developer3262bf82022-07-12 11:37:54 +08006
7Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
8---
developerad9333b2023-05-22 15:16:16 +08009 mt7915/main.c | 18 ++++++++++++++++++
10 1 file changed, 18 insertions(+)
developer3262bf82022-07-12 11:37:54 +080011
12diff --git a/mt7915/main.c b/mt7915/main.c
developer3f52c302024-04-08 14:36:46 +080013index ab60159..b3e06aa 100644
developer3262bf82022-07-12 11:37:54 +080014--- a/mt7915/main.c
15+++ b/mt7915/main.c
developer3f52c302024-04-08 14:36:46 +080016@@ -1785,6 +1785,23 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
developerd243af02023-12-21 14:49:33 +080017
developer3262bf82022-07-12 11:37:54 +080018 return 0;
19 }
developerd243af02023-12-21 14:49:33 +080020+
developer3262bf82022-07-12 11:37:54 +080021+static int
22+mt7915_net_fill_receive_path(struct ieee80211_hw *hw,
23+ struct net_device_path_ctx *ctx,
24+ struct net_device_path *path)
25+{
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+ path->dev = ctx->dev;
33+ path->mtk_wdma.wdma_idx = wed->wdma_idx;
34+
35+ return 0;
36+}
developerd243af02023-12-21 14:49:33 +080037 #endif
38
39 const struct ieee80211_ops mt7915_ops = {
developer3f52c302024-04-08 14:36:46 +080040@@ -1841,6 +1858,7 @@ const struct ieee80211_ops mt7915_ops = {
developer3262bf82022-07-12 11:37:54 +080041 .set_radar_background = mt7915_set_radar_background,
42 #ifdef CONFIG_NET_MEDIATEK_SOC_WED
43 .net_fill_forward_path = mt7915_net_fill_forward_path,
44+ .net_fill_receive_path = mt7915_net_fill_receive_path,
developerebda9012024-02-22 13:42:45 +080045 .net_setup_tc = mt76_wed_net_setup_tc,
developer3262bf82022-07-12 11:37:54 +080046 #endif
47 };
48--
developere35b8e42023-10-16 11:04:00 +0800492.18.0
developer3262bf82022-07-12 11:37:54 +080050