diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2018-10-08 13:22:00 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2018-10-13 17:39:31 +0200 |
commit | f3727daed83279bc1571b23222e7937949e978c6 (patch) | |
tree | 1f35563d30b62a31cd123890464ab15657ab7dd5 /drivers/net/wireless/mediatek/mt76/mt76x0/init.c | |
parent | 4ce78b048c4908118cfd5345f16241f58b85e5c6 (diff) |
mt76: reserve enough room for USB tx skbs
Reserve enough room for USB skb, so we don not need to check
the room every time we send frame.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x0/init.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c b/drivers/net/wireless/mediatek/mt76/mt76x0/init.c index 578f1b34f0f1..4a9408801260 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/init.c @@ -368,7 +368,10 @@ int mt76x0_register_device(struct mt76x02_dev *dev) hw->max_rates = 1; hw->max_report_rates = 7; hw->max_rate_tries = 1; - hw->extra_tx_headroom = sizeof(struct mt76x02_txwi) + 4 + 2; + hw->extra_tx_headroom = 2; + if (mt76_is_usb(dev)) + hw->extra_tx_headroom += sizeof(struct mt76x02_txwi) + + MT_DMA_HDR_LEN; hw->sta_data_size = sizeof(struct mt76x02_sta); hw->vif_data_size = sizeof(struct mt76x02_vif); |