summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
diff options
context:
space:
mode:
authorStanislaw Gruszka2018-10-03 12:52:24 +0200
committerFelix Fietkau2018-10-05 20:05:44 +0200
commitc87dff8cc39a2da52d98949cc1f3e9befd19cb83 (patch)
tree789ca2637b71781a60d717860e71c6a055c6048e /drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
parentmt76: fix header guard macro define names (diff)
downloadkernel-qcow2-linux-c87dff8cc39a2da52d98949cc1f3e9befd19cb83.tar.gz
kernel-qcow2-linux-c87dff8cc39a2da52d98949cc1f3e9befd19cb83.tar.xz
kernel-qcow2-linux-c87dff8cc39a2da52d98949cc1f3e9befd19cb83.zip
mt76: fix frag length allocation for usb
This is correct fix for c12128ce44b0 ("mt76: use a per rx queue page fragment cache"). We use wrong length when we allocate segments for MCU transmissions, which require bigger segment size than e->buf_size. Commit 481bb0432414 ("mt76: usb: make rx page_frag_cache access atomic") partially solved the problem or actually mask it by changing mt76u_mcu_init_rx() and mt76u_alloc_queues() sequence, so e->buf_size become non zero any longer, but still not big enough to handle MCU data. Patch fixes memory corruption which can manifest itself as random, not easy to reproduce crashes, during mt76 driver load or unload. Fixes: c12128ce44b0 ("mt76: use a per rx queue page fragment cache") Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x0/usb.c')
0 files changed, 0 insertions, 0 deletions