developer | a20cdc2 | 2024-05-31 18:57:31 +0800 | [diff] [blame] | 1 | From 21586d3a17ba293d3d80bd93fb404729647820bd Mon Sep 17 00:00:00 2001 |
developer | 7af0f76 | 2023-05-22 15:16:16 +0800 | [diff] [blame] | 2 | From: Evelyn Tsai <evelyn.tsai@mediatek.com> |
| 3 | Date: Fri, 19 May 2023 07:05:22 +0800 |
developer | a20cdc2 | 2024-05-31 18:57:31 +0800 | [diff] [blame] | 4 | Subject: [PATCH 2002/2015] wifi: mt76: mt7915: wed: add fill receive path to |
developer | da18a74 | 2023-04-06 13:44:00 +0800 | [diff] [blame] | 5 | report wed idx |
developer | f79ad45 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 6 | |
| 7 | Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com> |
| 8 | --- |
developer | 7af0f76 | 2023-05-22 15:16:16 +0800 | [diff] [blame] | 9 | mt7915/main.c | 18 ++++++++++++++++++ |
| 10 | 1 file changed, 18 insertions(+) |
developer | f79ad45 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 11 | |
| 12 | diff --git a/mt7915/main.c b/mt7915/main.c |
developer | a20cdc2 | 2024-05-31 18:57:31 +0800 | [diff] [blame] | 13 | index 6276230..fbb2aff 100644 |
developer | f79ad45 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 14 | --- a/mt7915/main.c |
| 15 | +++ b/mt7915/main.c |
developer | a20cdc2 | 2024-05-31 18:57:31 +0800 | [diff] [blame] | 16 | @@ -1798,6 +1798,23 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw, |
developer | 1a17367 | 2023-12-21 14:49:33 +0800 | [diff] [blame] | 17 | |
developer | f79ad45 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 18 | return 0; |
| 19 | } |
developer | 1a17367 | 2023-12-21 14:49:33 +0800 | [diff] [blame] | 20 | + |
developer | f79ad45 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 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 | +} |
developer | 1a17367 | 2023-12-21 14:49:33 +0800 | [diff] [blame] | 37 | #endif |
| 38 | |
| 39 | const struct ieee80211_ops mt7915_ops = { |
developer | a20cdc2 | 2024-05-31 18:57:31 +0800 | [diff] [blame] | 40 | @@ -1855,6 +1872,7 @@ const struct ieee80211_ops mt7915_ops = { |
developer | f79ad45 | 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, |
developer | 753619c | 2024-02-22 13:42:45 +0800 | [diff] [blame] | 45 | .net_setup_tc = mt76_wed_net_setup_tc, |
developer | f79ad45 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 46 | #endif |
| 47 | }; |
| 48 | -- |
developer | bd9fa1e | 2023-10-16 11:04:00 +0800 | [diff] [blame] | 49 | 2.18.0 |
developer | f79ad45 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 50 | |