developer | 12a4279 | 2023-07-29 05:30:55 +0800 | [diff] [blame] | 1 | From 49fabee68820ffe1943f9c4371df98f66d079053 Mon Sep 17 00:00:00 2001 |
developer | bbd45e1 | 2023-05-19 08:22:06 +0800 | [diff] [blame] | 2 | From: Evelyn Tsai <evelyn.tsai@mediatek.com> |
| 3 | Date: Fri, 19 May 2023 07:05:22 +0800 |
developer | 2157bf8 | 2023-06-26 02:27:49 +0800 | [diff] [blame] | 4 | Subject: [PATCH 2002/2009] 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 | bbd45e1 | 2023-05-19 08:22:06 +0800 | [diff] [blame] | 9 | mt7915/main.c | 18 ++++++++++++++++++ |
| 10 | 1 file changed, 18 insertions(+) |
developer | 8cb3ac7 | 2022-07-04 10:55:14 +0800 | [diff] [blame] | 11 | |
| 12 | diff --git a/mt7915/main.c b/mt7915/main.c |
developer | 12a4279 | 2023-07-29 05:30:55 +0800 | [diff] [blame] | 13 | index 04c3237..69a618f 100644 |
developer | 8cb3ac7 | 2022-07-04 10:55:14 +0800 | [diff] [blame] | 14 | --- a/mt7915/main.c |
| 15 | +++ b/mt7915/main.c |
developer | 8f0d89b | 2023-07-28 07:16:44 +0800 | [diff] [blame] | 16 | @@ -1704,6 +1704,23 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw, |
developer | 8cb3ac7 | 2022-07-04 10:55:14 +0800 | [diff] [blame] | 17 | return 0; |
| 18 | } |
developer | bbd45e1 | 2023-05-19 08:22:06 +0800 | [diff] [blame] | 19 | |
developer | 8cb3ac7 | 2022-07-04 10:55:14 +0800 | [diff] [blame] | 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 | + |
developer | bbd45e1 | 2023-05-19 08:22:06 +0800 | [diff] [blame] | 37 | static int |
| 38 | mt7915_net_setup_tc(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
| 39 | struct net_device *netdev, enum tc_setup_type type, |
developer | 8f0d89b | 2023-07-28 07:16:44 +0800 | [diff] [blame] | 40 | @@ -1771,6 +1788,7 @@ const struct ieee80211_ops mt7915_ops = { |
developer | 8cb3ac7 | 2022-07-04 10:55:14 +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 | bbd45e1 | 2023-05-19 08:22:06 +0800 | [diff] [blame] | 45 | .net_setup_tc = mt7915_net_setup_tc, |
developer | 8cb3ac7 | 2022-07-04 10:55:14 +0800 | [diff] [blame] | 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 | |