developer | 5bea732 | 2023-04-13 18:50:55 +0800 | [diff] [blame^] | 1 | From efa3a57668d24d5dae599794accfbbaa600de232 Mon Sep 17 00:00:00 2001 |
developer | 8cb3ac7 | 2022-07-04 10:55:14 +0800 | [diff] [blame] | 2 | From: Sujuan Chen <sujuan.chen@mediatek.com> |
| 3 | Date: Thu, 19 May 2022 13:44:42 +0800 |
developer | 2324aa2 | 2023-04-12 11:30:15 +0800 | [diff] [blame] | 4 | Subject: [PATCH 3002/3013] wifi: mt76: mt7915: wed: add fill receive path to |
developer | c923344 | 2023-04-04 06:06:17 +0800 | [diff] [blame] | 5 | report wed idx |
developer | 8cb3ac7 | 2022-07-04 10:55:14 +0800 | [diff] [blame] | 6 | |
| 7 | Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com> |
| 8 | --- |
developer | bbca0f9 | 2022-07-26 17:26:12 +0800 | [diff] [blame] | 9 | mt7915/main.c | 19 +++++++++++++++++++ |
developer | 8cb3ac7 | 2022-07-04 10:55:14 +0800 | [diff] [blame] | 10 | 1 file changed, 19 insertions(+) |
| 11 | |
| 12 | diff --git a/mt7915/main.c b/mt7915/main.c |
developer | 5bea732 | 2023-04-13 18:50:55 +0800 | [diff] [blame^] | 13 | index c638032d..7fb821b3 100644 |
developer | 8cb3ac7 | 2022-07-04 10:55:14 +0800 | [diff] [blame] | 14 | --- a/mt7915/main.c |
| 15 | +++ b/mt7915/main.c |
developer | 5bea732 | 2023-04-13 18:50:55 +0800 | [diff] [blame^] | 16 | @@ -1579,6 +1579,24 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw, |
developer | 8cb3ac7 | 2022-07-04 10:55:14 +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 | 5bea732 | 2023-04-13 18:50:55 +0800 | [diff] [blame^] | 41 | @@ -1631,5 +1649,6 @@ const struct ieee80211_ops mt7915_ops = { |
developer | 8cb3ac7 | 2022-07-04 10:55:14 +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 | 2324aa2 | 2023-04-12 11:30:15 +0800 | [diff] [blame] | 49 | 2.18.0 |
developer | 8cb3ac7 | 2022-07-04 10:55:14 +0800 | [diff] [blame] | 50 | |