Messages in this thread | | | From | balagi@justmail ... | Subject | user defined hotplug events? | Date | Tue, 20 Mar 2007 09:58:33 +0100 |
| |
Hello,
on my notebook, the built in wlan card uses the ipw2100 driver. On boot time, the ipw2100 module is loaded and fires a hotplug "add" event. The hotplug event configures the interface and starts wpa_supplicant and wpa_cli. The ipw2100 chip can be enabled/disabled by a hardware switch, so i only enabled it if i need a connection.
Now: even if the wlan hardware is disabled by the switch, wpa_supplicant tries to get a connection. That's not fine... The ipw2100 driver exports a switch state file in sysfs, but polling this file is not fine also.
I want that it works as follows: A state change of the hardware switch should fire a hotplug event, so that the wpa_* programs are started if the switch is put on, and killed if the switch is put off. The ipw2100 driver already logs a state change of the switch in klog, so adding a kobject_uevent should not be the major problem. But which KOBJ_* event enum should be used? KOBJ_ONLINE, KOBJ_OFFLINE ? Or new, user defined, ones?
Comments? Suggestions?
Thomas
"Jetzt Handykosten senken mit klarmobil - 14 Ct./Min.! Hier klicken" http://www.klarmobil.de/index.html?pid=73025
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |