mt76: do not overwrite max_tx_fragments if it has been set
diff mbox series

Message ID 20191214112204.32701-1-shayne.chen@mediatek.com
State New
Headers show
Series
  • mt76: do not overwrite max_tx_fragments if it has been set
Related show

Commit Message

Shayne Chen Dec. 14, 2019, 11:22 a.m. UTC
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>
---
 drivers/net/wireless/mediatek/mt76/mac80211.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c
index 00c2a875a596..0c71d671f29a 100644
--- a/drivers/net/wireless/mediatek/mt76/mac80211.c
+++ b/drivers/net/wireless/mediatek/mt76/mac80211.c
@@ -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);