Commit 25df65ae authored by Matti Gottlieb's avatar Matti Gottlieb Committed by Luca Coelho

iwlwifi: pcie: define FW_RESET_TIMEOUT for clarity

Move fw reset timeout to a FW_RESET_TIMEOUT macro
for better readability.
Signed-off-by: default avatarMatti Gottlieb <matti.gottlieb@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210210172142.f71c99f461ff.If32fe0afed277ec99ba0d7e2615c27a8a80a0d29@changeidSigned-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 4a81598f
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#include "internal.h" #include "internal.h"
#include "fw/dbg.h" #include "fw/dbg.h"
#define FW_RESET_TIMEOUT (HZ / 5)
/* /*
* Start up NIC's basic functionality after it has been reset * Start up NIC's basic functionality after it has been reset
* (e.g. after platform boot, or shutdown via iwl_pcie_apm_stop()) * (e.g. after platform boot, or shutdown via iwl_pcie_apm_stop())
...@@ -104,7 +106,7 @@ static void iwl_trans_pcie_fw_reset_handshake(struct iwl_trans *trans) ...@@ -104,7 +106,7 @@ static void iwl_trans_pcie_fw_reset_handshake(struct iwl_trans *trans)
/* wait 200ms */ /* wait 200ms */
ret = wait_event_timeout(trans_pcie->fw_reset_waitq, ret = wait_event_timeout(trans_pcie->fw_reset_waitq,
trans_pcie->fw_reset_done, HZ / 5); trans_pcie->fw_reset_done, FW_RESET_TIMEOUT);
if (!ret) if (!ret)
IWL_ERR(trans, IWL_ERR(trans,
"firmware didn't ACK the reset - continue anyway\n"); "firmware didn't ACK the reset - continue anyway\n");
......
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