eeePC 900 && turning off wireless (ath0)

Matthias Apitz guru at unixarea.de
Mon Jul 7 12:19:41 UTC 2008


El día Friday, July 04, 2008 a las 04:40:02PM +0200, Matthias Apitz escribió:

> Hello Rui,
> 
> With your changes of acpi_asus.c in RELENG_7 the devd(8) and my
> hook-script in /usr/local/etc/devd/ath.conf sees the Fn+F2 now as the
> event "ACPI ASUS-Eee _SB_.ATKD", but it is anyway if Fn+F2 switches off
> or on the wireless NIC, the event for devd(8) is always the same;
> from the above event it is clear where
> the strings for system ACPI and subsystem ASUS-Eee come from, but I
> don't see where the string "_SB_.ATKD" is made; it must be derived
> from the 'notify' argument of the call
> 
>                 /* Notify devd(8) */
> 		acpi_UserNotify("ASUS-Eee", h, notify);
> 
> and I was hoping to distinguish it into two different events, one when
> Fn+F2 is switching off the NIC, and one of the case of switch on; any
> idea? thx

I have modified /usr/src/sys/dev/acpi_support/acpi_asus.c to see what
'notify' is send upstream to devd(8):

                /* Notify devd(8) */
                device_printf(sc->dev,
                    "Fn+F2 pressed, notify to devd(8) is %08x\n", notify);
                acpi_UserNotify("ASUS-Eee", h, notify);

and it turns out that in case of switching wireless of it is 0x00000011,
while on switch-on it is 0x00000010; but the devd(8) only sees both
events as '_SB_.ATKD'; I've grep'ed a lot around but can't see the place
where the hex events of acpi_UserNotify() are converted into the string
'_SB_.ATKD', any idea where to look;

for the devd(8) hook it would be essential to know if the wireless was
turned on of off, to load or unload the driver module if_ath.ko in that
case and bring the interface up again (which works fine if I do it by
hand);

	matthias

-- 
Matthias Apitz
Manager Technical Support - OCLC GmbH
Gruenwalder Weg 28g - 82041 Oberhaching - Germany
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <matthias.apitz at oclc.org> - w http://www.oclc.org/ http://www.UnixArea.de/
b http://gurucubano.blogspot.com/
«...una sola vez, que es cuanto basta si se trata de verdades definitivas.»
«...only once, which is enough if it has todo with definite truth.»
José Saramago, Historia del Cerca de Lisboa


More information about the freebsd-hackers mailing list