From: Christian Lamparter <chunkeey@googlemail.com>
To: Joerg Albert <jal2@gmx.de>
Cc: Malte Gell <malte.gell@gmx.de>,
linux-wireless@vger.kernel.org,
"Luis R. Rodriguez" <mcgrof@gmail.com>,
linville@tuxdriver.com, "Hin-Tak Leung" <hintak.leung@gmail.com>
Subject: Re: [PATCH] ar9170usb: LEDs are confused
Date: Sat, 3 Oct 2009 02:05:28 +0200 [thread overview]
Message-ID: <200910030205.29381.chunkeey@googlemail.com> (raw)
In-Reply-To: <4AC67DEB.80900@gmx.de>
On Saturday 03 October 2009 00:25:47 Joerg Albert wrote:
> On 10/02/2009 01:45 PM, Malte Gell wrote:
> > Christian Lamparter <chunkeey@googlemail.com> wrote
> >
> >>> The Netgear (WN?) 111 even only has one blue LED as far as I know.
> >> the question is if it's the only device with this deficit, or not?
> >
> > Is it feasable to write to the well known stick makers (Netgear, AVM,
> > Belkin,Asus...) and just ask them?
>
> After looking into staging/otus/80211core/ledmgr.c, which has functions
> zfLedCtrlType1,2,3 for:
> - "Traditional single-LED state"
> - "Netgear Dual-LED state"
> - "Netgear Single-LED state"
>
> (althrough they are not used there, as noone initializes wd->ledStruct.LEDCtrlType correctly)
On Windows platforms this setting is initialized by the Driver .inf file:
(ref: http://ftp.dlink.ru/pub/Wireless/DWA-160/Drivers/Rev.A-DWA-160_S0009/Drivers/Vista32/arusb_lh.inf )
[NTGR9010.reg]
HKR, Ndi, Service, 0, "WNDA3100"
HKR, Ndi\Interfaces, UpperRange, 0, "ndis5"
HKR, Ndi\Interfaces, LowerRange, 0, "wlan,ethernet"
[...]
HKR,, DfsChDisable, 0, 1
HKR,, LEDCtrlType, 0, 2
vs.
[NTGR9001.reg]
HKR, Ndi, Service, 0, "WN111v2"
HKR, Ndi\Interfaces, UpperRange, 0, "ndis5"
HKR, Ndi\Interfaces, LowerRange, 0, "wlan,ethernet"
[...]
HKR,, DfsChDisable, 0, 1
HKR,, LEDCtrlType, 0, 3
the situation is different for AVM:
there is not any reference of LEDCtrlType in any of AVM's inf files,
but the LEDCtrlType string does turn up in the driver file.
> I guess there is a way to determine the number of LED in a device from the EEPROM.
> I really doubt that Netgear would built different drivers/firmwares
> (if they built any instead of getting them from Atheros)
> for both WNDA3100 and WN111v2.
>
> hal/hpmain.c, line 2322:
> #define ZM_SEEPROM_HARDWARE_TYPE_OFFSET (0x1374)
>
> the value from the above address is retrieved in rsp[5] and processed in
>
> hal/hprw.c, lines 601f.
> wd->ledStruct.ledMode[0] = (u16_t)(rsp[5]&0xffff);
> wd->ledStruct.ledMode[1] = (u16_t)(rsp[5]>>16);
>
> If the bits of ledMode[] are explained in 80211/ledmgr.c, lines 34ff.,
> Atheros provided a generic way for vendors to program LED behaviour
> via the EEPROM and Netgear got some extra handling in the driver
> (if otus is close the windows driver).
nice catch!
On Saturday 03 October 2009 01:03:28 Joerg Albert wrote:
> Hi,
>
> could anyone with a WN111v2 (or any other device with one LED only)
> apply the patch below and look into syslog for the value of "hwtype"?
>
> I get 22212221 for an AVM stick (057c:8401) and 22211111 for a Netgear WNDA3100 (0846:9010).
>
> Thanks,
> Joerg.
>
>
Netgear WNDA3100:
LedMode[0] = 0x1111 => (blue LED)
Bit 0 = 1 => Power-on state: On
Bit 6 = 0 => Connect state
Bit 4 = 1 => always on (~ assoc/link LED?)
Ton = 1
Toff = 1
LedMode[1] = 0x2221 => (orange LED)
Bit 0 = 1 => Power-on state: On
Bit 6 = 0 => Connect state
Bit 5 = 1 => Idle off, acitve on (~ traffic/tx LED?)
Ton = 2
Toff = 2
this looks promising. The setting here does indeed match
the current driver behavior!
AVM:
LedMode[0] = 0x2221 => (red LED?)
Bit 0 = 1 => Power-on state: On
Bit 6 = 0 => Connect state
Bit 5 = 1 => Idle off, acitve on (~ traffic/tx LED?)
Ton = 2
Toff = 2
LedMode[1] = 0x2221 => (green LED?)
Bit 0 = 1 => Power-on state: On
Bit 6 = 0 => Connect state
Bit 5 = 1 => Idle off, acitve on (~ traffic/tx LED?)
Ton = 2
Toff = 2
hmm, by this definition both LEDs are assigned as "traffic indicators".
This can not be right?! I did expect (based on Malte's description of
the Windows driver) something more like: 0x11112221.
Regards,
Chr
prev parent reply other threads:[~2009-10-03 0:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-01 14:54 [PATCH] ar9170usb: LEDs are confused Christian Lamparter
2009-10-01 18:06 ` Hin-Tak Leung
2009-10-01 20:34 ` Christian Lamparter
2009-10-01 21:24 ` Hin-Tak Leung
2009-10-01 23:18 ` Christian Lamparter
2009-10-02 10:06 ` Malte Gell
2009-10-02 6:52 ` Malte Gell
2009-10-02 10:46 ` Christian Lamparter
2009-10-02 11:45 ` Malte Gell
2009-10-02 19:08 ` Christian Lamparter
2009-10-03 2:53 ` Malte Gell
2009-10-03 11:29 ` Christian Lamparter
2009-10-03 17:28 ` Malte Gell
2009-10-02 22:25 ` Joerg Albert
2009-10-02 23:03 ` Joerg Albert
2009-10-03 0:05 ` Christian Lamparter [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=200910030205.29381.chunkeey@googlemail.com \
--to=chunkeey@googlemail.com \
--cc=hintak.leung@gmail.com \
--cc=jal2@gmx.de \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=malte.gell@gmx.de \
--cc=mcgrof@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.