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 <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
85b7a5d0b2
commit
a1ea1d688d
2 changed files with 4 additions and 12 deletions
|
|
@ -182,16 +182,12 @@ static int mt76x0u_register_device(struct mt76x02_dev *dev)
|
|||
if (err < 0)
|
||||
goto out_err;
|
||||
|
||||
/* 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 = mt76x0_register_device(dev);
|
||||
if (err < 0)
|
||||
goto out_err;
|
||||
|
||||
/* 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);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue