blob: 582bbed8aae1bc717f45c134171ab219b8740078 [file] [log] [blame]
developer78848c62023-04-06 13:44:00 +08001From 1f2dde1362491043417d50ade6825e1918bc7f4e Mon Sep 17 00:00:00 2001
developer3262bf82022-07-12 11:37:54 +08002From: Sujuan Chen <sujuan.chen@mediatek.com>
3Date: Thu, 19 May 2022 13:44:42 +0800
developer78848c62023-04-06 13:44:00 +08004Subject: [PATCH 3002/3012] wifi: mt76: mt7915: wed: add fill receive path to
5 report wed idx
developer3262bf82022-07-12 11:37:54 +08006
7Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
8---
developerc89c5472022-08-02 13:00:04 +08009 mt7915/main.c | 19 +++++++++++++++++++
developer3262bf82022-07-12 11:37:54 +080010 1 file changed, 19 insertions(+)
11
12diff --git a/mt7915/main.c b/mt7915/main.c
developer78848c62023-04-06 13:44:00 +080013index 922957f6..b68992de 100644
developer3262bf82022-07-12 11:37:54 +080014--- a/mt7915/main.c
15+++ b/mt7915/main.c
developer78848c62023-04-06 13:44:00 +080016@@ -1565,6 +1565,24 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
developer3262bf82022-07-12 11:37:54 +080017
18 return 0;
19 }
20+
21+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+}
37+
38 #endif
39
40 const struct ieee80211_ops mt7915_ops = {
developer78848c62023-04-06 13:44:00 +080041@@ -1617,5 +1635,6 @@ const struct ieee80211_ops mt7915_ops = {
developer3262bf82022-07-12 11:37:54 +080042 .set_radar_background = mt7915_set_radar_background,
43 #ifdef CONFIG_NET_MEDIATEK_SOC_WED
44 .net_fill_forward_path = mt7915_net_fill_forward_path,
45+ .net_fill_receive_path = mt7915_net_fill_receive_path,
46 #endif
47 };
48--
developer78848c62023-04-06 13:44:00 +0800492.39.0
developer3262bf82022-07-12 11:37:54 +080050