diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-11-09 12:21:34 -0500 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-11-16 10:44:24 -0500 |
commit | 564b344c10b694d433cef5b89f8ff8ac5e33898d (patch) | |
tree | 4f19b92a327d1eb4b367272c2dd6b8897adaa08b /drivers/net/wireless/iwlwifi/iwl-led.c | |
parent | 05433df23cf16a9ccbdd35964aba781cdf455034 (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.c | 10 |
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 */ |
46 | static int led_mode; | 46 | static int led_mode; |
47 | module_param(led_mode, int, S_IRUGO); | 47 | module_param(led_mode, int, S_IRUGO); |
48 | MODULE_PARM_DESC(led_mode, "led mode: 0=blinking, 1=On(RF On)/Off(RF Off), " | 48 | MODULE_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 | ||
52 | static const struct { | 51 | static const struct { |
53 | u16 tpt; /* Mb/s */ | 52 | u16 tpt; /* Mb/s */ |
@@ -128,7 +127,7 @@ EXPORT_SYMBOL(iwl_led_start); | |||
128 | int iwl_led_associate(struct iwl_priv *priv) | 127 | int 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 | } |
227 | EXPORT_SYMBOL(iwl_leds_init); | 229 | EXPORT_SYMBOL(iwl_leds_init); |