diff options
author | Hubert Tarasiuk <hubert.tarasiuk@gmail.com> | 2016-01-24 13:35:06 +0100 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2016-02-01 16:40:18 +0200 |
commit | bdf408eca877a2ae310e3df9f05e865ffe10e4de (patch) | |
tree | ae53c6fae71bdd3f932983207fdc2d8630669ad9 /drivers/net | |
parent | 15ffd075e4088d3fc83ce8db914e7d3b6f31bc1c (diff) | |
download | lwn-bdf408eca877a2ae310e3df9f05e865ffe10e4de.tar.gz lwn-bdf408eca877a2ae310e3df9f05e865ffe10e4de.zip |
iwlwifi: dvm: handle zero brightness for wifi LED
In order to have the LED being OFF constantly when the
brightness is set to 0, we need to pass IWL_LED_SOLID to
iwl_led_cmd as the off parameter, otherwise the led will
stay on constantly.
This fixes
https://bugzilla.kernel.org/show_bug.cgi?id=110551
Signed-off-by: Hubert Tarasiuk <hubert.tarasiuk@gmail.com>
[reworked the commit message]
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/dvm/led.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/led.c b/drivers/net/wireless/intel/iwlwifi/dvm/led.c index 1aabb5ec096f..1bbd17ada974 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/led.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/led.c @@ -152,11 +152,14 @@ static void iwl_led_brightness_set(struct led_classdev *led_cdev, { struct iwl_priv *priv = container_of(led_cdev, struct iwl_priv, led); unsigned long on = 0; + unsigned long off = 0; if (brightness > 0) on = IWL_LED_SOLID; + else + off = IWL_LED_SOLID; - iwl_led_cmd(priv, on, 0); + iwl_led_cmd(priv, on, off); } static int iwl_led_blink_set(struct led_classdev *led_cdev, |