aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-11-17 08:00:21 -0500
committerMatthew Garrett <matthew.garrett@nebula.com>2013-11-20 18:50:48 -0500
commit3f56588a79a06a0499db0077cad6675762ddc40e (patch)
tree0f942eb7eee3ca03b5b2c811b8a32f5217b4bf90
parent33f9359abb9f6ded3e7b6dc98b1468c83404af49 (diff)
dell-laptop: Don't read-back sw_state on machines with a hardware switch
On machines with a hardware switch, the blocking settings can not be changed through a Fn + wireless-key combo, so there is no reason to read back the blocking state from the BIOS. Reading back is not only not necessary it is actually harmful, since on some machines the blocking state will be cleared to all 0 after a wireless switch toggle, even for radios not controlled by the hw-switch (yeah firmware bugs). This causes "magic" changes to the sw_state. This is inconsistent with other rfkill drivers which preserve the sw_state over a hw kill on / off. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
-rw-r--r--drivers/platform/x86/dell-laptop.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index 7f47396846d1..80de0cca1dfa 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -428,7 +428,10 @@ out:
428static void dell_rfkill_update_sw_state(struct rfkill *rfkill, int radio, 428static void dell_rfkill_update_sw_state(struct rfkill *rfkill, int radio,
429 int status) 429 int status)
430{ 430{
431 rfkill_set_sw_state(rfkill, !!(status & BIT(radio + 16))); 431 if (!(status & BIT(0))) {
432 /* No hw-switch, sync BIOS state to sw_state */
433 rfkill_set_sw_state(rfkill, !!(status & BIT(radio + 16)));
434 }
432} 435}
433 436
434static void dell_rfkill_update_hw_state(struct rfkill *rfkill, int radio, 437static void dell_rfkill_update_hw_state(struct rfkill *rfkill, int radio,