提交 e8f56c80 编写于 作者: A AceLan Kao 提交者: Matthew Garrett

asus-wmi: control wlan-led only if wapf == 4

Controlling the wlan led seems to have some side effects to the machines
with wapf value is not equal to 4. It will make the keyboard backlight
out of order.
So, the patch will enable the wlan led function only if the wapf == 4.

Bug: https://bugzilla.kernel.org/show_bug.cgi?id=46791Reported-by: NMirto Silvio Busico <m.busico@ieee.org>
Tested-by: NKarol Herbst <karolherbst@me.com>
Tested-by: Ndrunkenbatman <drunkenbatman@gmail.com>
Signed-off-by: NAceLan Kao <acelan.kao@canonical.com>
Signed-off-by: NMatthew Garrett <matthew.garrett@nebula.com>
上级 b5f4f9ef
......@@ -558,7 +558,7 @@ static int asus_wmi_led_init(struct asus_wmi *asus)
goto error;
}
if (wlan_led_presence(asus)) {
if (wlan_led_presence(asus) && (asus->driver->quirks->wapf == 4)) {
INIT_WORK(&asus->wlan_led_work, wlan_led_update);
asus->wlan_led.name = "asus::wlan";
......@@ -886,7 +886,8 @@ static int asus_new_rfkill(struct asus_wmi *asus,
if (!*rfkill)
return -EINVAL;
if (dev_id == ASUS_WMI_DEVID_WLAN)
if ((dev_id == ASUS_WMI_DEVID_WLAN) &&
(asus->driver->quirks->wapf == 4))
rfkill_set_led_trigger_name(*rfkill, "asus-wlan");
rfkill_init_sw_state(*rfkill, !result);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册