mt76: usb: fix rx A-MSDU support
authorLorenzo Bianconi <lorenzo@kernel.org>
Sat, 15 Jun 2019 14:03:32 +0000 (16:03 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 27 Jun 2019 16:48:36 +0000 (19:48 +0300)
commit2a92b08b18553c101115423bd34963b1a59a45a3
tree33b56dd4e563bae584822a2a36cd8e2e63cf9312
parent0766789b1edb23874fcafdf3be69160e61384bf3
mt76: usb: fix rx A-MSDU support

Commit f8f527b16db5 ("mt76: usb: use EP max packet aligned buffer sizes
for rx") breaks A-MSDU support. When A-MSDU is enable the device can
receive frames up to q->buf_size but they will be discarded in
mt76u_process_rx_entry since there is no enough room for
skb_shared_info. Fix the issue reallocating the skb and copying in the
linear area the first 128B of the received frames and in the frag_list
the remaining part

Fixes: f8f527b16db5 ("mt76: usb: use EP max packet aligned buffer sizes for rx")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/mediatek/mt76/mt76.h
drivers/net/wireless/mediatek/mt76/usb.c