iwlagn: move all post scan functions in one place
authorWey-Yi Guy <wey-yi.w.guy@intel.com>
Fri, 3 Jun 2011 14:54:14 +0000 (07:54 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 3 Jun 2011 19:16:37 +0000 (15:16 -0400)
Both tx power and power save are being done after scan complete, move into
post_scan function

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
drivers/net/wireless/iwlwifi/iwl-scan.c

index 5f562d91c2e777e8f22ffb897aadd80cf8f94d82..18e690087283719ded3642fb6d13409904befd46 100644 (file)
@@ -799,6 +799,13 @@ void iwlagn_post_scan(struct iwl_priv *priv)
 {
        struct iwl_rxon_context *ctx;
 
+       /*
+        * We do not commit power settings while scan is pending,
+        * do it now if the settings changed.
+        */
+       iwl_power_set_mode(priv, &priv->power_data.sleep_cmd_next, false);
+       iwl_set_tx_power(priv, priv->tx_power_next, false);
+
        /*
         * Since setting the RXON may have been deferred while
         * performing the scan, fire one off if needed
index d60d630cb93af7d8eadb7c8be243a562444a5693..8c9af45c598bc53c400a9c1bd13ec91d36055bf9 100644 (file)
@@ -600,13 +600,6 @@ out_settings:
        if (!iwl_is_ready_rf(priv))
                goto out;
 
-       /*
-        * We do not commit power settings while scan is pending,
-        * do it now if the settings changed.
-        */
-       iwl_power_set_mode(priv, &priv->power_data.sleep_cmd_next, false);
-       iwl_set_tx_power(priv, priv->tx_power_next, false);
-
        priv->cfg->ops->utils->post_scan(priv);
 
 out: