Re: hp-wmi rfkill change breaks systems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Matthew,

I reverted 997daa1bd9aca412ab97955a35b26c460c0ec7a4 and add a check in
hp_wmi_rfkill_setup as below:

diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index 8ba8956..65fee8a 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -54,7 +54,6 @@ MODULE_ALIAS("wmi:5FB7F034-2C63-45e9-BE91-3D44E2C707E4");
 #define HPWMI_HARDWARE_QUERY 0x4
 #define HPWMI_WIRELESS_QUERY 0x5
 #define HPWMI_HOTKEY_QUERY 0xc
-#define HPWMI_FEATURE_QUERY 0xd
 #define HPWMI_WIRELESS2_QUERY 0x1b
 #define HPWMI_POSTCODEERROR_QUERY 0x2a

@@ -293,17 +292,6 @@ static int hp_wmi_tablet_state(void)
        return (state & 0x4) ? 1 : 0;
 }

-static int hp_wmi_bios_2009_later(void)
-{
-       int state = 0;
-       int ret = hp_wmi_perform_query(HPWMI_FEATURE_QUERY, 0, &state,
-                                      sizeof(state), sizeof(state));
-       if (ret)
-               return ret;
-
-       return (state & 0x10) ? 1 : 0;
-}
-
 static int hp_wmi_set_block(void *data, bool blocked)
 {
        enum hp_wmi_radio r = (enum hp_wmi_radio) data;
@@ -696,6 +684,11 @@ static int hp_wmi_rfkill_setup(struct
platform_device *device)
        if (err)
                return err;

+       err = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 1,
+                                  &wireless, sizeof(wireless), 0);
+       if (err)
+               return err;
+
        if (wireless & 0x1) {
                wifi_rfkill = rfkill_alloc("hp-wifi", &device->dev,
                                           RFKILL_TYPE_WLAN,
@@ -883,7 +876,7 @@ static int __init hp_wmi_bios_setup(struct
platform_device *device)
        gps_rfkill = NULL;
        rfkill2_count = 0;

-       if (hp_wmi_bios_2009_later() || hp_wmi_rfkill_setup(device))
+       if (hp_wmi_rfkill_setup(device))
                hp_wmi_rfkill2_setup(device);

        err = device_create_file(&device->dev, &dev_attr_display);



It actually works better than 997daa1bd9aca412ab97955a35b26c460c0ec7a4
on new systems, but I don't have old hp systems for testing good HP
WMI 0x05 Set command.

Any suggestions are appreciated.
--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux