Re: interaction with rfkill
Roy Marples
Thu Jul 30 22:31:15 2009
Iain wrote:
Roy Marples wrote:
My take on this is that it's a driver bug. If querying an interface
returns ENODEV then dhcpcd - and other software - will rightly think
it no longer exists.
Well yes, however it looks like a deliberate design decision. It went in
here:
<http://git.us.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=e655b9f03f41c7a84fb74d6619abf844d7f2ab65>
I'm not entirely sure, but it looks like they're trying to avoid
firmware load and various other suspend related things that are
effectively useless when rfkill has been enabled.
OK, hooking into rfkill is the wrong thing todo.
However, if the switch is toggled, the kernel should emit netlink
messages to indicate this.
Can you see if this is the case? if-linux.c, lines 1-310 are of interest.
I would be interested in seeing dhcpcd output running in a terminal
dhcpcd -dB
and then the rkwill switch is toggled a few times, about 10 secs
between each toggle. Also, test starting dhcpcd with the switch on and
then off.
If you could email back with those results, it should be interesting :)
I'll grab some details tomorrow. There's not really much to see though,
as far as I can tell dhcpcd just ignores the interface due to that
ENODEV when it first probes for available network cards.
Ah, but what I'd like to see is this .....
dhcpcd reacts to new interface link messages sent via the kernel.
So if ifconfig UP fails with ENODEV, then I would logically expect a
kernel announcement that the interface is available when the rfkill
switch is toggled to indicate the interface is now ready.
Thanks
Roy
Archive administrator: postmaster@marples.name