iwlwifi: move firmware completion wait
authorJohannes Berg <johannes.berg@intel.com>
Mon, 5 Mar 2012 19:24:51 +0000 (11:24 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 6 Mar 2012 20:16:16 +0000 (15:16 -0500)
This doesn't belong into the op_mode, it has
to be in the drv stop flow instead.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-drv.c

index c3b594647def82ef25b68f22f872f0ad82bd6955..8bb3f173bfa0bbbdd4129ed485e2276ab88d4906 100644 (file)
@@ -1371,8 +1371,6 @@ static void iwl_op_mode_dvm_stop(struct iwl_op_mode *op_mode)
 {
        struct iwl_priv *priv = IWL_OP_MODE_GET_DVM(op_mode);
 
-       wait_for_completion(&nic(priv)->request_firmware_complete);
-
        IWL_DEBUG_INFO(priv, "*** UNLOAD DRIVER ***\n");
 
        iwl_dbgfs_unregister(priv);
index 343f41eb4e4fac2c8fd6e2d4d7aec5fa0b634f26..1a588f36b5910b35582fb1bef5eaf992141b3301 100644 (file)
@@ -720,6 +720,8 @@ int iwl_drv_start(struct iwl_shared *shrd,
 
 void iwl_drv_stop(struct iwl_shared *shrd)
 {
+       wait_for_completion(&shrd->nic->request_firmware_complete);
+
        /* op_mode can be NULL if its start failed */
        if (shrd->nic->op_mode)
                iwl_op_mode_stop(shrd->nic->op_mode);