eeepc-laptop: add rfkill support for the Wimax in ASUS Eee PC 1000HG
Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
c200da5d29
commit
d1ec9c3d43
@ -142,6 +142,7 @@ struct eeepc_hotk {
|
|||||||
struct rfkill *wlan_rfkill;
|
struct rfkill *wlan_rfkill;
|
||||||
struct rfkill *bluetooth_rfkill;
|
struct rfkill *bluetooth_rfkill;
|
||||||
struct rfkill *wwan3g_rfkill;
|
struct rfkill *wwan3g_rfkill;
|
||||||
|
struct rfkill *wimax_rfkill;
|
||||||
struct hotplug_slot *hotplug_slot;
|
struct hotplug_slot *hotplug_slot;
|
||||||
struct mutex hotplug_lock;
|
struct mutex hotplug_lock;
|
||||||
};
|
};
|
||||||
@ -857,6 +858,9 @@ static int eeepc_hotk_restore(struct device *device)
|
|||||||
if (ehotk->wwan3g_rfkill)
|
if (ehotk->wwan3g_rfkill)
|
||||||
rfkill_set_sw_state(ehotk->wwan3g_rfkill,
|
rfkill_set_sw_state(ehotk->wwan3g_rfkill,
|
||||||
get_acpi(CM_ASL_3G) != 1);
|
get_acpi(CM_ASL_3G) != 1);
|
||||||
|
if (ehotk->wimax_rfkill)
|
||||||
|
rfkill_set_sw_state(ehotk->wimax_rfkill,
|
||||||
|
get_acpi(CM_ASL_WIMAX) != 1);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -995,6 +999,8 @@ static void eeepc_rfkill_exit(void)
|
|||||||
rfkill_unregister(ehotk->bluetooth_rfkill);
|
rfkill_unregister(ehotk->bluetooth_rfkill);
|
||||||
if (ehotk->wwan3g_rfkill)
|
if (ehotk->wwan3g_rfkill)
|
||||||
rfkill_unregister(ehotk->wwan3g_rfkill);
|
rfkill_unregister(ehotk->wwan3g_rfkill);
|
||||||
|
if (ehotk->wimax_rfkill)
|
||||||
|
rfkill_unregister(ehotk->wimax_rfkill);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void eeepc_input_exit(void)
|
static void eeepc_input_exit(void)
|
||||||
@ -1070,6 +1076,13 @@ static int eeepc_rfkill_init(struct device *dev)
|
|||||||
if (result && result != -ENODEV)
|
if (result && result != -ENODEV)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
|
result = eeepc_new_rfkill(&ehotk->wimax_rfkill,
|
||||||
|
"eeepc-wimax", dev,
|
||||||
|
RFKILL_TYPE_WIMAX, CM_ASL_WIMAX);
|
||||||
|
|
||||||
|
if (result && result != -ENODEV)
|
||||||
|
goto exit;
|
||||||
|
|
||||||
result = eeepc_setup_pci_hotplug();
|
result = eeepc_setup_pci_hotplug();
|
||||||
/*
|
/*
|
||||||
* If we get -EBUSY then something else is handling the PCI hotplug -
|
* If we get -EBUSY then something else is handling the PCI hotplug -
|
||||||
|
Loading…
Reference in New Issue
Block a user