diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-led.c')
| -rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-led.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-led.c b/drivers/net/wireless/iwlwifi/iwl-led.c index 86c2b6fed0c6..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,12 +127,13 @@ 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 | ||
| 135 | return 0; | 134 | return 0; |
| 136 | } | 135 | } |
| 136 | EXPORT_SYMBOL(iwl_led_associate); | ||
| 137 | 137 | ||
| 138 | int iwl_led_disassociate(struct iwl_priv *priv) | 138 | int iwl_led_disassociate(struct iwl_priv *priv) |
| 139 | { | 139 | { |
| @@ -141,6 +141,7 @@ int iwl_led_disassociate(struct iwl_priv *priv) | |||
| 141 | 141 | ||
| 142 | return 0; | 142 | return 0; |
| 143 | } | 143 | } |
| 144 | EXPORT_SYMBOL(iwl_led_disassociate); | ||
| 144 | 145 | ||
| 145 | /* | 146 | /* |
| 146 | * calculate blink rate according to last second Tx/Rx activities | 147 | * calculate blink rate according to last second Tx/Rx activities |
| @@ -221,5 +222,8 @@ void iwl_leds_init(struct iwl_priv *priv) | |||
| 221 | priv->last_blink_rate = 0; | 222 | priv->last_blink_rate = 0; |
| 222 | priv->last_blink_time = 0; | 223 | priv->last_blink_time = 0; |
| 223 | 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; | ||
| 224 | } | 228 | } |
| 225 | EXPORT_SYMBOL(iwl_leds_init); | 229 | EXPORT_SYMBOL(iwl_leds_init); |
