diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-06-13 09:01:22 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-06-13 09:01:28 +0200 |
commit | 627ae3ddd6f929b4496502318a8896729fc37839 (patch) | |
tree | 269fc2ea3b49c16864e97ee6b2ed0e7530bed79a /drivers/net/wireless/iwlwifi/iwl-drv.c | |
parent | iwlwifi: warn if TFD index and WiFi Seq don't match (diff) | |
parent | Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linvil... (diff) | |
download | linux-627ae3ddd6f929b4496502318a8896729fc37839.tar.xz linux-627ae3ddd6f929b4496502318a8896729fc37839.zip |
Merge remote-tracking branch 'wireless-next/master' into iwlwifi-next
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-drv.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-drv.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-drv.c b/drivers/net/wireless/iwlwifi/iwl-drv.c index 67c9668d2e37..80898bb808b5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/iwlwifi/iwl-drv.c @@ -899,7 +899,6 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context) /* We have our copies now, allow OS release its copies */ release_firmware(ucode_raw); - complete(&drv->request_firmware_complete); mutex_lock(&iwlwifi_opmode_table_mtx); op = &iwlwifi_opmode_table[DVM_OP_MODE]; @@ -910,11 +909,20 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context) if (op->ops) { const struct iwl_op_mode_ops *ops = op->ops; drv->op_mode = ops->start(drv->trans, drv->cfg, &drv->fw); + + if (!drv->op_mode) + goto out_unbind; } else { request_module_nowait("%s", op->name); } mutex_unlock(&iwlwifi_opmode_table_mtx); + /* + * Complete the firmware request last so that + * a driver unbind (stop) doesn't run while we + * are doing the start() above. + */ + complete(&drv->request_firmware_complete); return; try_again: |