Commit 2e9e159d authored by Corentin Chary's avatar Corentin Chary Committed by Matthew Garrett

eeepc-wmi: add wimax support

Signed-off-by: default avatarCorentin Chary <corentincj@iksaif.net>
Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
parent 9e1565bc
...@@ -71,6 +71,7 @@ MODULE_ALIAS("wmi:"EEEPC_WMI_MGMT_GUID); ...@@ -71,6 +71,7 @@ MODULE_ALIAS("wmi:"EEEPC_WMI_MGMT_GUID);
#define EEEPC_WMI_DEVID_WLAN 0x00010011 #define EEEPC_WMI_DEVID_WLAN 0x00010011
#define EEEPC_WMI_DEVID_BLUETOOTH 0x00010013 #define EEEPC_WMI_DEVID_BLUETOOTH 0x00010013
#define EEEPC_WMI_DEVID_WIMAX 0x00010017
#define EEEPC_WMI_DEVID_WWAN3G 0x00010019 #define EEEPC_WMI_DEVID_WWAN3G 0x00010019
#define EEEPC_WMI_DEVID_BACKLIGHT 0x00050012 #define EEEPC_WMI_DEVID_BACKLIGHT 0x00050012
#define EEEPC_WMI_DEVID_CAMERA 0x00060013 #define EEEPC_WMI_DEVID_CAMERA 0x00060013
...@@ -138,6 +139,7 @@ struct eeepc_wmi { ...@@ -138,6 +139,7 @@ struct eeepc_wmi {
struct rfkill *wlan_rfkill; struct rfkill *wlan_rfkill;
struct rfkill *bluetooth_rfkill; struct rfkill *bluetooth_rfkill;
struct rfkill *wimax_rfkill;
struct rfkill *wwan3g_rfkill; struct rfkill *wwan3g_rfkill;
struct hotplug_slot *hotplug_slot; struct hotplug_slot *hotplug_slot;
...@@ -691,6 +693,11 @@ static void eeepc_wmi_rfkill_exit(struct eeepc_wmi *eeepc) ...@@ -691,6 +693,11 @@ static void eeepc_wmi_rfkill_exit(struct eeepc_wmi *eeepc)
rfkill_destroy(eeepc->bluetooth_rfkill); rfkill_destroy(eeepc->bluetooth_rfkill);
eeepc->bluetooth_rfkill = NULL; eeepc->bluetooth_rfkill = NULL;
} }
if (eeepc->wimax_rfkill) {
rfkill_unregister(eeepc->wimax_rfkill);
rfkill_destroy(eeepc->wimax_rfkill);
eeepc->wimax_rfkill = NULL;
}
if (eeepc->wwan3g_rfkill) { if (eeepc->wwan3g_rfkill) {
rfkill_unregister(eeepc->wwan3g_rfkill); rfkill_unregister(eeepc->wwan3g_rfkill);
rfkill_destroy(eeepc->wwan3g_rfkill); rfkill_destroy(eeepc->wwan3g_rfkill);
...@@ -719,6 +726,13 @@ static int eeepc_wmi_rfkill_init(struct eeepc_wmi *eeepc) ...@@ -719,6 +726,13 @@ static int eeepc_wmi_rfkill_init(struct eeepc_wmi *eeepc)
if (result && result != -ENODEV) if (result && result != -ENODEV)
goto exit; goto exit;
result = eeepc_new_rfkill(eeepc, &eeepc->wimax_rfkill,
"eeepc-wimax", RFKILL_TYPE_WIMAX,
EEEPC_WMI_DEVID_WIMAX);
if (result && result != -ENODEV)
goto exit;
result = eeepc_new_rfkill(eeepc, &eeepc->wwan3g_rfkill, result = eeepc_new_rfkill(eeepc, &eeepc->wwan3g_rfkill,
"eeepc-wwan3g", RFKILL_TYPE_WWAN, "eeepc-wwan3g", RFKILL_TYPE_WWAN,
EEEPC_WMI_DEVID_WWAN3G); EEEPC_WMI_DEVID_WWAN3G);
...@@ -1276,7 +1290,11 @@ static int eeepc_hotk_restore(struct device *device) ...@@ -1276,7 +1290,11 @@ static int eeepc_hotk_restore(struct device *device)
if (eeepc->bluetooth_rfkill) { if (eeepc->bluetooth_rfkill) {
bl = !eeepc_wmi_get_devstate_simple(EEEPC_WMI_DEVID_BLUETOOTH); bl = !eeepc_wmi_get_devstate_simple(EEEPC_WMI_DEVID_BLUETOOTH);
rfkill_set_sw_state(eeepc->bluetooth_rfkill, bl); rfkill_set_sw_state(eeepc->bluetooth_rfkill, bl);
} }
if (eeepc->wimax_rfkill) {
bl = !eeepc_wmi_get_devstate_simple(EEEPC_WMI_DEVID_WIMAX);
rfkill_set_sw_state(eeepc->wimax_rfkill, bl);
}
if (eeepc->wwan3g_rfkill) { if (eeepc->wwan3g_rfkill) {
bl = !eeepc_wmi_get_devstate_simple(EEEPC_WMI_DEVID_WWAN3G); bl = !eeepc_wmi_get_devstate_simple(EEEPC_WMI_DEVID_WWAN3G);
rfkill_set_sw_state(eeepc->wwan3g_rfkill, bl); rfkill_set_sw_state(eeepc->wwan3g_rfkill, bl);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment