Linux wireless drivers development
 help / color / mirror / Atom feed
* ath5k LEDs on Acer Ferrari 5000 laptop
@ 2009-02-09  6:09 Russ Dill
  2009-02-09 15:14 ` Bob Copeland
  0 siblings, 1 reply; 5+ messages in thread
From: Russ Dill @ 2009-02-09  6:09 UTC (permalink / raw)
  To: ath5k-devel, linux-wireless
  Cc: Bob Copeland, Tulio Magno Quites Machado Filho

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ath5k LEDs on Acer Ferrari 5000 laptop
  2009-02-09  6:09 ath5k LEDs on Acer Ferrari 5000 laptop Russ Dill
@ 2009-02-09 15:14 ` Bob Copeland
  2009-02-09 16:22   ` Russ Dill
  0 siblings, 1 reply; 5+ messages in thread
From: Bob Copeland @ 2009-02-09 15:14 UTC (permalink / raw)
  To: Russ Dill, ath5k-devel, linux-wireless; +Cc: Tulio Magno Quites Machado Filho

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 %% www.bobcopeland.com



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ath5k LEDs on Acer Ferrari 5000 laptop
  2009-02-09 15:14 ` Bob Copeland
@ 2009-02-09 16:22   ` Russ Dill
  2009-02-09 16:50     ` Bob Copeland
  0 siblings, 1 reply; 5+ messages in thread
From: Russ Dill @ 2009-02-09 16:22 UTC (permalink / raw)
  To: Bob Copeland
  Cc: ath5k-devel, linux-wireless, Tulio Magno Quites Machado Filho

On Mon, Feb 9, 2009 at 8:14 AM, Bob Copeland <me@bobcopeland.com> 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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ath5k LEDs on Acer Ferrari 5000 laptop
  2009-02-09 16:22   ` Russ Dill
@ 2009-02-09 16:50     ` Bob Copeland
  2009-02-09 16:54       ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Bob Copeland @ 2009-02-09 16:50 UTC (permalink / raw)
  To: Russ Dill; +Cc: ath5k-devel, linux-wireless, Tulio Magno Quites Machado Filho

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 %% www.bobcopeland.com



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ath5k LEDs on Acer Ferrari 5000 laptop
  2009-02-09 16:50     ` Bob Copeland
@ 2009-02-09 16:54       ` Johannes Berg
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2009-02-09 16:54 UTC (permalink / raw)
  To: Bob Copeland
  Cc: Russ Dill, ath5k-devel, linux-wireless,
	Tulio Magno Quites Machado Filho

[-- Attachment #1: Type: text/plain, Size: 355 bytes --]

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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-02-09 16:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-09  6:09 ath5k LEDs on Acer Ferrari 5000 laptop Russ Dill
2009-02-09 15:14 ` Bob Copeland
2009-02-09 16:22   ` Russ Dill
2009-02-09 16:50     ` Bob Copeland
2009-02-09 16:54       ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox