iwlwifi: activate status ready timeout only for run time ucode
This patch makes driver state timeout checks on ucode alive response only if run time ucode have been loaded. Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
7c616cba24
commit
fe9b6b720b
@ -156,6 +156,8 @@ static int iwl4965_load_bsm(struct iwl_priv *priv)
|
|||||||
|
|
||||||
IWL_DEBUG_INFO("Begin load bsm\n");
|
IWL_DEBUG_INFO("Begin load bsm\n");
|
||||||
|
|
||||||
|
priv->ucode_type = UCODE_RT;
|
||||||
|
|
||||||
/* make sure bootstrap program is no larger than BSM's SRAM size */
|
/* make sure bootstrap program is no larger than BSM's SRAM size */
|
||||||
if (len > IWL_MAX_BSM_SIZE)
|
if (len > IWL_MAX_BSM_SIZE)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@ -221,8 +223,6 @@ static int iwl4965_load_bsm(struct iwl_priv *priv)
|
|||||||
|
|
||||||
iwl_release_nic_access(priv);
|
iwl_release_nic_access(priv);
|
||||||
|
|
||||||
priv->ucode_type = UCODE_INIT;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -269,8 +269,6 @@ static int iwl4965_set_ucode_ptrs(struct iwl_priv *priv)
|
|||||||
|
|
||||||
IWL_DEBUG_INFO("Runtime uCode pointers are set.\n");
|
IWL_DEBUG_INFO("Runtime uCode pointers are set.\n");
|
||||||
|
|
||||||
priv->ucode_type = UCODE_RT;
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -804,8 +804,11 @@ static int iwl5000_alive_notify(struct iwl_priv *priv)
|
|||||||
|
|
||||||
iwl5000_send_Xtal_calib(priv);
|
iwl5000_send_Xtal_calib(priv);
|
||||||
|
|
||||||
if (priv->ucode_type == UCODE_RT)
|
if (priv->ucode_type == UCODE_RT) {
|
||||||
iwl5000_send_calib_results(priv);
|
iwl5000_send_calib_results(priv);
|
||||||
|
set_bit(STATUS_READY, &priv->status);
|
||||||
|
priv->is_open = 1;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -4074,21 +4074,23 @@ static int iwl4965_mac_start(struct ieee80211_hw *hw)
|
|||||||
if (test_bit(STATUS_IN_SUSPEND, &priv->status))
|
if (test_bit(STATUS_IN_SUSPEND, &priv->status))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Wait for START_ALIVE from ucode. Otherwise callbacks from
|
/* Wait for START_ALIVE from Run Time ucode. Otherwise callbacks from
|
||||||
* mac80211 will not be run successfully. */
|
* mac80211 will not be run successfully. */
|
||||||
ret = wait_event_interruptible_timeout(priv->wait_command_queue,
|
if (priv->ucode_type == UCODE_RT) {
|
||||||
test_bit(STATUS_READY, &priv->status),
|
ret = wait_event_interruptible_timeout(priv->wait_command_queue,
|
||||||
UCODE_READY_TIMEOUT);
|
test_bit(STATUS_READY, &priv->status),
|
||||||
if (!ret) {
|
UCODE_READY_TIMEOUT);
|
||||||
if (!test_bit(STATUS_READY, &priv->status)) {
|
if (!ret) {
|
||||||
IWL_ERROR("Wait for START_ALIVE timeout after %dms.\n",
|
if (!test_bit(STATUS_READY, &priv->status)) {
|
||||||
jiffies_to_msecs(UCODE_READY_TIMEOUT));
|
IWL_ERROR("START_ALIVE timeout after %dms.\n",
|
||||||
ret = -ETIMEDOUT;
|
jiffies_to_msecs(UCODE_READY_TIMEOUT));
|
||||||
goto out_release_irq;
|
ret = -ETIMEDOUT;
|
||||||
|
goto out_release_irq;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
priv->is_open = 1;
|
priv->is_open = 1;
|
||||||
|
}
|
||||||
IWL_DEBUG_MAC80211("leave\n");
|
IWL_DEBUG_MAC80211("leave\n");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user