blob: 37ebdd18762e45244c83a15ced379aab23c7a6d8 [file] [log] [blame]
developerc89c5472022-08-02 13:00:04 +08001From 552c7b193e72472b522153449f195fbb46f2b6ed 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
developerd4975692022-07-15 18:30:03 +08004Subject: [PATCH 3003/3003] mt76: add fill receive path to report wed idx
developer3262bf82022-07-12 11:37:54 +08005
6Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
7---
developerc89c5472022-08-02 13:00:04 +08008 mt7915/main.c | 19 +++++++++++++++++++
developer3262bf82022-07-12 11:37:54 +08009 1 file changed, 19 insertions(+)
10
11diff --git a/mt7915/main.c b/mt7915/main.c
developerc89c5472022-08-02 13:00:04 +080012index 9c808ff..74c6f7c 100644
developer3262bf82022-07-12 11:37:54 +080013--- a/mt7915/main.c
14+++ b/mt7915/main.c
developerc89c5472022-08-02 13:00:04 +080015@@ -1475,6 +1475,24 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
developer3262bf82022-07-12 11:37:54 +080016
17 return 0;
18 }
19+
20+static int
21+mt7915_net_fill_receive_path(struct ieee80211_hw *hw,
22+ struct net_device_path_ctx *ctx,
23+ struct net_device_path *path)
24+{
25+ struct mt7915_dev *dev = mt7915_hw_dev(hw);
26+ struct mtk_wed_device *wed = &dev->mt76.mmio.wed;
27+
28+ if (!mtk_wed_device_active(wed))
29+ return -ENODEV;
30+
31+ path->dev = ctx->dev;
32+ path->mtk_wdma.wdma_idx = wed->wdma_idx;
33+
34+ return 0;
35+}
36+
37 #endif
38
39 const struct ieee80211_ops mt7915_ops = {
developerc89c5472022-08-02 13:00:04 +080040@@ -1526,5 +1544,6 @@ 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,
45 #endif
46 };
47--
developerc89c5472022-08-02 13:00:04 +0800482.18.0
developer3262bf82022-07-12 11:37:54 +080049