aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-led.c
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2010-11-09 12:21:34 -0500
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2010-11-16 10:44:24 -0500
commit564b344c10b694d433cef5b89f8ff8ac5e33898d (patch)
tree4f19b92a327d1eb4b367272c2dd6b8897adaa08b /drivers/net/wireless/iwlwifi/iwl-led.c
parent05433df23cf16a9ccbdd35964aba781cdf455034 (diff)
iwlwifi: change default led mode for different devices
Set the default led mode for different devices. For the newer devices such as 6000g2a, 6000g2b and newer, the default led mode is On/Off instead of blinking. The led_mode still can be control through module parameter 0: system default 1: On/Off 2: blinking Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-led.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-led.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-led.c b/drivers/net/wireless/iwlwifi/iwl-led.c
index 5a9129219c90..516e5577ed2a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-led.c
+++ b/drivers/net/wireless/iwlwifi/iwl-led.c
@@ -45,9 +45,8 @@
45/* default: IWL_LED_BLINK(0) using blinking index table */ 45/* default: IWL_LED_BLINK(0) using blinking index table */
46static int led_mode; 46static int led_mode;
47module_param(led_mode, int, S_IRUGO); 47module_param(led_mode, int, S_IRUGO);
48MODULE_PARM_DESC(led_mode, "led mode: 0=blinking, 1=On(RF On)/Off(RF Off), " 48MODULE_PARM_DESC(led_mode, "led mode: 0=system default, "
49 "(default 0)"); 49 "1=On(RF On)/Off(RF Off), 2=blinking");
50
51 50
52static const struct { 51static const struct {
53 u16 tpt; /* Mb/s */ 52 u16 tpt; /* Mb/s */
@@ -128,7 +127,7 @@ EXPORT_SYMBOL(iwl_led_start);
128int iwl_led_associate(struct iwl_priv *priv) 127int iwl_led_associate(struct iwl_priv *priv)
129{ 128{
130 IWL_DEBUG_LED(priv, "Associated\n"); 129 IWL_DEBUG_LED(priv, "Associated\n");
131 if (led_mode == IWL_LED_BLINK) 130 if (priv->cfg->led_mode == IWL_LED_BLINK)
132 priv->allow_blinking = 1; 131 priv->allow_blinking = 1;
133 priv->last_blink_time = jiffies; 132 priv->last_blink_time = jiffies;
134 133
@@ -223,5 +222,8 @@ void iwl_leds_init(struct iwl_priv *priv)
223 priv->last_blink_rate = 0; 222 priv->last_blink_rate = 0;
224 priv->last_blink_time = 0; 223 priv->last_blink_time = 0;
225 priv->allow_blinking = 0; 224 priv->allow_blinking = 0;
225 if (led_mode != IWL_LED_DEFAULT &&
226 led_mode != priv->cfg->led_mode)
227 priv->cfg->led_mode = led_mode;
226} 228}
227EXPORT_SYMBOL(iwl_leds_init); 229EXPORT_SYMBOL(iwl_leds_init);