| From e5136e5f940adf55f1e7604960dba89e24a187bb Mon Sep 17 00:00:00 2001 |
| From: "sujuan.chen" <sujuan.chen@mediatek.com> |
| Date: Thu, 13 Apr 2023 14:12:16 +0800 |
| Subject: [PATCH 2005/2008] wifi: mt76: mt7996: wed: add mt7996_net_setup_tc to |
| support wifi2wifi offload |
| |
| Signed-off-by: sujuan.chen <sujuan.chen@mediatek.com> |
| --- |
| mt7996/main.c | 19 +++++++++++++++++++ |
| 1 file changed, 19 insertions(+) |
| |
| diff --git a/mt7996/main.c b/mt7996/main.c |
| index 50fa6523..cebac4ab 100644 |
| --- a/mt7996/main.c |
| +++ b/mt7996/main.c |
| @@ -1446,6 +1446,24 @@ mt7996_net_fill_forward_path(struct ieee80211_hw *hw, |
| return 0; |
| } |
| |
| +static int mt7996_net_setup_tc(struct ieee80211_hw *hw, |
| + struct ieee80211_vif *vif, |
| + struct net_device *ndev, |
| + enum tc_setup_type type, |
| + void *type_data) |
| + |
| +{ |
| + struct mt7996_dev *dev = mt7996_hw_dev(hw); |
| + struct mtk_wed_device *wed = &dev->mt76.mmio.wed; |
| + |
| + if (!mtk_wed_device_active(wed)) |
| + return -ENODEV; |
| + |
| + mtk_wed_device_setup_tc(wed, ndev, type, type_data); |
| + |
| + return 0; |
| +} |
| + |
| #endif |
| |
| const struct ieee80211_ops mt7996_ops = { |
| @@ -1496,5 +1514,6 @@ const struct ieee80211_ops mt7996_ops = { |
| .set_radar_background = mt7996_set_radar_background, |
| #ifdef CONFIG_NET_MEDIATEK_SOC_WED |
| .net_fill_forward_path = mt7996_net_fill_forward_path, |
| + .net_setup_tc = mt7996_net_setup_tc, |
| #endif |
| }; |
| -- |
| 2.39.2 |
| |