linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bug 110551] iwlwifi: dvm: cannot turn off wifi LED
       [not found] <CALwVF7Q2ApSy0DR4JS1qkovg=EoLot2ABaLimhXkMmKp0hwq6w@mail.gmail.com>
@ 2016-01-13 22:33 ` Hubert Tarasiuk
  0 siblings, 0 replies; 3+ messages in thread
From: Hubert Tarasiuk @ 2016-01-13 22:33 UTC (permalink / raw)
  To: emmanuel.grumbach; +Cc: linux-wireless, bugzilla-daemon


[-- Attachment #1.1: Type: text/plain, Size: 1633 bytes --]

Re-sending as plain-text.


--- Treść przekazanej wiadomości ---
Temat: 	[Bug 110551] iwlwifi: dvm: cannot turn off wifi LED
Data: 	Wed, 13 Jan 2016 23:31:28 +0100
Nadawca: 	Hubert Tarasiuk <hubert.tarasiuk@gmail.com>
Adresat: 	emmanuel.grumbach@intel.com
Kopia: 	linux-wireless@vger.kernel.org, bugzilla-daemon@bugzilla.kernel.org



Hi Emmanuel,

Actually to properly handle led_mode=3 option is not as easy as it seems.
Even if I initially turn of the LED in case of led_mode=3, it still gets
turned on after doing
# ifconfig wlan0 down && ifconfig wlan0 up

Maybe if I have more time later I can investigate further on how to
avoid this behaviour. (the LED trigger is set to none according to
sysfs) Or you have an idea on how to stop this behaviour?

Otherwise I would suggest that you apply the patch that I posted on
bugzilla (attached) that fixes sysfs handling. It is then easy to keep
the LED on or off as desired using simple shell scripts.

Thank you,
Hubert

On Tue, Jan 12, 2016 at 7:58 AM, <bugzilla-daemon@bugzilla.kernel.org
<mailto:bugzilla-daemon@bugzilla.kernel.org>>Â wrote:

    https://bugzilla.kernel.org/show_bug.cgi?id=110551

    --- Comment #1 from Emmanuel Grumbach <emmanuel.grumbach@intel.com
    <mailto:emmanuel.grumbach@intel.com>> ---
    Your bug is fine, but I'd prefer if you'd send the patch :)

    you can send it to me and CCÂ linux-wireless@vger.kernel.org
    <mailto:linux-wireless@vger.kernel.org>

    thanks.

    --
    You are receiving this mail because:
    You are on the CC list for the bug.
    You reported the bug.




[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-iwlwifi-allow-led-turn-off-in-iwl-dvm-module.patch --]
[-- Type: text/x-patch; name="0001-iwlwifi-allow-led-turn-off-in-iwl-dvm-module.patch", Size: 997 bytes --]

From 132afdea768bea0a5dc0f46417b261138b9b0286 Mon Sep 17 00:00:00 2001
From: Hubert Tarasiuk <hubert.tarasiuk@gmail.com>
Date: Mon, 4 Jan 2016 23:45:18 +0100
Subject: [PATCH] iwlwifi: allow led turn off in iwl dvm module

---
 drivers/net/wireless/iwlwifi/dvm/led.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/iwlwifi/dvm/led.c b/drivers/net/wireless/iwlwifi/dvm/led.c
index ca4d669..218617a 100644
--- a/drivers/net/wireless/iwlwifi/dvm/led.c
+++ b/drivers/net/wireless/iwlwifi/dvm/led.c
@@ -154,11 +154,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,
-- 
2.6.4


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Bug 110551] iwlwifi: dvm: cannot turn off wifi LED
       [not found] ` <bug-110551-148371-jY9LWPEyBc@https.bugzilla.kernel.org/>
@ 2016-01-24 10:32   ` Hubert Tarasiuk
  2016-01-24 11:45     ` Emmanuel Grumbach
  0 siblings, 1 reply; 3+ messages in thread
