On Fri, 2009-07-17 at 00:18 +0200, Johannes Berg wrote: > > And pressing it again gets this: > > [root@tmb-laptop rfkill]# ./rfkill list > > 0: acer-wireless: Wireless LAN > > Soft blocked: no > > Hard blocked: no > > 1: acer-bluetooth: Bluetooth > > Soft blocked: yes > > Hard blocked: no > > 2: phy0: Wireless LAN > > Soft blocked: yes > > Hard blocked: no > > > > And after that I cant get wireless back until I again do a: > > ./rfkill unblock 2 > > (works only when acer-wireless is no/no and Wireless LAN is yes/no) > > Right. This is bad. The button press shouldn't have affected the > soft-state of the rfkill #2. > > > Applying this patch: > > [PATCH] rfkill: fix rfkill_set_states() to set the hw state > > sent by Alan Jenkins does not help this issue either... > > > > Any suggestions how to fix the rfkill ? > > I'll poke at the acer code to see what it's doing wrong... Can't see anything wrong. I wonder if the button you have sends both the ACPI event _and_ an input event. Can you try this patch and tell us what happens? johannes --- wireless-testing.orig/net/rfkill/input.c 2009-07-17 00:27:29.000000000 +0200 +++ wireless-testing/net/rfkill/input.c 2009-07-17 00:29:50.000000000 +0200 @@ -57,6 +57,8 @@ static void __rfkill_handle_global_op(en { unsigned int i; + printk(KERN_DEBUG "__rfkill_handle_global_op(%d)\n", op); + switch (op) { case RFKILL_GLOBAL_OP_EPO: rfkill_epo(); @@ -87,6 +89,7 @@ static void __rfkill_handle_normal_op(co bool blocked; blocked = rfkill_get_global_sw_state(type); + printk(KERN_DEBUG "__rfkill_handle_normal_op(%d, %d) [%d]\n", type, complement, blocked); if (complement) blocked = !blocked; @@ -175,6 +178,8 @@ static void rfkill_schedule_toggle(enum { unsigned long flags; + printk(KERN_DEBUG "rfkill_schedule_toggle(%d)\n", type); + if (rfkill_is_epo_lock_active()) return; @@ -189,6 +194,8 @@ static void rfkill_schedule_toggle(enum static void rfkill_schedule_evsw_rfkillall(int state) { + printk(KERN_DEBUG "rfkill_schedule_evsw_rfkillall(%d)\n", state); + if (state) rfkill_schedule_global_op(rfkill_master_switch_op); else -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html