Skip to content

Commit

Permalink
iwlwifi: move firmware completion wait
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Mar 6, 2012
1 parent 15854ef commit 2e7eb11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/wireless/iwlwifi/iwl-drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2e7eb11

Please sign in to comment.