blob: 19e0e992ec61c9437a0be1479a0c87f03a0b6f6f [file] [log] [blame]
From 4206557087f5b77b3993818b70885e21d7dcffbb Mon Sep 17 00:00:00 2001
From: Sujuan Chen <sujuan.chen@mediatek.com>
Date: Thu, 19 May 2022 13:44:42 +0800
Subject: [PATCH 3003/3003] mt76: add fill receive path to report wed idx
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
---
.../net/wireless/mediatek/mt76/mt7915/main.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/mt7915/main.c b/mt7915/main.c
index 2e721cd0..cfc522f7 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
@@ -1458,6 +1458,24 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
return 0;
}
+
+static int
+mt7915_net_fill_receive_path(struct ieee80211_hw *hw,
+ struct net_device_path_ctx *ctx,
+ struct net_device_path *path)
+{
+ struct mt7915_dev *dev = mt7915_hw_dev(hw);
+ struct mtk_wed_device *wed = &dev->mt76.mmio.wed;
+
+ if (!mtk_wed_device_active(wed))
+ return -ENODEV;
+
+ path->dev = ctx->dev;
+ path->mtk_wdma.wdma_idx = wed->wdma_idx;
+
+ return 0;
+}
+
#endif
const struct ieee80211_ops mt7915_ops = {
@@ -1509,5 +1527,6 @@ const struct ieee80211_ops mt7915_ops = {
.set_radar_background = mt7915_set_radar_background,
#ifdef CONFIG_NET_MEDIATEK_SOC_WED
.net_fill_forward_path = mt7915_net_fill_forward_path,
+ .net_fill_receive_path = mt7915_net_fill_receive_path,
#endif
};
--
2.25.1