diff options
author | Carlos Corbacho <carlos@strangeworlds.co.uk> | 2008-08-06 14:13:56 -0400 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2008-08-14 20:27:01 -0400 |
commit | 5c742b45dd5fbbb6cf74d3378341704f4b23c5e8 (patch) | |
tree | b689248d952f8e9c408895f5cd21cfbb095b1b6f | |
parent | dab36ad8d50dc9424dfc4926f62aaf9bd52dcf13 (diff) |
acer-wmi: Fix wireless and bluetooth on early AMW0 v2 laptops
In the old acer_acpi, I discovered that on some of the newer AMW0 laptops
that supported the WMID methods, they don't work properly for setting the
wireless and bluetooth values.
So for the AMW0 V2 laptops, we want to use both the 'old' AMW0 and the
'new' WMID methods for setting wireless & bluetooth to guarantee we always
enable it.
This was fixed in acer_acpi some time ago, but I forgot to port the patch
over to acer-wmi when it was merged.
(Without this patch, early AMW0 V2 laptops such as the Aspire 5040 won't
work with acer-wmi, where-as they did with the old acer_acpi).
AK: fix compilation
Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
CC: stable@kernel.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
-rw-r--r-- | drivers/misc/acer-wmi.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/misc/acer-wmi.c b/drivers/misc/acer-wmi.c index e7a3fe508dff..b2d9878dc3f0 100644 --- a/drivers/misc/acer-wmi.c +++ b/drivers/misc/acer-wmi.c | |||
@@ -803,11 +803,30 @@ static acpi_status get_u32(u32 *value, u32 cap) | |||
803 | 803 | ||
804 | static acpi_status set_u32(u32 value, u32 cap) | 804 | static acpi_status set_u32(u32 value, u32 cap) |
805 | { | 805 | { |
806 | acpi_status status; | ||
807 | |||
806 | if (interface->capability & cap) { | 808 | if (interface->capability & cap) { |
807 | switch (interface->type) { | 809 | switch (interface->type) { |
808 | case ACER_AMW0: | 810 | case ACER_AMW0: |
809 | return AMW0_set_u32(value, cap, interface); | 811 | return AMW0_set_u32(value, cap, interface); |
810 | case ACER_AMW0_V2: | 812 | case ACER_AMW0_V2: |
813 | if (cap == ACER_CAP_MAILLED) | ||
814 | return AMW0_set_u32(value, cap, interface); | ||
815 | |||
816 | /* | ||
817 | * On some models, some WMID methods don't toggle | ||
818 | * properly. For those cases, we want to run the AMW0 | ||
819 | * method afterwards to be certain we've really toggled | ||
820 | * the device state. | ||
821 | */ | ||
822 | if (cap == ACER_CAP_WIRELESS || | ||
823 | cap == ACER_CAP_BLUETOOTH) { | ||
824 | status = WMID_set_u32(value, cap, interface); | ||
825 | if (ACPI_FAILURE(status)) | ||
826 | return status; | ||
827 | |||
828 | return AMW0_set_u32(value, cap, interface); | ||
829 | } | ||
811 | case ACER_WMID: | 830 | case ACER_WMID: |
812 | return WMID_set_u32(value, cap, interface); | 831 | return WMID_set_u32(value, cap, interface); |
813 | default: | 832 | default: |