iwlwifi: ensure led registration complete as part of initialization
authorReinette Chatre <reinette.chatre@intel.com>
Thu, 3 Apr 2008 23:05:23 +0000 (16:05 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 8 Apr 2008 20:44:42 +0000 (16:44 -0400)
After the workqueue is notified the LED code may be accessed. Ensure
that LED registration completes completely as part of initialization
before anything waiting on this is notified.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl3945-base.c
drivers/net/wireless/iwlwifi/iwl4965-base.c

index 51480a4..d4daa04 100644 (file)
@@ -5874,12 +5874,12 @@ static void iwl3945_alive_start(struct iwl3945_priv *priv)
 
        iwl3945_reg_txpower_periodic(priv);
 
+       iwl3945_led_register(priv);
+
        IWL_DEBUG_INFO("ALIVE processing complete.\n");
        set_bit(STATUS_READY, &priv->status);
        wake_up_interruptible(&priv->wait_command_queue);
 
-       iwl3945_led_register(priv);
-
        if (priv->error_recovering)
                iwl3945_error_recovery(priv);
 
index 5dfc414..4517e4c 100644 (file)
@@ -5701,12 +5701,12 @@ static void iwl4965_alive_start(struct iwl_priv *priv)
 
        iwl4965_rf_kill_ct_config(priv);
 
+       iwl_leds_register(priv);
+
        IWL_DEBUG_INFO("ALIVE processing complete.\n");
        set_bit(STATUS_READY, &priv->status);
        wake_up_interruptible(&priv->wait_command_queue);
 
-       iwl_leds_register(priv);
-
        if (priv->error_recovering)
                iwl4965_error_recovery(priv);