iwlwifi: add option to disalbe LED
authorWey-Yi Guy <wey-yi.w.guy@intel.com>
Sat, 28 Jan 2012 16:30:51 +0000 (08:30 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 30 Jan 2012 20:48:34 +0000 (15:48 -0500)
Led has no use for some platform.
Add additional module parameter option to disable LED

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.c
drivers/net/wireless/iwlwifi/iwl-led.c
drivers/net/wireless/iwlwifi/iwl-shared.h

index 3e429a3e518d3c337d05382b0e45ea284a885345..90315c69cdf62157de69c48dc694430b797fbbb9 100644 (file)
@@ -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_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,
                bool, S_IRUGO);
index eca79087afb8e52499d3adb9f7433aa68525d2a4..8761438f1532b47e63dc477aef9d82bf00996f17 100644 (file)
@@ -177,6 +177,10 @@ void iwl_leds_init(struct iwl_priv *priv)
        int mode = iwlagn_mod_params.led_mode;
        int ret;
 
+       if (mode == IWL_LED_DISABLE) {
+               IWL_INFO(priv, "Led disabled\n");
+               return;
+       }
        if (mode == IWL_LED_DEFAULT)
                mode = cfg(priv)->led_mode;
 
index e406d49f4189da90eb56c5b6bc2c773c525fda74..04975b7b65b33e74af420802f808408b14c5dd4a 100644 (file)
@@ -264,11 +264,13 @@ enum iwl_pa_type {
  *                     LED ON  = RF ON
  *                     LED OFF = RF OFF
  *    IWL_LED_BLINK:    adjust led blink rate based on blink table
+ *    IWL_LED_DISABLE: led disabled
  */
 enum iwl_led_mode {
        IWL_LED_DEFAULT,
        IWL_LED_RF_STATE,
        IWL_LED_BLINK,
+       IWL_LED_DISABLE,
 };
 
 /**