| From 9db10864ac1dbdc802e563fc6d8752c8b275c302 Mon Sep 17 00:00:00 2001 |
| From: Benjamin Lin <benjamin-jw.lin@mediatek.com> |
| Date: Wed, 17 Apr 2024 10:47:08 +0800 |
| Subject: [PATCH 16/21] wifi: mt76: mt7915: add dummy HW offload of IEEE 802.11 |
| fragmentation |
| |
| Currently, CONNAC2 series do not support encryption for fragmented Tx frames. |
| Therefore, add dummy function mt7915_set_frag_threshold() to prevent SW IEEE 802.11 fragmentation. |
| |
| Signed-off-by: Benjamin Lin <benjamin-jw.lin@mediatek.com> |
| --- |
| mt7915/init.c | 1 + |
| mt7915/main.c | 7 +++++++ |
| 2 files changed, 8 insertions(+) |
| |
| diff --git a/mt7915/init.c b/mt7915/init.c |
| index ea9bc735..470b198a 100644 |
| --- a/mt7915/init.c |
| +++ b/mt7915/init.c |
| @@ -399,6 +399,7 @@ mt7915_init_wiphy(struct mt7915_phy *phy) |
| ieee80211_hw_set(hw, SUPPORTS_RX_DECAP_OFFLOAD); |
| ieee80211_hw_set(hw, SUPPORTS_MULTI_BSSID); |
| ieee80211_hw_set(hw, WANT_MONITOR_VIF); |
| + ieee80211_hw_set(hw, SUPPORTS_TX_FRAG); |
| |
| hw->max_tx_fragments = 4; |
| |
| diff --git a/mt7915/main.c b/mt7915/main.c |
| index f0491d66..f4673c8d 100644 |
| --- a/mt7915/main.c |
| +++ b/mt7915/main.c |
| @@ -1614,6 +1614,12 @@ mt7915_twt_teardown_request(struct ieee80211_hw *hw, |
| mutex_unlock(&dev->mt76.mutex); |
| } |
| |
| +static int |
| +mt7915_set_frag_threshold(struct ieee80211_hw *hw, u32 val) |
| +{ |
| + return 0; |
| +} |
| + |
| static int |
| mt7915_set_radar_background(struct ieee80211_hw *hw, |
| struct cfg80211_chan_def *chandef) |
| @@ -1745,6 +1751,7 @@ const struct ieee80211_ops mt7915_ops = { |
| .sta_set_decap_offload = mt7915_sta_set_decap_offload, |
| .add_twt_setup = mt7915_mac_add_twt_setup, |
| .twt_teardown_request = mt7915_twt_teardown_request, |
| + .set_frag_threshold = mt7915_set_frag_threshold, |
| CFG80211_TESTMODE_CMD(mt76_testmode_cmd) |
| CFG80211_TESTMODE_DUMP(mt76_testmode_dump) |
| #ifdef CONFIG_MAC80211_DEBUGFS |
| -- |
| 2.18.0 |
| |