iwlagn: move no_sleep_autoadjust as part of iwlagn_mod_params
authorWey-Yi Guy <wey-yi.w.guy@intel.com>
Fri, 3 Jun 2011 20:52:40 +0000 (13:52 -0700)
committerWey-Yi Guy <wey-yi.w.guy@intel.com>
Sat, 11 Jun 2011 14:08:52 +0000 (07:08 -0700)
Move no_sleep_autoadjust module parameter into iwlagn_mod_params structure
along with all the other iwlagn module parameters

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
drivers/net/wireless/iwlwifi/iwl-agn-lib.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/iwlwifi/iwl-power.c

index f0dacfbe8e989eb059889f19c403cc2c6d00f68a..58f6da0acfd243868404f838a6cd7a6607dd317f 100644 (file)
@@ -623,6 +623,7 @@ struct iwl_mod_params iwlagn_mod_params = {
        .restart_fw = 1,
        .plcp_check = true,
        .bt_coex_active = true,
+       .no_sleep_autoadjust = true,
        /* the rest are 0 by default */
 };
 
index 32683568d39e147433539a9261e37249c93de8f7..8bed31539c58f1df1ba7dfccbb092a65ced83f16 100644 (file)
@@ -4099,3 +4099,13 @@ MODULE_PARM_DESC(bt_coex_active, "enable wifi/bt co-exist (default: enable)");
 module_param_named(led_mode, iwlagn_mod_params.led_mode, int, S_IRUGO);
 MODULE_PARM_DESC(led_mode, "0=system default, "
                "1=On(RF On)/Off(RF Off), 2=blinking (default: 0)");
+
+/*
+ * For now, keep using power level 1 instead of automatically
+ * adjusting ...
+ */
+module_param_named(no_sleep_autoadjust, iwlagn_mod_params.no_sleep_autoadjust,
+               bool, S_IRUGO);
+MODULE_PARM_DESC(no_sleep_autoadjust,
+                "don't automatically adjust sleep level "
+                "according to maximum network latency (default: true)");
index f950da02b21182842ddb32748d311c5426f4373e..a16daf72e67527411656ce24e9abd637658a7e2b 100644 (file)
@@ -175,6 +175,7 @@ struct iwl_mod_params {
        bool ack_check;         /* def: false = disable ack health check */
        bool bt_coex_active;    /* def: true = enable bt coex */
        int led_mode;           /* def: 0 = system default */
+       bool no_sleep_autoadjust; /* def: true = disable autoadjust */
 };
 
 /*
index 595c930b28aebaf9bccd9ec50ab936190246345a..a69b55124176be42c4f453a1569e09d46b1d361f 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "iwl-eeprom.h"
 #include "iwl-dev.h"
+#include "iwl-agn.h"
 #include "iwl-core.h"
 #include "iwl-io.h"
 #include "iwl-commands.h"
  * also use pre-defined power levels.
  */
 
-/*
- * For now, keep using power level 1 instead of automatically
- * adjusting ...
- */
-bool no_sleep_autoadjust = true;
-module_param(no_sleep_autoadjust, bool, S_IRUGO);
-MODULE_PARM_DESC(no_sleep_autoadjust,
-                "don't automatically adjust sleep level "
-                "according to maximum network latency");
-
 /*
  * This defines the old power levels. They are still used by default
  * (level 1) and for thermal throttle (levels 3 through 5)
@@ -367,7 +358,7 @@ static void iwl_power_build_cmd(struct iwl_priv *priv,
                iwl_static_sleep_cmd(priv, cmd,
                                     priv->power_data.debug_sleep_level_override,
                                     dtimper);
-       else if (no_sleep_autoadjust)
+       else if (iwlagn_mod_params.no_sleep_autoadjust)
                iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_1, dtimper);
        else
                iwl_power_fill_sleep_cmd(priv, cmd,