iwl4965: set power mode early
authorStanislaw Gruszka <sgruszka@redhat.com>
Thu, 1 Aug 2013 10:07:13 +0000 (12:07 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 2 Aug 2013 18:54:04 +0000 (14:54 -0400)
If device was put into a sleep and system was restarted or module
reloaded, we have to wake device up before sending other commands.
Otherwise it will fail to start with Microcode error.

Cc: stable@vger.kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlegacy/4965-mac.c

index b9b2bb51e60590ab7dfb91d4e284a6a0c6c259a7..f0b7794fca3ec50ed4eab43e0610c3867359c519 100644 (file)
@@ -5334,6 +5334,9 @@ il4965_alive_start(struct il_priv *il)
 
        il->active_rate = RATES_MASK;
 
+       il_power_update_mode(il, true);
+       D_INFO("Updated power mode\n");
+
        if (il_is_associated(il)) {
                struct il_rxon_cmd *active_rxon =
                    (struct il_rxon_cmd *)&il->active;
@@ -5364,9 +5367,6 @@ il4965_alive_start(struct il_priv *il)
        D_INFO("ALIVE processing complete.\n");
        wake_up(&il->wait_command_queue);
 
-       il_power_update_mode(il, true);
-       D_INFO("Updated power mode\n");
-
        return;
 
 restart: