aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-06 16:30:57 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-07 13:56:32 -0500
commitf47208934b2aba432722baeb86a72fcbfd26b593 (patch)
tree3d0651281cb07aefc67146dac95a346f35da143a /drivers/net/wireless/iwlwifi
parent6794f3ee1dc4a2f7ebed99a4c075f00bbebbcfdc (diff)
iwlwifi: fix notification wait bug
In "iwlwifi: consolidate the start_device flow" Emmanuel added the return if the fw isn't there but forgot to take into account that the struct for notification wait needs to be added only after the check -- fix that. 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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-ucode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-ucode.c b/drivers/net/wireless/iwlwifi/iwl-ucode.c
index c1c5e1f2223..686d456d226 100644
--- a/drivers/net/wireless/iwlwifi/iwl-ucode.c
+++ b/drivers/net/wireless/iwlwifi/iwl-ucode.c
@@ -533,9 +533,6 @@ int iwl_load_ucode_wait_alive(struct iwl_priv *priv,
533 int ret; 533 int ret;
534 enum iwl_ucode_type old_type; 534 enum iwl_ucode_type old_type;
535 535
536 iwl_init_notification_wait(priv->shrd, &alive_wait, REPLY_ALIVE,
537 iwl_alive_fn, &alive_data);
538
539 old_type = priv->shrd->ucode_type; 536 old_type = priv->shrd->ucode_type;
540 priv->shrd->ucode_type = ucode_type; 537 priv->shrd->ucode_type = ucode_type;
541 fw = iwl_get_ucode_image(priv, ucode_type); 538 fw = iwl_get_ucode_image(priv, ucode_type);
@@ -543,6 +540,9 @@ int iwl_load_ucode_wait_alive(struct iwl_priv *priv,
543 if (!fw) 540 if (!fw)
544 return -EINVAL; 541 return -EINVAL;
545 542
543 iwl_init_notification_wait(priv->shrd, &alive_wait, REPLY_ALIVE,
544 iwl_alive_fn, &alive_data);
545
546 ret = iwl_trans_start_fw(trans(priv), fw); 546 ret = iwl_trans_start_fw(trans(priv), fw);
547 if (ret) { 547 if (ret) {
548 priv->shrd->ucode_type = old_type; 548 priv->shrd->ucode_type = old_type;