]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
platform/x86: asus-wmi: Detect quirk_no_rfkill from the DSDT
authorJoão Paulo Rechi Vita <jprvita@gmail.com>
Tue, 4 Apr 2017 19:32:36 +0000 (19:32 +0000)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 21 Apr 2017 08:12:47 +0000 (10:12 +0200)
commitfcaf45d15aedacc3857deb7944cc512d8eb87789
tree7fb2614303409c6036db30f67780f5c80d82f01c
parent15f416a0595ec09882f143e601c953ff5e4763d0
platform/x86: asus-wmi: Detect quirk_no_rfkill from the DSDT

BugLink: http://bugs.launchpad.net/bugs/1682130
[ Upstream commit 71050ae7bf83e4d71a859257d11adc5de517073e ]

Some Asus laptops that have an airplane-mode indicator LED, also have
the WMI WLAN user bit set, and the following bits in their DSDT:

    Scope (_SB)
    {
      (...)
      Device (ATKD)
      {
        (...)
        Method (WMNB, 3, Serialized)
        {
          (...)
          If (LEqual (IIA0, 0x00010002))
          {
            OWGD (IIA1)
            Return (One)
          }
        }
      }
    }

So when asus-wmi uses ASUS_WMI_DEVID_WLAN_LED (0x00010002) to store the
wlan state, it drives the airplane-mode indicator LED (through the call
to OWGD) in an inverted fashion: the LED is ON when airplane mode is OFF
(since wlan is ON), and vice-versa.

This commit skips registering RFKill switches at all for these laptops,
to allow the asus-wireless driver to drive the airplane mode LED
correctly through the ASHS ACPI device. Relying on the presence of ASHS
and ASUS_WMI_DSTS_USER_BIT avoids adding DMI-based quirks for at least
21 different laptops.

Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/platform/x86/asus-wmi.c