summaryrefslogtreecommitdiff
path: root/recipes-kernel/linux/linux-at91-4.9.87/mtr/wl12xx_enable_disable.patch
blob: f9baa14d6a9b083255c971726e0f2dc6ad73dbf2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c
index 47fe7f96..fb209475 100644
--- a/drivers/net/wireless/ti/wlcore/sdio.c
+++ b/drivers/net/wireless/ti/wlcore/sdio.c
@@ -154,6 +154,9 @@ static int wl12xx_sdio_power_on(struct wl12xx_sdio_glue *glue)
 	struct sdio_func *func = dev_to_sdio_func(glue->dev);
 	struct mmc_card *card = func->card;
 
+  /* Multi-Tech MTR patch: Assert WL_EN (PA27) to enable Wi-Fi */
+  gpio_set_value(27, 1);
+
 	ret = pm_runtime_get_sync(&card->dev);
 	if (ret) {
 		/*
@@ -185,6 +188,9 @@ static int wl12xx_sdio_power_off(struct wl12xx_sdio_glue *glue)
 	sdio_claim_host(func);
 	sdio_disable_func(func);
 	sdio_release_host(func);
+  
+  /* Multi-Tech MTR patch: De-assert WL_EN (PA27) to disable Wi-Fi */
+  gpio_set_value(27, 0);
 
 	/* Power off the card manually in case it wasn't powered off above */
 	ret = mmc_power_save_host(card->host);