diff options
-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: |