From: Hubert Tarasiuk @ 2016-01-24 10:32 UTC (permalink / raw)
  To: linux-wireless, emmanuel.grumbach; +Cc: bugzilla-daemon


[-- Attachment #1.1: Type: text/plain, Size: 492 bytes --]

Attached is the patch for bug 110551.

W dniu 24.01.2016 o 11:16, bugzilla-daemon@bugzilla.kernel.org pisze:
> https://bugzilla.kernel.org/show_bug.cgi?id=110551
> 
> --- Comment #13 from Emmanuel Grumbach <emmanuel.grumbach@intel.com> ---
> https://bugzilla.kernel.org/attachment.cgi?id=201271
> 
> This one seems to have a fix for the module param as well.
> I would much prefer you to send the patch to the wireless mailing list rather
> than attaching it to this bugzilla.
> 

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-iwlwifi-dvm-handle-zero-brightness-for-wifi-LED.patch --]
[-- Type: text/x-patch; name="0001-iwlwifi-dvm-handle-zero-brightness-for-wifi-LED.patch", Size: 1290 bytes --]

From 40e783a5464e43722d87b5cb0c3d3899f3f7417e Mon Sep 17 00:00:00 2001
From: Hubert Tarasiuk <hubert.tarasiuk@gmail.com>
Date: Mon, 4 Jan 2016 23:45:18 +0100
Subject: [PATCH] iwlwifi: dvm: handle zero brightness for wifi LED

This fixes bug 110551 with regard to sysfs.

Misleading behaviour when 'led_mode=3' is passed to iwlwifi is still
to be fixed (either by changing the option description or by making
the LED permanently dark in such case).

Signed-off-by: Hubert Tarasiuk <hubert.tarasiuk@gmail.com>
---
 drivers/net/wireless/iwlwifi/dvm/led.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/iwlwifi/dvm/led.c b/drivers/net/wireless/iwlwifi/dvm/led.c
index ca4d669..218617a 100644
--- a/drivers/net/wireless/iwlwifi/dvm/led.c
+++ b/drivers/net/wireless/iwlwifi/dvm/led.c
@@ -154,11 +154,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,
-- 
2.7.0


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Bug 110551] iwlwifi: dvm: cannot turn off wifi LED
  2016-01-24 10:32   ` Hubert Tarasiuk
@ 2016-01-24 11:45     ` Emmanuel Grumbach
  0 siblings, 0 replies; 3+ messages in thread
From: Emmanuel Grumbach @ 2016-01-24 11:45 UTC (permalink / raw)
  To: Hubert Tarasiuk; +Cc: linux-wireless, Emmanuel Grumbach, bugzilla-daemon

On Sun, Jan 24, 2016 at 12:32 PM, Hubert Tarasiuk
<hubert.tarasiuk@gmail.com> wrote:
> Attached is the patch for bug 110551.
>
> W dniu 24.01.2016 o 11:16, bugzilla-daemon@bugzilla.kernel.org pisze:
>> https://bugzilla.kernel.org/show_bug.cgi?id=110551
>>
>> --- Comment #13 from Emmanuel Grumbach <emmanuel.grumbach@intel.com> ---
>> https://bugzilla.kernel.org/attachment.cgi?id=201271
>>
>> This one seems to have a fix for the module param as well.
>> I would much prefer you to send the patch to the wireless mailing list rather
>> than attaching it to this bugzilla.
>>

The better way is send the patches with git-send-email tool.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-24 11:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CALwVF7Q2ApSy0DR4JS1qkovg=EoLot2ABaLimhXkMmKp0hwq6w@mail.gmail.com>
2016-01-13 22:33 ` [Bug 110551] iwlwifi: dvm: cannot turn off wifi LED Hubert Tarasiuk
     [not found] <bug-110551-148371@https.bugzilla.kernel.org/>
     [not found] ` <bug-110551-148371-jY9LWPEyBc@https.bugzilla.kernel.org/>
2016-01-24 10:32   ` Hubert Tarasiuk
2016-01-24 11:45     ` Emmanuel Grumbach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).