]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mt76: do not overwrite max_tx_fragments if it has been set
authorShayne Chen <shayne.chen@mediatek.com>
Sat, 14 Dec 2019 11:22:04 +0000 (19:22 +0800)
committerFelix Fietkau <nbd@nbd.name>
Fri, 14 Feb 2020 09:03:10 +0000 (10:03 +0100)
Prevent the overwriting of max_tx_fragments if it has already been set
in chip-specific init routine.

Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mac80211.c

index 76ae2992511af8bce22746101ff2a4ad424ed332..8cc09aa6fe611214dd7c746af48f2959a74f165d 100644 (file)
@@ -287,7 +287,9 @@ mt76_phy_init(struct mt76_dev *dev, struct ieee80211_hw *hw)
        wiphy->available_antennas_rx = dev->phy.antenna_mask;
 
        hw->txq_data_size = sizeof(struct mt76_txq);
-       hw->max_tx_fragments = 16;
+
+       if (!hw->max_tx_fragments)
+               hw->max_tx_fragments = 16;
 
        ieee80211_hw_set(hw, SIGNAL_DBM);
        ieee80211_hw_set(hw, PS_NULLFUNC_STACK);