mt76: mt7663s: remove max_tx_fragments limitation
authorLorenzo Bianconi <lorenzo@kernel.org>
Thu, 17 Sep 2020 17:18:22 +0000 (19:18 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 24 Sep 2020 16:10:20 +0000 (18:10 +0200)
Remove A-MSDU max_tx_fragments constraint for sdio since the check is
already performed in mt7663s_tx_run_queue routine

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c

index c24f26499537b09643b4316414d426c75e23c54e..3b29a6d3dc6412a04aebcdbfb20f412e00af0bf5 100644 (file)
@@ -365,14 +365,15 @@ int mt7663_usb_sdio_register_device(struct mt7615_dev *dev)
        if (err)
                return err;
 
-       /* check hw sg support in order to enable AMSDU */
-       if (dev->mt76.usb.sg_en || mt76_is_sdio(&dev->mt76))
-               hw->max_tx_fragments = MT_HW_TXP_MAX_BUF_NUM;
-       else
-               hw->max_tx_fragments = 1;
        hw->extra_tx_headroom += MT_USB_TXD_SIZE;
-       if (mt76_is_usb(&dev->mt76))
+       if (mt76_is_usb(&dev->mt76)) {
                hw->extra_tx_headroom += MT_USB_HDR_SIZE;
+               /* check hw sg support in order to enable AMSDU */
+               if (dev->mt76.usb.sg_en)
+                       hw->max_tx_fragments = MT_HW_TXP_MAX_BUF_NUM;
+               else
+                       hw->max_tx_fragments = 1;
+       }
 
        err = mt76_register_device(&dev->mt76, true, mt7615_rates,
                                   ARRAY_SIZE(mt7615_rates));