Commit c6687464 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau

mt76x0: set max fragments size

Set maximum number of tx fragments according to usb controller
features
Signed-off-by: default avatarLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 1baa6e3a
...@@ -722,6 +722,12 @@ int mt76x0_register_device(struct mt76x0_dev *dev) ...@@ -722,6 +722,12 @@ int mt76x0_register_device(struct mt76x0_dev *dev)
if (ret) if (ret)
return ret; return ret;
/* check hw sg support in order to enable AMSDU */
if (mt76u_check_sg(&dev->mt76))
hw->max_tx_fragments = MT_SG_MAX_SIZE;
else
hw->max_tx_fragments = 1;
mt76x0_init_debugfs(dev); mt76x0_init_debugfs(dev);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment