--- a/drivers/net/wireless/wl12xx/sdio.c 2011-12-20 06:20:19.000000000 -0600 +++ b/drivers/net/wireless/wl12xx/sdio.c 2012-06-20 12:51:18.000000000 -0500 @@ -169,6 +169,10 @@ struct sdio_func *func = wl_to_func(wl); int ret; + // MTPCIE: + if (wl->set_power) + wl->set_power(1); + /* If enabled, tell runtime PM not to power off the card */ if (pm_runtime_enabled(&func->dev)) { ret = pm_runtime_get_sync(&func->dev); @@ -193,6 +197,10 @@ struct sdio_func *func = wl_to_func(wl); int ret; + // MTPCIE: + if (wl->set_power) + wl->set_power(0); + sdio_disable_func(func); sdio_release_host(func); @@ -265,14 +273,18 @@ wl->irq = wlan_data->irq; if (wl->ref_clock < 0) wl->ref_clock = wlan_data->board_ref_clock; - if (wl->tcxo_clock < 0) - wl->tcxo_clock = wlan_data->board_tcxo_clock; - wl->platform_quirks = wlan_data->platform_quirks; - - if (wl->platform_quirks & WL12XX_PLATFORM_QUIRK_EDGE_IRQ) - irqflags = IRQF_TRIGGER_RISING; - else - irqflags = IRQF_TRIGGER_HIGH | IRQF_ONESHOT; + // MTPCIE: + if (wlan_data->set_power) + wl->set_power = wlan_data->set_power; + + //if (wl->tcxo_clock < 0) + // wl->tcxo_clock = wlan_data->board_tcxo_clock; + //wl->platform_quirks = wlan_data->platform_quirks; + + //if (wl->platform_quirks & WL12XX_PLATFORM_QUIRK_EDGE_IRQ) + irqflags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING; + //else + // irqflags = IRQF_TRIGGER_HIGH | IRQF_ONESHOT; ret = request_threaded_irq(wl->irq, wl1271_hardirq, wl1271_irq, irqflags,