asus-nb-wmi: add wapf quirk for ASUS machines
authorAceLan Kao <acelan.kao@canonical.com>
Wed, 4 Jul 2012 03:19:08 +0000 (11:19 +0800)
committerMatthew Garrett <mjg@redhat.com>
Sat, 28 Jul 2012 04:28:53 +0000 (00:28 -0400)
commitd2044c5a3aafac552d28c1add16930821c24cbd0
tree79c8c162665f644a3152dbd7f0314d6b71e11f43
parent0ece8d515c264078a144bc597d0ffc40645ce378
asus-nb-wmi: add wapf quirk for ASUS machines

The BIOS of these machines will try to enable/disable wifi/bt in
their own sqeuence. It won't read the enable/disable parameter
in WMI command, but just iterates the wifi/bt's status described below
1st. enable wifi, enable bt
2nd. disable wifi, enable bt
3rd. enable wifi, disable bt
4th. disable wifi, disable bt
That will totally mess up the rfkill status, since we will try to read
wifi and bt's status and reset it again while booting up.

To avoid this, these machines should set the wapf value to 4,
that will let software totally control the wifi/bt's status and
BIOS will do nothing instead of sending out the 0x88(KEY_RFKILL) event
instead of 0x5e(wifi enable), 0x5f(wifi diable), 0x7d(bt enable), and
0x7e(bt disable) through WMI.

With this patch[1], it will handle the KEY_RFKILL event correctly and
will block/unblock wifi and bt together.

1. https://lkml.org/lkml/2012/5/21/75

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/asus-nb-wmi.c