提交 154b25ce 编写于 作者: E Emmanuel Grumbach 提交者: John W. Linville

iwlwifi: blocking mac_start until uCode is complete

This patch makes iwl4965_mac_start block until the uCode has been
completely loaded.
Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: NZhu Yi <yi.zhu@intel.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 06da0699
...@@ -2566,7 +2566,7 @@ static void iwl_bg_scan_completed(struct work_struct *work) ...@@ -2566,7 +2566,7 @@ static void iwl_bg_scan_completed(struct work_struct *work)
* *
*****************************************************************************/ *****************************************************************************/
#define UCODE_READY_TIMEOUT (2 * HZ) #define UCODE_READY_TIMEOUT (4 * HZ)
static int iwl4965_mac_start(struct ieee80211_hw *hw) static int iwl4965_mac_start(struct ieee80211_hw *hw)
{ {
...@@ -2619,17 +2619,15 @@ static int iwl4965_mac_start(struct ieee80211_hw *hw) ...@@ -2619,17 +2619,15 @@ static int iwl4965_mac_start(struct ieee80211_hw *hw)
/* Wait for START_ALIVE from Run Time 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. */
if (priv->ucode_type == UCODE_RT) { ret = wait_event_interruptible_timeout(priv->wait_command_queue,
ret = wait_event_interruptible_timeout(priv->wait_command_queue, test_bit(STATUS_READY, &priv->status),
test_bit(STATUS_READY, &priv->status), UCODE_READY_TIMEOUT);
UCODE_READY_TIMEOUT); if (!ret) {
if (!ret) { if (!test_bit(STATUS_READY, &priv->status)) {
if (!test_bit(STATUS_READY, &priv->status)) { IWL_ERROR("START_ALIVE timeout after %dms.\n",
IWL_ERROR("START_ALIVE timeout after %dms.\n", jiffies_to_msecs(UCODE_READY_TIMEOUT));
jiffies_to_msecs(UCODE_READY_TIMEOUT)); ret = -ETIMEDOUT;
ret = -ETIMEDOUT; goto out_release_irq;
goto out_release_irq;
}
} }
priv->is_open = 1; priv->is_open = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册