2008-05-05 14:53:47

by Andy Lutomirski

[permalink] [raw]
Subject: rfkill_input without driver-supported rfkill (ath5k in particular)

I finally got my WLAN button working (i.e. generating key events --
thanks Eric Piel!). Now I'd like it to kill my RF :)

The problem seems to be that ath5k (at least the version in
2.6.25-rc9) doesn't support rfkill. It would be nice if that could be
added, but it seems to me that, if ath5k really has no rfkill
mechanism, then there should be some kind of emulation. This would
mean:

1. mac80211 creates a fake rfkill switch for devices that don't
otherwise have one and handles it by turning off the device the same
way that ip link set ... down does but still showing them to userspace
however they were before.

or

2. Some userspace component (HAL or NetworkManager) should notice the
KEY_WLAN event and the presence of an rfkill-less device and turn it
off.

In either case, presumably I should be able to set an led trigger on
my ath5k device so it could control an LED.

(As background, I have an Acer C300, and I replaced the old Intel
MiniPCI card with an Atheros 5213 card. The BIOS doesn't recognize my
card at all, so the "hardware" rfkill does nothing at all, but I still
have a WLAN button and LED.)

Thoughts?

Thanks,
Andy