提交 0172b029 编写于 作者: W Wey-Yi Guy

iwlagn: add power_save module parameter

Add power_save module parameter to enable power management if needed
Default power management is disabled.
Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
上级 705cd451
...@@ -2545,11 +2545,10 @@ static int iwl_mac_setup_register(struct iwl_priv *priv, ...@@ -2545,11 +2545,10 @@ static int iwl_mac_setup_register(struct iwl_priv *priv,
WIPHY_FLAG_DISABLE_BEACON_HINTS | WIPHY_FLAG_DISABLE_BEACON_HINTS |
WIPHY_FLAG_IBSS_RSN; WIPHY_FLAG_IBSS_RSN;
/* if (iwlagn_mod_params.power_save)
* For now, disable PS by default because it affects hw->wiphy->flags |= WIPHY_FLAG_PS_ON_BY_DEFAULT;
* RX performance significantly. else
*/ hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX; hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX;
/* we create the 802.11 header and a zero-length SSID element */ /* we create the 802.11 header and a zero-length SSID element */
...@@ -3827,6 +3826,11 @@ module_param_named(led_mode, iwlagn_mod_params.led_mode, int, S_IRUGO); ...@@ -3827,6 +3826,11 @@ module_param_named(led_mode, iwlagn_mod_params.led_mode, int, S_IRUGO);
MODULE_PARM_DESC(led_mode, "0=system default, " MODULE_PARM_DESC(led_mode, "0=system default, "
"1=On(RF On)/Off(RF Off), 2=blinking (default: 0)"); "1=On(RF On)/Off(RF Off), 2=blinking (default: 0)");
module_param_named(power_save, iwlagn_mod_params.power_save,
bool, S_IRUGO);
MODULE_PARM_DESC(power_save,
"enable WiFi power management (default: disable)");
/* /*
* For now, keep using power level 1 instead of automatically * For now, keep using power level 1 instead of automatically
* adjusting ... * adjusting ...
......
...@@ -163,6 +163,7 @@ struct iwl_mod_params { ...@@ -163,6 +163,7 @@ struct iwl_mod_params {
bool bt_coex_active; /* def: true = enable bt coex */ bool bt_coex_active; /* def: true = enable bt coex */
int led_mode; /* def: 0 = system default */ int led_mode; /* def: 0 = system default */
bool no_sleep_autoadjust; /* def: true = disable autoadjust */ bool no_sleep_autoadjust; /* def: true = disable autoadjust */
bool power_save; /* def: false = disable power save */
}; };
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册