From: Johannes Berg Date: Mon, 5 Mar 2012 19:24:51 +0000 (-0800) Subject: iwlwifi: move firmware completion wait X-Git-Tag: v3.4-rc1~177^2~108^2~113 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2e7eb117586198386e5a06d0bc4279a9d7cbaeb6;p=platform%2Fkernel%2Flinux-exynos.git iwlwifi: move firmware completion wait This doesn't belong into the op_mode, it has to be in the drv stop flow instead. Signed-off-by: Johannes Berg Signed-off-by: Wey-Yi Guy Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index c3b5946..8bb3f17 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c @@ -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); diff --git a/drivers/net/wireless/iwlwifi/iwl-drv.c b/drivers/net/wireless/iwlwifi/iwl-drv.c index 343f41e..1a588f3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/iwlwifi/iwl-drv.c @@ -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);