diff options
author | Eric Nelson <eric.nelson@boundarydevices.com> | 2012-08-20 16:34:58 -0700 |
---|---|---|
committer | Ian Wisbon <ian.wisbon@timesys.com> | 2012-08-29 16:47:30 -0400 |
commit | da75603f8d2f107722c2628b5f6019f5e81d8c39 (patch) | |
tree | 5b897abdbd7d088e4d24ec00bf546a1d07954bfc | |
parent | 2f0c84b3619deaaebeb3daa0166bed54bfdac190 (diff) |
wl12xx_sdio: reset during op_remove_interface
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
-rw-r--r-- | arch/arm/mach-mx6/board-mx6q_sabrelite.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/sdio.c | 1 |
3 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-mx6/board-mx6q_sabrelite.c b/arch/arm/mach-mx6/board-mx6q_sabrelite.c index c0065bfc24d4..787e3eb50eb4 100644 --- a/arch/arm/mach-mx6/board-mx6q_sabrelite.c +++ b/arch/arm/mach-mx6/board-mx6q_sabrelite.c @@ -981,9 +981,19 @@ static iomux_v3_cfg_t n6x_sd2_pads[] = { }; #ifdef CONFIG_WL12XX_PLATFORM_DATA +static void wl1271_set_power(bool enable) +{ + if (0 == enable) { + gpio_set_value(N6_WL1271_WL_EN, 0); /* momentarily disable */ + mdelay(2); + gpio_set_value(N6_WL1271_WL_EN, 1); + } +} + struct wl12xx_platform_data n6q_wlan_data __initdata = { .irq = gpio_to_irq(N6_WL1271_WL_IRQ), .board_ref_clock = WL12XX_REFCLOCK_38, /* 38.4 MHz */ + .set_power = wl1271_set_power, }; static struct regulator_consumer_supply n6q_vwl1271_consumers[] = { diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index e6497dc669df..ae9cae20dfec 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c @@ -1767,6 +1767,8 @@ static void wl1271_op_remove_interface(struct ieee80211_hw *hw, mutex_unlock(&wl->mutex); cancel_work_sync(&wl->recovery_work); + if (wl->set_power) + wl->set_power(0); } void wl1271_configure_filters(struct wl1271 *wl, unsigned int filters) diff --git a/drivers/net/wireless/wl12xx/sdio.c b/drivers/net/wireless/wl12xx/sdio.c index 536e5065454b..5bd82f2c15ca 100644 --- a/drivers/net/wireless/wl12xx/sdio.c +++ b/drivers/net/wireless/wl12xx/sdio.c @@ -303,6 +303,7 @@ static int __devinit wl1271_probe(struct sdio_func *func, /* Tell PM core that we don't need the card to be powered now */ pm_runtime_put_noidle(&func->dev); + wl->set_power = wlan_data->set_power; wl1271_notice("initialized"); return 0; |