[PATCH 03/12] dell-laptop: If there is no hwswitch, then clear all hw-controlled bits

2013-11-17 Thread Hans de Goede
To ensure we don't enter any hw-switch related code paths on machines without a hw-switch. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/platform/x86/dell-laptop.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/platform/x86/dell-laptop.c

[PATCH 02/12] dell-laptop: Only enable rfkill on Latitudes

2013-11-17 Thread Hans de Goede
The rfkill functionality was removed from the dell-laptop driver because it was causing problems on various non Latitude models, and the blacklist kept growing and growing. In the thread discussing this Dell mentioned that they only QA the rfkill acpi interface on Latitudes and indeed there have

[PATCH 01/12] Revert dell-laptop: Remove rfkill code

2013-11-17 Thread Hans de Goede
Without rfkill functionality in dell-laptop I have the following problems: -If the hardware radio switch is set to disable the radio, then userspace will still think it can use wireless and bluetooth. -The wwan / 3g modem cannot be soft blocked without the dell-laptop rfkill functionality I

[PATCH 06/12] dell-laptop: Don't read-back sw_state on machines with a hardware switch

2013-11-17 Thread Hans de Goede
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

[PATCH 04/12] dell-laptop: Only get status from BIOS once when updating

2013-11-17 Thread Hans de Goede
Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/platform/x86/dell-laptop.c | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c index 48fabf6..06f281b 100644 ---

[PATCH 09/12] dell-laptop: Do not skip setting blocked bit rfkill_set while hw-blocked

2013-11-17 Thread Hans de Goede
Instead when hw-blocked always write 1 to the blocked bit for the radio in question. This is necessary to properly set all the blocked bits for hw-switch controlled radios to 1 after power-on and resume. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/platform/x86/dell-laptop.c | 5

[PATCH 10/12] dell-laptop: Wait less long before updating rfkill after an rfkill keypress

2013-11-17 Thread Hans de Goede
Some time is needed for the BIOS to do its work, but 250ms should be plenty. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/platform/x86/dell-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/dell-laptop.c

[PATCH 12/12] dell-laptop: Only enable rfkill functionality on laptops with a hw killswitch

2013-11-17 Thread Hans de Goede
All my testing has been on laptops with a hw killswitch, so to be on the safe side disable rfkill functionality on models without a hw killswitch for now. Once we gather some feedback on laptops without a hw killswitch this decision maybe reconsidered. Signed-off-by: Hans de Goede

[PATCH 05/12] dell-laptop: Don't set sw_state from the query callback

2013-11-17 Thread Hans de Goede
The query callback should only update the hw_state, see the comment in net/rfkill/core.c in rfkill_set_block, which is its only caller. rfkill_set_block will modify the sw_state directly after calling query so calling set_sw_state is an expensive NOP. Signed-off-by: Hans de Goede

[PATCH 11/12] dell-laptop: Add a force_rfkill module parameter

2013-11-17 Thread Hans de Goede
Setting force_rfkill will cause the dell-laptop rfkill code to skip its whitelist checks, this will allow individual users to override the whitelist, as well as to gather info from users to improve the checks. Signed-off-by: Hans de Goede hdego...@redhat.com ---

[PATCH 07/12] dell-laptop: Allow changing the sw_state while the radio is blocked by hw

2013-11-17 Thread Hans de Goede
This makes dell-laptop's rfkill code consistent with other drivers which allow sw_state changes while hw blocked. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/platform/x86/dell-laptop.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git

[PATCH 08/12] dell-laptop: Sync current block state to BIOS on hw switch change

2013-11-17 Thread Hans de Goede
This is necessary for 3 reasons: 1) To apply sw_state changes made while hw-blocked 2) To set all the blocked bits for hw-switch controlled radios to 1 when the switch gets changed to off, this is necessary on some models to actually turn the radio status LEDs off. 3) On some models non