mt76: mt76x02u: avoid overwrite max_tx_fragments

Starting from 'commit ee8040139ab1 ("mt76: do not overwrite
max_tx_fragments if it has been set")' we can avoid overwriting
max_tx_fragments for mt76x02u devices

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Lorenzo Bianconi
2020-01-27 17:48:38 +01:00
committed by Felix Fietkau
parent 29fec3a9b0
commit 2bb518752b
2 changed files with 4 additions and 12 deletions
+2 -6
View File
@@ -207,17 +207,13 @@ int mt76x2u_register_device(struct mt76x02_dev *dev)
if (err < 0)
goto fail;
/* check hw sg support in order to enable AMSDU */
hw->max_tx_fragments = dev->mt76.usb.sg_en ? MT_TX_SG_MAX_SIZE : 1;
err = mt76_register_device(&dev->mt76, true, mt76x02_rates,
ARRAY_SIZE(mt76x02_rates));
if (err)
goto fail;
/* check hw sg support in order to enable AMSDU */
if (dev->mt76.usb.sg_en)
hw->max_tx_fragments = MT_TX_SG_MAX_SIZE;
else
hw->max_tx_fragments = 1;
set_bit(MT76_STATE_INITIALIZED, &dev->mphy.state);
mt76x02_init_debugfs(dev);