wifi: mt76: mt7915: add dummy HW offload of IEEE 802.11 fragmentation
authorBenjamin Lin <benjamin-jw.lin@mediatek.com>
Tue, 27 Aug 2024 09:30:03 +0000 (11:30 +0200)
committerFelix Fietkau <nbd@nbd.name>
Fri, 6 Sep 2024 12:23:07 +0000 (14:23 +0200)
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>
Link: https://patch.msgid.link/20240827093011.18621-16-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7915/init.c
drivers/net/wireless/mediatek/mt76/mt7915/main.c

index a978f434dc5e64b89822e28310b58dfdd70f74b0..511e0d04eb95519c15a9fbc9b4b88652ef8217d5 100644 (file)
@@ -398,6 +398,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;
 
index 9bf308429db396249efb56edb317ceccd47c50a9..e80db20035ab0b8541ef676ca144838297d310c2 100644 (file)
@@ -1594,6 +1594,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)
@@ -1723,6 +1729,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