All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Jiri Benc <jbenc@suse.cz>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: [RFC] d80211 LED handling
Date: Fri, 18 Aug 2006 08:59:28 +0200	[thread overview]
Message-ID: <1155884368.3425.2.camel@ux156> (raw)
In-Reply-To: <20060817173030.6510e96d@griffin.suse.cz>

On Thu, 2006-08-17 at 17:30 +0200, Jiri Benc wrote:

> How is the driver supposed to add its led handlers?

The driver just adds an LED device. And then we only need to set the
default trigger correctly.

> Using generic led triggers is probably interesting for cases when system
> has some separate led. It won't help drivers which need to handle leds
> on the card itself. In the former case you may want all of wireless
> cards in the system to be connected to one led. I don't see how this is
> easily possible with this patch.

No, that's not possible at all. But we could have a generic
'd80211-all-cards' trigger I suppose.

>  In the latter case, you want to call
> callback provided by the driver and not to use generic led triggers at
> all.

Why not use the generic trigger anyway? With the right default...

> > [...]
> > +config D80211_LEDS
> > +	bool "Enable LED triggers"
> > +	select LEDS_TRIGGERS
> 
> Is it really necessary to have this as a configurable option?

Probably not.

> > [...]
> > +	name = (char*) local->rx_led+1;
> 
> This doesn't seem correct.

Hm, yeah, it probably needs to be (char*) (local->rx_led+1).

> > +	snprintf(name, IFNAMSIZ + 2, "%srx", local->mdev->name);
> 
> Name of interface may change at any time. Using it for fixed identifier
> is not a good idea. In addition, nothing prevents you from ending up
> with two different led triggers with the same name:
> 
> 1. modprobe card1
> 2. ieee80211_led_init(card1)	<- card1 is "wmaster0"
> 3. ip link set wmaster0 name mysupercard
> 4. modprobe card2
> 5. ieee80211_led_init(card2)	<- card2 is "wmaster0"

Good point. I guess we'll want to have the wiphy in there instead.

johannes

      reply	other threads:[~2006-08-18  6:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-11  7:55 [RFC] d80211 LED handling Johannes Berg
2006-08-17 15:30 ` Jiri Benc
2006-08-18  6:59   ` Johannes Berg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1155884368.3425.2.camel@ux156 \
    --to=johannes@sipsolutions.net \
    --cc=jbenc@suse.cz \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.