summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/marvell/mwifiex/init.c
diff options
context:
space:
mode:
authorXinming Hu <huxm@marvell.com>2016-11-16 16:09:05 +0300
committerKalle Valo <kvalo@codeaurora.org>2017-01-12 17:44:29 +0300
commit5bf15e3fb85d8c3957afc35a572ee5476f491c12 (patch)
tree3bb1d4d4a48cba69c0ee1db24631b91a8e1e0715 /drivers/net/wireless/marvell/mwifiex/init.c
parenta505e58252715bbc18a0ee1abae23615fe2586db (diff)
downloadlinux-5bf15e3fb85d8c3957afc35a572ee5476f491c12.tar.xz
mwifiex: don't wait for main_process in shutdown_drv
main_process is not expected to be running when shutdown_drv function is called. currently we wait for main_process completion in the function. Actually the caller has already made sure main_process is completed by performing below actions. (1) disable interrupts in if_ops->disable_int. (2) set adapter->surprise_removed = true, main_process wont be queued. (3) mwifiex_terminate_workqueue(adapter), wait for workqueue to be completed. This patch removes redundant wait code and takes care of related cleanup. Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> 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.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/init.c b/drivers/net/wireless/marvell/mwifiex/init.c
index 0e89ccfa244e..4af6ce4e388d 100644
--- a/drivers/net/wireless/marvell/mwifiex/init.c
+++ b/drivers/net/wireless/marvell/mwifiex/init.c
@@ -657,10 +657,9 @@ void mwifiex_free_priv(struct mwifiex_private *priv)
* - Free the adapter
* - Notify completion
*/
-int
+void
mwifiex_shutdown_drv(struct mwifiex_adapter *adapter)
{
- int ret = -EINPROGRESS;
struct mwifiex_private *priv;
s32 i;
unsigned long flags;
@@ -668,15 +667,7 @@ mwifiex_shutdown_drv(struct mwifiex_adapter *adapter)
/* mwifiex already shutdown */
if (adapter->hw_status == MWIFIEX_HW_STATUS_NOT_READY)
- return 0;
-
- adapter->hw_status = MWIFIEX_HW_STATUS_CLOSING;
- /* wait for mwifiex_process to complete */
- if (adapter->mwifiex_processing) {
- mwifiex_dbg(adapter, WARN,
- "main process is still running\n");
- return ret;
- }
+ return;
/* cancel current command */
if (adapter->curr_cmd) {
@@ -727,11 +718,7 @@ mwifiex_shutdown_drv(struct mwifiex_adapter *adapter)
mwifiex_adapter_cleanup(adapter);
spin_unlock(&adapter->mwifiex_lock);
-
- /* Notify completion */
- ret = mwifiex_shutdown_fw_complete(adapter);
-
- return ret;
+ adapter->hw_status = MWIFIEX_HW_STATUS_NOT_READY;
}
/*