blob: a3eadce688871e51ee7fb9f01e1c7113ddc952c1 [file] [log] [blame]
developerbd9fa1e2023-10-16 11:04:00 +08001From db9a693311a05bb9df09d59b940b0006953ea93f 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
developerbd9fa1e2023-10-16 11:04:00 +08004Subject: [PATCH 2002/2011] 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
developerbd9fa1e2023-10-16 11:04:00 +080013index e274f02..f08fb2d 100644
developerf79ad452022-07-12 11:37:54 +080014--- a/mt7915/main.c
15+++ b/mt7915/main.c
developerbd9fa1e2023-10-16 11:04:00 +080016@@ -1718,6 +1718,23 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
developerf79ad452022-07-12 11:37:54 +080017 return 0;
18 }
developer7af0f762023-05-22 15:16:16 +080019
developerf79ad452022-07-12 11:37:54 +080020+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+
developer7af0f762023-05-22 15:16:16 +080037 static int
38 mt7915_net_setup_tc(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
39 struct net_device *netdev, enum tc_setup_type type,
developerbd9fa1e2023-10-16 11:04:00 +080040@@ -1785,6 +1802,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,
developer7af0f762023-05-22 15:16:16 +080045 .net_setup_tc = mt7915_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