mt76usb: use synchronous msg for mcu command responses
authorStanislaw Gruszka <sgruszka@redhat.com>
Wed, 20 Feb 2019 16:15:19 +0000 (17:15 +0100)
committerFelix Fietkau <nbd@nbd.name>
Tue, 26 Feb 2019 11:25:18 +0000 (12:25 +0100)
commita18a494f908f88a8be95ce95399800204e338b55
tree501faaf84e88f2df291d36f2da1ae02c7c0a47ae
parentb63aa031b00b7d9db28862d9b24b15a5d4146398
mt76usb: use synchronous msg for mcu command responses

Use usb_bulk_msg for reading MCU command responses. This simplify code
a lot.

Together with 97a3005759c ("mt76usb: allow mt76u_bulk_msg be used
for reads") it also fix possible problems with rx data buffers
not being aligned and contained within single page. After doing
page_frag_alloc(1024) consecutive page_frag_alloc(PAGE_SIZE) will
alloc PAGE_SIZE buffer at PAGE_SIZE - 1024 offset.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt76.h
drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c
drivers/net/wireless/mediatek/mt76/mt76x2/usb.c
drivers/net/wireless/mediatek/mt76/usb.c
drivers/net/wireless/mediatek/mt76/usb_mcu.c