diff options
author | John W. Linville <linville@tuxdriver.com> | 2013-07-26 00:48:01 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-07-26 00:48:01 +0400 |
commit | 9d55911e8f14fad6d6fc95bf6db7af5af2d808c6 (patch) | |
tree | 4c59f917d2e3c3cfa62c2a3ce77c1c2be04f708e /drivers/net/wireless/mwifiex/main.c | |
parent | 72bb2f2678878dd4a758e628957f29ce28000d88 (diff) | |
parent | 23d412a2e94f55b84dbf9d5e64f381677bc90575 (diff) | |
download | linux-9d55911e8f14fad6d6fc95bf6db7af5af2d808c6.tar.xz |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Diffstat (limited to 'drivers/net/wireless/mwifiex/main.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/main.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c index f26beb7ed022..e64c369f3024 100644 --- a/drivers/net/wireless/mwifiex/main.c +++ b/drivers/net/wireless/mwifiex/main.c @@ -431,6 +431,10 @@ static void mwifiex_fw_dpc(const struct firmware *firmware, void *context) "Cal data request_firmware() failed\n"); } + /* enable host interrupt after fw dnld is successful */ + if (adapter->if_ops.enable_int) + adapter->if_ops.enable_int(adapter); + adapter->init_wait_q_woken = false; ret = mwifiex_init_fw(adapter); if (ret == -1) { @@ -482,6 +486,8 @@ err_add_intf: mwifiex_del_virtual_intf(adapter->wiphy, priv->wdev); rtnl_unlock(); err_init_fw: + if (adapter->if_ops.disable_int) + adapter->if_ops.disable_int(adapter); pr_debug("info: %s: unregister device\n", __func__); adapter->if_ops.unregister_dev(adapter); done: @@ -859,7 +865,7 @@ mwifiex_add_card(void *card, struct semaphore *sem, INIT_WORK(&adapter->main_work, mwifiex_main_work_queue); /* Register the device. Fill up the private data structure with relevant - information from the card and request for the required IRQ. */ + information from the card. */ if (adapter->if_ops.register_dev(adapter)) { pr_err("%s: failed to register mwifiex device\n", __func__); goto err_registerdev; @@ -923,6 +929,11 @@ int mwifiex_remove_card(struct mwifiex_adapter *adapter, struct semaphore *sem) if (!adapter) goto exit_remove; + /* We can no longer handle interrupts once we start doing the teardown + * below. */ + if (adapter->if_ops.disable_int) + adapter->if_ops.disable_int(adapter); + adapter->surprise_removed = true; /* Stop data */ |