diff options
author | Shengzhen Li <szli@marvell.com> | 2016-11-18 17:00:24 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-11-19 10:18:46 +0300 |
commit | eb2428fb1a21e7c813987118b0296135ddec0f24 (patch) | |
tree | f470b971d48de4bc9c46b9367b4e34eb60006036 /drivers/net/wireless/marvell/mwifiex/init.c | |
parent | 853402a0082315f6c4f38feeba2c6c81a393557c (diff) | |
download | linux-eb2428fb1a21e7c813987118b0296135ddec0f24.tar.xz |
mwifiex: check tx_hw_pending before downloading sleep confirm
We may get SLEEP event from firmware even if TXDone interrupt
for last Tx packet is still pending. In this case, we may
end up accessing PCIe memory for handling TXDone after power
save handshake is completed. This causes kernel crash with
external abort.
This patch will only allow downloading sleep confirm
when no tx done interrupt is pending in the hardware.
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Shengzhen Li <szli@marvell.com>
Tested-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/init.c')
-rw-r--r-- | drivers/net/wireless/marvell/mwifiex/init.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/init.c b/drivers/net/wireless/marvell/mwifiex/init.c index 82839d9f079f..b36cb3fef358 100644 --- a/drivers/net/wireless/marvell/mwifiex/init.c +++ b/drivers/net/wireless/marvell/mwifiex/init.c @@ -270,6 +270,7 @@ static void mwifiex_init_adapter(struct mwifiex_adapter *adapter) adapter->adhoc_11n_enabled = false; mwifiex_wmm_init(adapter); + atomic_set(&adapter->tx_hw_pending, 0); sleep_cfm_buf = (struct mwifiex_opt_sleep_confirm *) adapter->sleep_cfm->data; |