developer | 2cbf2fb | 2022-11-16 12:20:48 +0800 | [diff] [blame^] | 1 | From d9b8f90612abf82f99013762ec38113a4463de6d Mon Sep 17 00:00:00 2001 |
developer | 3262bf8 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 2 | From: Sujuan Chen <sujuan.chen@mediatek.com> |
| 3 | Date: Thu, 19 May 2022 13:44:42 +0800 |
developer | 2cbf2fb | 2022-11-16 12:20:48 +0800 | [diff] [blame^] | 4 | Subject: [PATCH 3004/3011] mt76: add fill receive path to report wed idx |
developer | 3262bf8 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 5 | |
| 6 | Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com> |
| 7 | --- |
developer | c89c547 | 2022-08-02 13:00:04 +0800 | [diff] [blame] | 8 | mt7915/main.c | 19 +++++++++++++++++++ |
developer | 3262bf8 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 9 | 1 file changed, 19 insertions(+) |
| 10 | |
| 11 | diff --git a/mt7915/main.c b/mt7915/main.c |
developer | 2cbf2fb | 2022-11-16 12:20:48 +0800 | [diff] [blame^] | 12 | index c0617860..84b90010 100644 |
developer | 3262bf8 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 13 | --- a/mt7915/main.c |
| 14 | +++ b/mt7915/main.c |
developer | 2cbf2fb | 2022-11-16 12:20:48 +0800 | [diff] [blame^] | 15 | @@ -1521,6 +1521,24 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw, |
developer | 3262bf8 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 16 | |
| 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 = { |
developer | 2cbf2fb | 2022-11-16 12:20:48 +0800 | [diff] [blame^] | 40 | @@ -1572,5 +1590,6 @@ const struct ieee80211_ops mt7915_ops = { |
developer | 3262bf8 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 41 | .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 | -- |
developer | b81e95d | 2022-11-08 10:16:29 +0800 | [diff] [blame] | 48 | 2.18.0 |
developer | 3262bf8 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 49 | |