On Mon, Jul 27, 2009 at 05:10:18PM +0200, Johannes Berg wrote: > Hmm. The previous code was > > - if (status & (1<<16)) > - new_state = RFKILL_STATE_SOFT_BLOCKED; > - > - if (status & (1<<bit)) > - *state = new_state; > - else > - *state = RFKILL_STATE_UNBLOCKED; > - > - return 0; > > where new_state was initialised to RFKILL_STATE_HARD_BLOCKED. > > So doesn't that mean that 1<<bit is the hard-block bit? Or was the > previous code just bogus, but happened to work since rfkill didn't > separate the hard/soft kill concepts? The previous code may well have been bogus. The code is basically the only documentation I have here - bit 16 indicates that the switch is on (and thus everything else is hard blocked), while bits 17, 18 and 19 indicate blocked wifi, bluetooth and wwan respectively. I'd assumed that those indicated that they were soft blocked independently of the hardware block state, but it may be that the hardware doesn't expose the soft state if the hard switch is blocking the devices. -- Matthew Garrett | mjg59@xxxxxxxxxxxxx -- 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