Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105673
b: refs/heads/master
c: 133ec3b
h: refs/heads/master
i:
  105671: d738ad4
v: v3
  • Loading branch information
Henrique de Moraes Holschuh committed Jul 21, 2008
1 parent e02184d commit eb93c93
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 07431ec82bf9dc74b470a1d820b41c92c4d86e6f
refs/heads/master: 133ec3bd3ae409895eacdce326cdc8d73c249e8a
20 changes: 20 additions & 0 deletions trunk/drivers/misc/thinkpad_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2588,6 +2588,10 @@ static int bluetooth_get_radiosw(void)
if (!tp_features.bluetooth)
return -ENODEV;

/* WLSW overrides bluetooth in firmware/hardware, reflect that */
if (tp_features.hotkey_wlsw && !hotkey_get_wlsw(&status) && !status)
return 0;

if (!acpi_evalf(hkey_handle, &status, "GBDC", "d"))
return -EIO;

Expand All @@ -2601,6 +2605,12 @@ static int bluetooth_set_radiosw(int radio_on)
if (!tp_features.bluetooth)
return -ENODEV;

/* WLSW overrides bluetooth in firmware/hardware, but there is no
* reason to risk weird behaviour. */
if (tp_features.hotkey_wlsw && !hotkey_get_wlsw(&status) && !status
&& radio_on)
return -EPERM;

if (!acpi_evalf(hkey_handle, &status, "GBDC", "d"))
return -EIO;
if (radio_on)
Expand Down Expand Up @@ -2760,6 +2770,10 @@ static int wan_get_radiosw(void)
if (!tp_features.wan)
return -ENODEV;

/* WLSW overrides WWAN in firmware/hardware, reflect that */
if (tp_features.hotkey_wlsw && !hotkey_get_wlsw(&status) && !status)
return 0;

if (!acpi_evalf(hkey_handle, &status, "GWAN", "d"))
return -EIO;

Expand All @@ -2773,6 +2787,12 @@ static int wan_set_radiosw(int radio_on)
if (!tp_features.wan)
return -ENODEV;

/* WLSW overrides bluetooth in firmware/hardware, but there is no
* reason to risk weird behaviour. */
if (tp_features.hotkey_wlsw && !hotkey_get_wlsw(&status) && !status
&& radio_on)
return -EPERM;

if (!acpi_evalf(hkey_handle, &status, "GWAN", "d"))
return -EIO;
if (radio_on)
Expand Down

0 comments on commit eb93c93

Please sign in to comment.