Commit f4720893 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

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: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 6794f3ee
...@@ -533,9 +533,6 @@ int iwl_load_ucode_wait_alive(struct iwl_priv *priv, ...@@ -533,9 +533,6 @@ int iwl_load_ucode_wait_alive(struct iwl_priv *priv,
int ret; int ret;
enum iwl_ucode_type old_type; enum iwl_ucode_type old_type;
iwl_init_notification_wait(priv->shrd, &alive_wait, REPLY_ALIVE,
iwl_alive_fn, &alive_data);
old_type = priv->shrd->ucode_type; old_type = priv->shrd->ucode_type;
priv->shrd->ucode_type = ucode_type; priv->shrd->ucode_type = ucode_type;
fw = iwl_get_ucode_image(priv, ucode_type); fw = iwl_get_ucode_image(priv, ucode_type);
...@@ -543,6 +540,9 @@ int iwl_load_ucode_wait_alive(struct iwl_priv *priv, ...@@ -543,6 +540,9 @@ int iwl_load_ucode_wait_alive(struct iwl_priv *priv,
if (!fw) if (!fw)
return -EINVAL; return -EINVAL;
iwl_init_notification_wait(priv->shrd, &alive_wait, REPLY_ALIVE,
iwl_alive_fn, &alive_data);
ret = iwl_trans_start_fw(trans(priv), fw); ret = iwl_trans_start_fw(trans(priv), fw);
if (ret) { if (ret) {
priv->shrd->ucode_type = old_type; priv->shrd->ucode_type = old_type;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment