Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/openwrt/mt76.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mt76x0
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2019-12-23 16:03:32 +0300
committerFelix Fietkau <nbd@nbd.name>2020-01-27 19:48:38 +0300
commit2bb518752b3f0ee8afc41988e9969b7d10d048da (patch)
tree6319bb746781fc6068e2a864fcf3184d31256fa5 /mt76x0
parent29fec3a9b0b446036198860f0e9a9caffd9f8103 (diff)
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>
Diffstat (limited to 'mt76x0')
-rw-r--r--mt76x0/usb.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/mt76x0/usb.c b/mt76x0/usb.c
index 57e8676b..a0413b0a 100644
--- a/mt76x0/usb.c
+++ b/mt76x0/usb.c
@@ -181,16 +181,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;