iwlwifi: dvm: don't send HCMD in restart flow
There is a race between the restart flow and the workers. The workers are cancelled after the fw is already killed and might send HCMD when there is fw to handle them. Simply check that there is a fw to which the HCMD can be sent before actually sending it. Cc: stable@vger.kernel.org Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:

committed by
Johannes Berg

parent
4620020b5d
commit
2d5d50ee59
@@ -367,6 +367,8 @@ int iwl_load_ucode_wait_alive(struct iwl_priv *priv,
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
priv->ucode_loaded = true;
|
||||
|
||||
if (ucode_type != IWL_UCODE_WOWLAN) {
|
||||
/* delay a bit to give rfkill time to run */
|
||||
msleep(5);
|
||||
@@ -380,8 +382,6 @@ int iwl_load_ucode_wait_alive(struct iwl_priv *priv,
|
||||
return ret;
|
||||
}
|
||||
|
||||
priv->ucode_loaded = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user