dell-laptop: Fix rfkill state queries
authorMatthew Garrett <mjg@redhat.com>
Fri, 31 Jul 2009 02:25:38 +0000 (03:25 +0100)
committerLen Brown <len.brown@intel.com>
Thu, 10 Dec 2009 04:56:40 +0000 (23:56 -0500)
The current code in dell-laptop is confused about the hardware rfkill
state. Fix it up such that it's always reported correctly.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Tested-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/platform/x86/dell-laptop.c

index 74909c4aaeea8777bd8edd668dc10602705ff186..906111152b035f20f455e9bd127e317423b6e3ab 100644 (file)
@@ -197,8 +197,8 @@ static void dell_rfkill_query(struct rfkill *rfkill, void *data)
        dell_send_request(&buffer, 17, 11);
        status = buffer.output[1];
 
-       if (status & BIT(bit))
-               rfkill_set_hw_state(rfkill, !!(status & BIT(16)));
+       rfkill_set_sw_state(rfkill, !!(status & BIT(bit)));
+       rfkill_set_hw_state(rfkill, !(status & BIT(16)));
 }
 
 static const struct rfkill_ops dell_rfkill_ops = {