mwifiex: fix large amsdu packets causing firmware hang
authorCathy Luo <cluo@marvell.com>
Thu, 21 Jul 2016 11:00:24 +0000 (16:30 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 18 Aug 2016 13:02:08 +0000 (16:02 +0300)
commitc81396f3da22aa8f1e8fbf7943616a0839c4d63d
treeca22e7a196d9eba407905cf239d2461f9fd94c65
parent184ca823481c99dadd7d946e5afd4bb921eab30d
mwifiex: fix large amsdu packets causing firmware hang

Sometimes host prepares and downloads a large amsdu packet to firmware
which leads to a memory corruption in firmware.
The reason is __dev_alloc_skb() may allocate larger buffer than required
size. This patch solves the problem by checking "adapter->tx_buf_size"
instead of relying on skb_tailroom().

Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/11n_aggr.c