This cleans up the rfkill handling. An rfkill device is registered (and so the
wlan entry is removed from sysfs) and the wireless button generates KEY_WLAN.
If rfkill-input is loaded (which really ought to be the default, but doesn't
seem to be yet?) then the default behaviour will be for the state to be toggled
on button presses. Again, entirely untested beyond building. Could someone try
this on real hardware?
Created attachment 309502
Updated patch
This cleans up the rfkill handling. An rfkill device is registered (and so the
wlan entry is removed from sysfs) and the wireless button generates KEY_WLAN.
If rfkill-input is loaded (which really ought to be the default, but doesn't
seem to be yet?) then the default behaviour will be for the state to be toggled
on button presses. Again, entirely untested beyond building. Could someone try
this on real hardware?