linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath5k: add led_disable module option
@ 2010-07-28 16:31 John W. Linville
  2010-07-28 17:10 ` Bob Copeland
  2010-07-28 21:01 ` [ath5k-devel] " Luis R. Rodriguez
  0 siblings, 2 replies; 5+ messages in thread
From: John W. Linville @ 2010-07-28 16:31 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath5k-devel, Bob Copeland, John W. Linville

Not everyone agrees about LED behaviour...give them an escape hatch that
will at least stop the lights from annoying them.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 drivers/net/wireless/ath/ath5k/led.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/led.c b/drivers/net/wireless/ath/ath5k/led.c
index 67aa52e..6c416db 100644
--- a/drivers/net/wireless/ath/ath5k/led.c
+++ b/drivers/net/wireless/ath/ath5k/led.c
@@ -43,6 +43,10 @@
 #include "ath5k.h"
 #include "base.h"
 
+static int modparam_led_disable;
+module_param_named(led_disable, modparam_led_disable, bool, S_IRUGO);
+MODULE_PARM_DESC(led_disable, "Disable software-controlled LEDs.");
+
 #define ATH_SDEVICE(subv,subd) \
 	.vendor = PCI_ANY_ID, .device = PCI_ANY_ID, \
 	.subvendor = (subv), .subdevice = (subd)
@@ -165,6 +169,9 @@ int ath5k_init_leds(struct ath5k_softc *sc)
 	char name[ATH5K_LED_MAX_NAME_LEN + 1];
 	const struct pci_device_id *match;
 
+	if (modparam_led_disable)
+		goto out;
+
 	match = pci_match_id(&ath5k_led_devices[0], pdev);
 	if (match) {
 		__set_bit(ATH_STAT_LEDSOFT, sc->status);
-- 
1.7.1.1


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

* Re: [PATCH] ath5k: add led_disable module option
  2010-07-28 16:31 [PATCH] ath5k: add led_disable module option John W. Linville
@ 2010-07-28 17:10 ` Bob Copeland
  2010-07-28 21:01 ` [ath5k-devel] " Luis R. Rodriguez
  1 sibling, 0 replies; 5+ messages in thread
From: Bob Copeland @ 2010-07-28 17:10 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, ath5k-devel

On Wed, Jul 28, 2010 at 12:31 PM, John W. Linville
<linville@tuxdriver.com> wrote:
> Not everyone agrees about LED behaviour...give them an escape hatch that
> will at least stop the lights from annoying them.
>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>

Fine with me...

-- 
Bob Copeland %% www.bobcopeland.com

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

* Re: [ath5k-devel] [PATCH] ath5k: add led_disable module option
  2010-07-28 16:31 [PATCH] ath5k: add led_disable module option John W. Linville
  2010-07-28 17:10 ` Bob Copeland
@ 2010-07-28 21:01 ` Luis R. Rodriguez
  2010-07-28 21:04   ` Johannes Berg
  1 sibling, 1 reply; 5+ messages in thread
From: Luis R. Rodriguez @ 2010-07-28 21:01 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, ath5k-devel

On Wed, Jul 28, 2010 at 9:31 AM, John W. Linville
<linville@tuxdriver.com> wrote:
> Not everyone agrees about LED behaviour...give them an escape hatch that
> will at least stop the lights from annoying them.
>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>

I wonder if we can just do this on cfg80211 through a debugfs knob,
which would take care of all device drivers?

  Luis

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

* Re: [ath5k-devel] [PATCH] ath5k: add led_disable module option
  2010-07-28 21:01 ` [ath5k-devel] " Luis R. Rodriguez
@ 2010-07-28 21:04   ` Johannes Berg
  2010-07-28 21:14     ` Bob Copeland
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2010-07-28 21:04 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: John W. Linville, linux-wireless, ath5k-devel

On Wed, 2010-07-28 at 14:01 -0700, Luis R. Rodriguez wrote:
> On Wed, Jul 28, 2010 at 9:31 AM, John W. Linville
> <linville@tuxdriver.com> wrote:
> > Not everyone agrees about LED behaviour...give them an escape hatch that
> > will at least stop the lights from annoying them.
> >
> > Signed-off-by: John W. Linville <linville@tuxdriver.com>
> 
> I wonder if we can just do this on cfg80211 through a debugfs knob,
> which would take care of all device drivers?

We have proper API for this in sysfs if anybody bothered to hook this up
through the LED class/trigger system

johannes


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

* Re: [ath5k-devel] [PATCH] ath5k: add led_disable module option
  2010-07-28 21:04   ` Johannes Berg
@ 2010-07-28 21:14     ` Bob Copeland
  0 siblings, 0 replies; 5+ messages in thread
From: Bob Copeland @ 2010-07-28 21:14 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Luis R. Rodriguez, ath5k-devel, linux-wireless, John W. Linville

On Wed, Jul 28, 2010 at 5:04 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Wed, 2010-07-28 at 14:01 -0700, Luis R. Rodriguez wrote:
>> On Wed, Jul 28, 2010 at 9:31 AM, John W. Linville
>> <linville@tuxdriver.com> wrote:
>> > Not everyone agrees about LED behaviour...give them an escape hatch that
>> > will at least stop the lights from annoying them.
>> >
>> > Signed-off-by: John W. Linville <linville@tuxdriver.com>
>>
>> I wonder if we can just do this on cfg80211 through a debugfs knob,
>> which would take care of all device drivers?
>
> We have proper API for this in sysfs if anybody bothered to hook this up
> through the LED class/trigger system

Yes, they are hooked up through the triggers, so you can disable
them via sysfs (which I have told several people, but complaints still
roll in...)

I don't have any devices with LEDs so either way I don't care too much.

-- 
Bob Copeland %% www.bobcopeland.com

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

end of thread, other threads:[~2010-07-28 21:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-28 16:31 [PATCH] ath5k: add led_disable module option John W. Linville
2010-07-28 17:10 ` Bob Copeland
2010-07-28 21:01 ` [ath5k-devel] " Luis R. Rodriguez
2010-07-28 21:04   ` Johannes Berg
2010-07-28 21:14     ` Bob Copeland

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).