2009-02-09 06:09:50

by Russ Dill

[permalink] [raw]
Subject: ath5k LEDs on Acer Ferrari 5000 laptop

I have an Acer Ferrari 5000 laptop with an ath5k wireless chipset. It
has an LED built into the rfkill switch on the front of the laptop. I
testing various settings within the ath5k driver an the led is on pin
1 (sc->led_pin = 1) and it is active high (sc->led_on).

07:00.0 Ethernet controller: Atheros Communications Inc. AR242x
802.11abg Wireless PCI Express Adapter (rev 01)
Subsystem: AMBIT Microsystem Corp. Device 0422
Flags: bus master, fast devsel, latency 0, IRQ 19
Memory at b0200000 (64-bit, non-prefetchable) [size=64K]
Capabilities: <access denied>
Kernel driver in use: ath5k
Kernel modules: ath5k, ath_pci

07:00.0 Ethernet controller [0200]: Atheros Communications Inc. AR242x
802.11abg Wireless PCI Express Adapter [168c:001c] (rev 01)
Subsystem: AMBIT Microsystem Corp. Device [1468:0422]

So its an AMBIT subvendor ID, which conflicts with the "emachines
notebooks with AMBIT subsystem" led assignment which selects all AMBIT
subvendor ID machines. Firstly, how would I best go about adding this
quirk, and second, the code references rx and tx LEDs, but there is
only one LED on the laptop and its meant to be an rfkill LED. I can go
and echo rfkill0 to both trigger files in /sys, but it seems like
there should be a better way.


2009-02-09 16:51:20

by Bob Copeland

[permalink] [raw]
Subject: Re: ath5k LEDs on Acer Ferrari 5000 laptop

On Mon, 9 Feb 2009 09:22:16 -0700, Russ Dill wrote
> So no, the LED does not work with or without the emachines patch. It
> only works if I instead set sc->led_pin to 1 and sc->led_on to 1. I
> only mention the emachines patch because it tries to cover 100% of
> AMBIT systems, whereas my laptop wireless chipset identifies as AMBIT,
> but its LED is wired differently.

Right, ok, that is what I wanted to know. I guess we can just
differentiate based on sub-device ID.

I actually have some LED cleanup patches sitting around that need dusting
off, part of which is a sysfs file to set the led pin and polarity (I have
mixed feelings about the usefulness of that part, perhaps it is overkill).
Also todo is to make that device selection table-driven instead of
cascading ifs. I'll post that stuff this week.

As for the function of each LED -- correct, right now we just map everything
on to rx and tx; it's definitely not ideal.

--
Bob Copeland %% http://www.bobcopeland.com



2009-02-09 15:15:25

by Bob Copeland

[permalink] [raw]
Subject: Re: ath5k LEDs on Acer Ferrari 5000 laptop

On Sun, 8 Feb 2009 23:09:49 -0700, Russ Dill wrote
> I have an Acer Ferrari 5000 laptop with an ath5k wireless chipset. It
> has an LED built into the rfkill switch on the front of the laptop. I
> testing various settings within the ath5k driver an the led is on pin
> 1 (sc->led_pin = 1) and it is active high (sc->led_on).

When you say it is hooked up to rfkill, do you mean that enabling
the rfkill turns off the led without the emachines patch? Some
laptops have the led tied to rfkill in such a way that we don't
actually need/want to program it from software.

--
Bob Copeland %% http://www.bobcopeland.com



2009-02-09 16:22:16

by Russ Dill

[permalink] [raw]
Subject: Re: ath5k LEDs on Acer Ferrari 5000 laptop

On Mon, Feb 9, 2009 at 8:14 AM, Bob Copeland <[email protected]> wrote:
> On Sun, 8 Feb 2009 23:09:49 -0700, Russ Dill wrote
>> I have an Acer Ferrari 5000 laptop with an ath5k wireless chipset. It
>> has an LED built into the rfkill switch on the front of the laptop. I
>> testing various settings within the ath5k driver an the led is on pin
>> 1 (sc->led_pin = 1) and it is active high (sc->led_on).
>
> When you say it is hooked up to rfkill, do you mean that enabling
> the rfkill turns off the led without the emachines patch? Some
> laptops have the led tied to rfkill in such a way that we don't
> actually need/want to program it from software.
>

I mean that there is a physical rfkill switch (actually more like a
toggle button) on the laptop:

http://i146.photobucket.com/albums/r245/MechNinja/IMG_2844.jpg

Because they are just buttons and not actual switches, they are lights
that should indicate whether or not a radio is on or off. This works
for bluetooth, but not for wireless lan. Without informing the driver
of the LED pin, the wireless lan LED never lights. Its a 100% soft
LED.

So no, the LED does not work with or without the emachines patch. It
only works if I instead set sc->led_pin to 1 and sc->led_on to 1. I
only mention the emachines patch because it tries to cover 100% of
AMBIT systems, whereas my laptop wireless chipset identifies as AMBIT,
but its LED is wired differently.

2009-02-09 16:55:28

by Johannes Berg

[permalink] [raw]
Subject: Re: ath5k LEDs on Acer Ferrari 5000 laptop

On Mon, 2009-02-09 at 11:50 -0500, Bob Copeland wrote:

> I actually have some LED cleanup patches sitting around that need dusting
> off, part of which is a sysfs file to set the led pin and polarity (I have
> mixed feelings about the usefulness of that part, perhaps it is overkill).

Sounds useful for debugfs, but not really sysfs.

johannes


Attachments:
signature.asc (836.00 B)
This is a digitally signed message part