diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2008-06-30 05:23:24 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-30 17:37:44 -0400 |
commit | 154b25ce9218fbe6eebacef7907fabf6d663e639 (patch) | |
tree | 2d2615ad4639f0626630642d6c00bad26e46c8e9 /drivers/net/wireless/iwlwifi/iwl4965-base.c | |
parent | 06da0699445631e6710b1f3b2e89570325b65e7e (diff) |
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: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl4965-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index f1cf4b1fd5ac..e9b6f3099d8e 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -2566,7 +2566,7 @@ static void iwl_bg_scan_completed(struct work_struct *work) | |||
2566 | * | 2566 | * |
2567 | *****************************************************************************/ | 2567 | *****************************************************************************/ |
2568 | 2568 | ||
2569 | #define UCODE_READY_TIMEOUT (2 * HZ) | 2569 | #define UCODE_READY_TIMEOUT (4 * HZ) |
2570 | 2570 | ||
2571 | static int iwl4965_mac_start(struct ieee80211_hw *hw) | 2571 | static int iwl4965_mac_start(struct ieee80211_hw *hw) |
2572 | { | 2572 | { |
@@ -2619,17 +2619,15 @@ static int iwl4965_mac_start(struct ieee80211_hw *hw) | |||
2619 | 2619 | ||
2620 | /* Wait for START_ALIVE from Run Time ucode. Otherwise callbacks from | 2620 | /* Wait for START_ALIVE from Run Time ucode. Otherwise callbacks from |
2621 | * mac80211 will not be run successfully. */ | 2621 | * mac80211 will not be run successfully. */ |
2622 | if (priv->ucode_type == UCODE_RT) { | 2622 | ret = wait_event_interruptible_timeout(priv->wait_command_queue, |
2623 | ret = wait_event_interruptible_timeout(priv->wait_command_queue, | 2623 | test_bit(STATUS_READY, &priv->status), |
2624 | test_bit(STATUS_READY, &priv->status), | 2624 | UCODE_READY_TIMEOUT); |
2625 | UCODE_READY_TIMEOUT); | 2625 | if (!ret) { |
2626 | if (!ret) { | 2626 | if (!test_bit(STATUS_READY, &priv->status)) { |
2627 | if (!test_bit(STATUS_READY, &priv->status)) { | 2627 | IWL_ERROR("START_ALIVE timeout after %dms.\n", |
2628 | IWL_ERROR("START_ALIVE timeout after %dms.\n", | 2628 | jiffies_to_msecs(UCODE_READY_TIMEOUT)); |
2629 | jiffies_to_msecs(UCODE_READY_TIMEOUT)); | 2629 | ret = -ETIMEDOUT; |
2630 | ret = -ETIMEDOUT; | 2630 | goto out_release_irq; |
2631 | goto out_release_irq; | ||
2632 | } | ||
2633 | } | 2631 | } |
2634 | 2632 | ||
2635 | priv->is_open = 1; | 2633 | priv->is_open = 1; |