All of lore.kernel.org
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: Tomas Winkler <tomasw@gmail.com>
Cc: Tomas Carnecky <tom@dbservice.com>,
	ipw3945-devel@lists.sourceforge.net,
	linux-wireless@vger.kernel.org
Subject: Re: led support in mac80211 and drivers
Date: Wed, 16 Jan 2008 15:01:26 -0500	[thread overview]
Message-ID: <20080116200126.GA3164@tuxdriver.com> (raw)
In-Reply-To: <1ba2fa240801161038t235f9ae4m3b1f7e1963b592ef@mail.gmail.com>

I appreciate that this topic started with discussion of the (long
overdue) support for LEDs in the iwlwifi drivers.  However at
this point I think it has strayed sufficiently into the mac80211
realm that it should be moved to the home of mac80211 development,
linux-wireless@vger.kernel.org

Thanks,

John

On Wed, Jan 16, 2008 at 08:38:48PM +0200, Tomas Winkler wrote:
> > > Currently we recognize 4 or 5 pasterns that are implemented and
> > > switching between them according laptop vendor.
> >
> > We = who?
> 
> Intel
> 
> Greping through the kernel source revealed only a single user
> > of ieee80211_get_*_led_name(), the broadcom B43 wireless driver.
> 
> Correct
> 
> That
> > driver switches between different modes based on bus->boardinfo.vendor.
> > But where are the other modules needing this flexibility? Are they being
> > developed in private by the companies that make the access points?
> >
> 
> Different Laptop vendor and AP vendors. This information might be
> written in many places, PCI subvendor, in EEROM etc sometimes it has
> to be supplied from outside.
> 
> 
> > > So what is needed for led implementation are 3 decision chain
> > >  - Activity Trigger (RX, TX, Association, Radio State/RF Kill)
> > >  - Behavior Decision -  What is done on each trigger
> > >     - Behavior is easy to model - ON, OFF, BLINK(pattern)
> > >  - Mapping to what led is this behavior mapped
> > >     - One behavior might be mapped to single led. Then we need to know
> > > what trigger take precedences.
> >
> > Actually, the second and third point can be merged.
> >
> 
> Agree Implementation wise might be simpler.
> 
> > > Actually the major problem I have currently with mac80211 trigger
> > > implementation RX/TX trigger since Intel's led doesn't have to be
> > > triggered ON/OFF on each packet, led is capable of blinking itself.,
> > > therefore I would like to see your patch very much. We probably would
> > > have to work on flexibility of blinking patterns
> >
> > I thought about having an 'ieee80211_activity_listener' that could
> > subscribe to activity events of a ieee80211_hw device. One single
> > callback that would be called when there's activity or if the state of
> > the device has changed. Maybe something like this:
> >
> > int (*callback)(... *hw, u8 state, u8 type);
> >
> > where 'state' would be a bitmap of scanning/associated/etc and type the
> > 'type' of activity (transmitting/receiving a frame). The callback then
> > would decide which leds to activate and how (blinking or not etc). Does
> > that sound better? At least it would be better than having to register
> > three leds in each low-level driver ;)
> 
> I'm not sure it's such big deal to subscribe to led more problem is
> that I cannot subscribe same led to different triggers
> so need another level
> mac80211     | driver
> Led Trigger ->| Logical Led -> (LED LOGIC/MAPPING) ->  HW LED
>                     |
> 
> The problem here is that logic is already defined in Led pattern is
> already defined int Led Trigger
> 
> Problem with your approach I cannot reach LEDs that are not connected
> to NIC's PCIe pins.
> 
> Other options that uses your idea is
> mac80211        |  driver
> mac callback ->| (LED LOGIC) - Led Trigger - > Led
> 
> 
> > Btw, is there a function that lists all 'struct ieee80211_hw *'? How
> > does the led driver (external driver, where the leds are on a different
> > bus and the driver implemented in a different kernel module) get the led
> > triggers?
> 
> by name - "wlan0:rx"  for example
> 
> > Oh, and I read (in the intel driver source) that there is no callback
> > from the low-level driver into the mac subsystem that would inform it
> > that rfkill is active... that limitation would be bad in case of the
> > external led drivers.
> >
> That's a gap.
> 
> > tom
> >
> >
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Ipw3945-devel mailing list
> Ipw3945-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ipw3945-devel

-- 
John W. Linville
linville@tuxdriver.com

       reply	other threads:[~2008-01-16 20:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <478DF297.9020904@dbservice.com>
     [not found] ` <1ba2fa240801160832g611d5763gcb3d681353019d4f@mail.gmail.com>
     [not found]   ` <478E465A.2030003@dbservice.com>
     [not found]     ` <1ba2fa240801161038t235f9ae4m3b1f7e1963b592ef@mail.gmail.com>
2008-01-16 20:01       ` John W. Linville [this message]
2008-01-16 21:34         ` led support in mac80211 and drivers Tomas Winkler
2008-01-17  1:04         ` Tomas Carnecky
2008-01-17 15:46         ` Johannes Berg
2008-01-17 16:40           ` Tomas Winkler
2008-01-18  1:01             ` Johannes Berg
2008-01-17 22:12           ` Michael Buesch
2008-01-17 23:14             ` Johannes Berg
2008-01-18  0:35             ` Tomas Winkler
2008-01-18  3:56               ` [ipw3945-devel] " Jerone Young

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=20080116200126.GA3164@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=ipw3945-devel@lists.sourceforge.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=tom@dbservice.com \
    --cc=tomasw@gmail.com \
    /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.