From: Marcel Holtmann <marcel@holtmann.org>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Johannes Berg <johannes@sipsolutions.net>,
wireless <linux-wireless@vger.kernel.org>,
Kay Sievers <kay.sievers@vrfy.org>
Subject: Re: How does rfkill work?
Date: Fri, 03 Apr 2009 06:37:54 +0200 [thread overview]
Message-ID: <1238733474.19390.2.camel@violet> (raw)
In-Reply-To: <49D521BF.2080301@lwfinger.net>
Hi Larry,
> > On Thu, 2009-04-02 at 20:48 +0200, Johannes Berg wrote:
> >
> > Could you try something for me?
> >
> > In drivers/leds/led-triggers.c in led_trigger_show you have
> >
> > list_for_each_entry(trig, &trigger_list, next_trig) {
> > + printk(KERN_DEBUG "available trigger: %s\n", trig->name);
> > if (led_cdev->trigger && !strcmp(led_cdev->trigger->name,
> > trig->name))
> > len += sprintf(buf+len, "[%s] ", trig->name);
> > else
> > len += sprintf(buf+len, "%s ", trig->name);
> > }
> >
> > could you do the modification, with a kernel that has the TRIG_NAME_MAX
> > set to 50, and see what it prints? I'm completely confused by this
> > failure mode since the garbage you get is actually put into brackets, so
> > it seems the strcmp() is returning 0 which seems odd.
>
> Have I told you that I hate things that appear to be intermittent?
>
> I added the printk, returned TRIG_NAME_MAX to 50, rebuilt and rebooted. This
> time I got
>
> ~/wireless-testing> cat /sys/class/leds/b43legacy-phy0\:\:rad/trigger
> none ide-disk ADP1-online BAT0-charging-or-full BAT0-charging BAT0-full phy0rx
> phy0tx phy0assoc phy0radio [rfkill0]
> ~/wireless-testing> dmesg | grep available
> available trigger: ide-disk
> available trigger: ADP1-online
> available trigger: BAT0-charging-or-full
> available trigger: BAT0-charging
> available trigger: BAT0-full
> available trigger: phy0rx
> available trigger: phy0tx
> available trigger: phy0assoc
> available trigger: phy0radio
> available trigger: rfkill0
>
> I'll leave the printk in place for the moment.
>
> The name is being truncated by "#define BUS_ID_SIZE 20" in
> include/linux/device.h. As changing that define would be pretty invasive, I plan
> to use a shorter name when the LED is registered.
I am under the impression that all these limitations are going away. Did
you talk to Kay or Greg about this?
Regards
Marcel
next prev parent reply other threads:[~2009-04-03 4:37 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-02 4:59 How does rfkill work? Larry Finger
2009-04-02 9:56 ` Johannes Berg
2009-04-02 14:44 ` Larry Finger
2009-04-02 15:02 ` Johannes Berg
2009-04-02 15:22 ` Larry Finger
2009-04-02 15:55 ` Johannes Berg
2009-04-02 16:27 ` Johannes Berg
2009-04-02 18:18 ` Larry Finger
2009-04-02 18:28 ` Johannes Berg
2009-04-03 15:15 ` Richard Purdie
2009-04-03 19:22 ` Johannes Berg
2009-04-02 18:29 ` Johannes Berg
2009-04-02 18:42 ` Larry Finger
2009-04-02 18:48 ` Johannes Berg
2009-04-02 18:57 ` Johannes Berg
2009-04-02 20:36 ` Larry Finger
2009-04-02 20:50 ` Johannes Berg
2009-04-02 21:24 ` Larry Finger
2009-04-02 21:39 ` Johannes Berg
2009-04-02 21:59 ` Larry Finger
2009-04-02 22:09 ` Johannes Berg
2009-04-03 4:37 ` Marcel Holtmann [this message]
2009-04-03 4:57 ` Larry Finger
2009-04-03 5:09 ` Kay Sievers
2009-04-03 4:35 ` Marcel Holtmann
2009-04-03 9:01 ` Johannes Berg
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=1238733474.19390.2.camel@violet \
--to=marcel@holtmann.org \
--cc=Larry.Finger@lwfinger.net \
--cc=johannes@sipsolutions.net \
--cc=kay.sievers@vrfy.org \
--cc=linux-wireless@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.