developer | a20cdc2 | 2024-05-31 18:57:31 +0800 | [diff] [blame] | 1 | From b8a7bf6451dd612803743b69209672186bb09f6f Mon Sep 17 00:00:00 2001 |
developer | 2cd1216 | 2024-04-18 17:29:00 +0800 | [diff] [blame] | 2 | From: Benjamin Lin <benjamin-jw.lin@mediatek.com> |
| 3 | Date: Wed, 17 Apr 2024 10:47:08 +0800 |
developer | a20cdc2 | 2024-05-31 18:57:31 +0800 | [diff] [blame] | 4 | Subject: [PATCH 16/21] wifi: mt76: mt7915: add dummy HW offload of IEEE 802.11 |
developer | 2cd1216 | 2024-04-18 17:29:00 +0800 | [diff] [blame] | 5 | fragmentation |
| 6 | |
| 7 | Currently, CONNAC2 series do not support encryption for fragmented Tx frames. |
| 8 | Therefore, add dummy function mt7915_set_frag_threshold() to prevent SW IEEE 802.11 fragmentation. |
| 9 | |
| 10 | Signed-off-by: Benjamin Lin <benjamin-jw.lin@mediatek.com> |
| 11 | --- |
| 12 | mt7915/init.c | 1 + |
| 13 | mt7915/main.c | 7 +++++++ |
| 14 | 2 files changed, 8 insertions(+) |
| 15 | |
| 16 | diff --git a/mt7915/init.c b/mt7915/init.c |
| 17 | index 3ec9eab..19a68c5 100644 |
| 18 | --- a/mt7915/init.c |
| 19 | +++ b/mt7915/init.c |
| 20 | @@ -398,6 +398,7 @@ mt7915_init_wiphy(struct mt7915_phy *phy) |
| 21 | ieee80211_hw_set(hw, SUPPORTS_RX_DECAP_OFFLOAD); |
| 22 | ieee80211_hw_set(hw, SUPPORTS_MULTI_BSSID); |
| 23 | ieee80211_hw_set(hw, WANT_MONITOR_VIF); |
| 24 | + ieee80211_hw_set(hw, SUPPORTS_TX_FRAG); |
| 25 | |
| 26 | hw->max_tx_fragments = 4; |
| 27 | |
| 28 | diff --git a/mt7915/main.c b/mt7915/main.c |
developer | a20cdc2 | 2024-05-31 18:57:31 +0800 | [diff] [blame] | 29 | index 9eeca39..65a3ce0 100644 |
developer | 2cd1216 | 2024-04-18 17:29:00 +0800 | [diff] [blame] | 30 | --- a/mt7915/main.c |
| 31 | +++ b/mt7915/main.c |
| 32 | @@ -1614,6 +1614,12 @@ mt7915_twt_teardown_request(struct ieee80211_hw *hw, |
| 33 | mutex_unlock(&dev->mt76.mutex); |
| 34 | } |
| 35 | |
| 36 | +static int |
| 37 | +mt7915_set_frag_threshold(struct ieee80211_hw *hw, u32 val) |
| 38 | +{ |
developer | dad89a3 | 2024-04-29 14:17:17 +0800 | [diff] [blame] | 39 | + return 0; |
developer | 2cd1216 | 2024-04-18 17:29:00 +0800 | [diff] [blame] | 40 | +} |
| 41 | + |
| 42 | static int |
| 43 | mt7915_set_radar_background(struct ieee80211_hw *hw, |
| 44 | struct cfg80211_chan_def *chandef) |
| 45 | @@ -1741,6 +1747,7 @@ const struct ieee80211_ops mt7915_ops = { |
| 46 | .sta_set_decap_offload = mt7915_sta_set_decap_offload, |
| 47 | .add_twt_setup = mt7915_mac_add_twt_setup, |
| 48 | .twt_teardown_request = mt7915_twt_teardown_request, |
| 49 | + .set_frag_threshold = mt7915_set_frag_threshold, |
| 50 | CFG80211_TESTMODE_CMD(mt76_testmode_cmd) |
| 51 | CFG80211_TESTMODE_DUMP(mt76_testmode_dump) |
| 52 | #ifdef CONFIG_MAC80211_DEBUGFS |
| 53 | -- |
| 54 | 2.18.0 |
| 55 | |