developer | aa5b1b2 | 2022-12-13 17:05:25 +0800 | [diff] [blame] | 1 | From 705e520c10a4f08bf5b24b56b5ddb015e27c7b99 Mon Sep 17 00:00:00 2001 |
developer | e2cfb52 | 2022-12-08 18:09:45 +0800 | [diff] [blame] | 2 | From: Sujuan Chen <sujuan.chen@mediatek.com> |
| 3 | Date: Thu, 19 May 2022 13:44:42 +0800 |
developer | aa5b1b2 | 2022-12-13 17:05:25 +0800 | [diff] [blame] | 4 | Subject: [PATCH 3004/3011] mt76: mt7915: wed: add fill receive path to report |
developer | e2cfb52 | 2022-12-08 18:09:45 +0800 | [diff] [blame] | 5 | wed idx |
| 6 | |
| 7 | Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com> |
| 8 | --- |
| 9 | mt7915/main.c | 19 +++++++++++++++++++ |
| 10 | 1 file changed, 19 insertions(+) |
| 11 | |
| 12 | diff --git a/mt7915/main.c b/mt7915/main.c |
developer | aa5b1b2 | 2022-12-13 17:05:25 +0800 | [diff] [blame] | 13 | index 0e08bde6..d8571642 100644 |
developer | e2cfb52 | 2022-12-08 18:09:45 +0800 | [diff] [blame] | 14 | --- a/mt7915/main.c |
| 15 | +++ b/mt7915/main.c |
developer | aa5b1b2 | 2022-12-13 17:05:25 +0800 | [diff] [blame] | 16 | @@ -1567,6 +1567,24 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw, |
developer | e2cfb52 | 2022-12-08 18:09:45 +0800 | [diff] [blame] | 17 | |
| 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 = { |
developer | aa5b1b2 | 2022-12-13 17:05:25 +0800 | [diff] [blame] | 41 | @@ -1619,5 +1637,6 @@ const struct ieee80211_ops mt7915_ops = { |
developer | e2cfb52 | 2022-12-08 18:09:45 +0800 | [diff] [blame] | 42 | .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 | -- |
developer | aa5b1b2 | 2022-12-13 17:05:25 +0800 | [diff] [blame] | 49 | 2.25.1 |
developer | e2cfb52 | 2022-12-08 18:09:45 +0800 | [diff] [blame] | 50 | |