···150150/* The actual device the driver binds to */151151static struct eeepc_hotk *ehotk;152152153153+static void eeepc_rfkill_hotplug(bool real);154154+153155/* Platform device/driver */154156static int eeepc_hotk_thaw(struct device *device);155157static int eeepc_hotk_restore(struct device *device);···345343static int eeepc_rfkill_set(void *data, bool blocked)346344{347345 unsigned long asl = (unsigned long)data;348348- return set_acpi(asl, !blocked);346346+ int ret;347347+348348+ if (asl != CM_ASL_WLAN)349349+ return set_acpi(asl, !blocked);350350+351351+ /* hack to avoid panic with rt2860sta */352352+ if (blocked)353353+ eeepc_rfkill_hotplug(false);354354+ ret = set_acpi(asl, !blocked);355355+ return ret;349356}350357351358static const struct rfkill_ops eeepc_rfkill_ops = {352359 .set_block = eeepc_rfkill_set,353360};354361355355-static void __init eeepc_enable_camera(void)362362+static void __devinit eeepc_enable_camera(void)356363{357364 /*358365 * If the following call to set_acpi() fails, it's because there's no···654643 return 0;655644}656645657657-static void eeepc_rfkill_hotplug(void)646646+static void eeepc_rfkill_hotplug(bool real)658647{659648 struct pci_dev *dev;660649 struct pci_bus *bus;661661- bool blocked = eeepc_wlan_rfkill_blocked();650650+ bool blocked = real ? eeepc_wlan_rfkill_blocked() : true;662651663663- if (ehotk->wlan_rfkill)652652+ if (real && ehotk->wlan_rfkill)664653 rfkill_set_sw_state(ehotk->wlan_rfkill, blocked);665654666655 mutex_lock(&ehotk->hotplug_lock);···703692 if (event != ACPI_NOTIFY_BUS_CHECK)704693 return;705694706706- eeepc_rfkill_hotplug();695695+ eeepc_rfkill_hotplug(true);707696}708697709698static void eeepc_hotk_notify(struct acpi_device *device, u32 event)···861850{862851 /* Refresh both wlan rfkill state and pci hotplug */863852 if (ehotk->wlan_rfkill)864864- eeepc_rfkill_hotplug();853853+ eeepc_rfkill_hotplug(true);865854866855 if (ehotk->bluetooth_rfkill)867856 rfkill_set_sw_state(ehotk->bluetooth_rfkill,···1004993 * Refresh pci hotplug in case the rfkill state was changed after1005994 * eeepc_unregister_rfkill_notifier()1006995 */10071007- eeepc_rfkill_hotplug();996996+ eeepc_rfkill_hotplug(true);1008997 if (ehotk->hotplug_slot)1009998 pci_hp_deregister(ehotk->hotplug_slot);1010999···11201109 * Refresh pci hotplug in case the rfkill state was changed during11211110 * setup.11221111 */11231123- eeepc_rfkill_hotplug();11121112+ eeepc_rfkill_hotplug(true);1124111311251114exit:11261115 if (result && result != -ENODEV)···12001189 return 0;12011190}1202119112031203-static int eeepc_hotk_add(struct acpi_device *device)11921192+static int __devinit eeepc_hotk_add(struct acpi_device *device)12041193{12051194 struct device *dev;12061195 int result;