Commit 154b25ce authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by John W. Linville
Browse files

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: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 06da0699
Loading
Loading
Loading
Loading
+10 −12
Original line number Diff line number Diff line
@@ -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)
{
@@ -2619,7 +2619,6 @@ static int iwl4965_mac_start(struct ieee80211_hw *hw)

	/* Wait for START_ALIVE from Run Time ucode. Otherwise callbacks from
	 * mac80211 will not be run successfully. */
	if (priv->ucode_type == UCODE_RT) {
	ret = wait_event_interruptible_timeout(priv->wait_command_queue,
			test_bit(STATUS_READY, &priv->status),
			UCODE_READY_TIMEOUT);
@@ -2630,7 +2629,6 @@ static int iwl4965_mac_start(struct ieee80211_hw *hw)
			ret = -ETIMEDOUT;
			goto out_release_irq;
		}
		}

		priv->is_open = 1;
	}