blob: 6e78804fd2ee0e3dd25ebaa4ac68ade55dd03eb7 [file] [log] [blame]
developer05f3b2b2024-08-19 19:17:34 +08001From 0f848ffb35cc45beb156069d3856b14414e9a6ee Mon Sep 17 00:00:00 2001
developer7af0f762023-05-22 15:16:16 +08002From: Evelyn Tsai <evelyn.tsai@mediatek.com>
3Date: Fri, 19 May 2023 07:05:22 +0800
developera20cdc22024-05-31 18:57:31 +08004Subject: [PATCH 2002/2015] wifi: mt76: mt7915: wed: add fill receive path to
developerda18a742023-04-06 13:44:00 +08005 report wed idx
developerf79ad452022-07-12 11:37:54 +08006
7Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
8---
developer7af0f762023-05-22 15:16:16 +08009 mt7915/main.c | 18 ++++++++++++++++++
10 1 file changed, 18 insertions(+)
developerf79ad452022-07-12 11:37:54 +080011
12diff --git a/mt7915/main.c b/mt7915/main.c
developer05f3b2b2024-08-19 19:17:34 +080013index 778c73e9..abafa5e4 100644
developerf79ad452022-07-12 11:37:54 +080014--- a/mt7915/main.c
15+++ b/mt7915/main.c
developer05f3b2b2024-08-19 19:17:34 +080016@@ -1848,6 +1848,23 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
developer1a173672023-12-21 14:49:33 +080017
developerf79ad452022-07-12 11:37:54 +080018 return 0;
19 }
developer1a173672023-12-21 14:49:33 +080020+
developerf79ad452022-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+}
developer1a173672023-12-21 14:49:33 +080037 #endif
38
39 const struct ieee80211_ops mt7915_ops = {
developer05f3b2b2024-08-19 19:17:34 +080040@@ -1910,6 +1927,7 @@ const struct ieee80211_ops mt7915_ops = {
developerf79ad452022-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,
developer753619c2024-02-22 13:42:45 +080045 .net_setup_tc = mt76_wed_net_setup_tc,
developerf79ad452022-07-12 11:37:54 +080046 #endif
47 };
48--
developerbd9fa1e2023-10-16 11:04:00 +0800492.18.0
developerf79ad452022-07-12 11:37:54 +080050