Commit dcc3ec04 authored by Wey-Yi Guy's avatar Wey-Yi Guy Committed by John W. Linville

iwlwifi: add option to disalbe LED

Led has no use for some platform.
Add additional module parameter option to disable LED
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 2b2db58d
...@@ -2097,7 +2097,7 @@ MODULE_PARM_DESC(bt_coex_active, "enable wifi/bt co-exist (default: enable)"); ...@@ -2097,7 +2097,7 @@ 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_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, 3=Off (default: 0)");
module_param_named(power_save, iwlagn_mod_params.power_save, module_param_named(power_save, iwlagn_mod_params.power_save,
bool, S_IRUGO); bool, S_IRUGO);
......
...@@ -177,6 +177,10 @@ void iwl_leds_init(struct iwl_priv *priv) ...@@ -177,6 +177,10 @@ void iwl_leds_init(struct iwl_priv *priv)
int mode = iwlagn_mod_params.led_mode; int mode = iwlagn_mod_params.led_mode;
int ret; int ret;
if (mode == IWL_LED_DISABLE) {
IWL_INFO(priv, "Led disabled\n");
return;
}
if (mode == IWL_LED_DEFAULT) if (mode == IWL_LED_DEFAULT)
mode = cfg(priv)->led_mode; mode = cfg(priv)->led_mode;
......
...@@ -264,11 +264,13 @@ enum iwl_pa_type { ...@@ -264,11 +264,13 @@ enum iwl_pa_type {
* LED ON = RF ON * LED ON = RF ON
* LED OFF = RF OFF * LED OFF = RF OFF
* IWL_LED_BLINK: adjust led blink rate based on blink table * IWL_LED_BLINK: adjust led blink rate based on blink table
* IWL_LED_DISABLE: led disabled
*/ */
enum iwl_led_mode { enum iwl_led_mode {
IWL_LED_DEFAULT, IWL_LED_DEFAULT,
IWL_LED_RF_STATE, IWL_LED_RF_STATE,
IWL_LED_BLINK, IWL_LED_BLINK,
IWL_LED_DISABLE,
}; };
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment