diff options
author | Om Prakash Singh <omp@nvidia.com> | 2013-02-13 20:24:52 -0800 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 13:01:26 -0700 |
commit | ec976da00ea8ba5ca604a3e1b0e5ab2abd15fe69 (patch) | |
tree | 68b11fb97eb89abb5a5a0472f2927caeb09e735e /drivers/net | |
parent | 6457d39747566fa7e5f346a24e376df4e013ebff (diff) |
net: wireless: bcm4335: power off card when not in use
Power off the card when wifi is off and power up only when wifi
is turned on
Bug 1011349
Change-Id: I018c3757280c81c9077dd07949422bf572fc3a0d
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/200684
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/bcm4335/bcmsdh_sdmmc.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/bcm4335/bcmsdh_sdmmc_linux.c | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/wireless/bcm4335/bcmsdh_sdmmc.c b/drivers/net/wireless/bcm4335/bcmsdh_sdmmc.c index 3810056159d2..3451e55de2ef 100644 --- a/drivers/net/wireless/bcm4335/bcmsdh_sdmmc.c +++ b/drivers/net/wireless/bcm4335/bcmsdh_sdmmc.c @@ -36,6 +36,7 @@ #include <linux/mmc/core.h> #include <linux/mmc/card.h> +#include <linux/mmc/host.h> #include <linux/mmc/sdio_func.h> #include <linux/mmc/sdio_ids.h> @@ -1534,7 +1535,9 @@ sdioh_start(sdioh_info_t *si, int stage) 2.6.27. The implementation prior to that is buggy, and needs broadcom's patch for it */ - if ((ret = sdio_reset_comm(gInstance->func[0]->card))) { + ret = mmc_power_restore_host((gInstance->func[0])->card->host); + + if (ret) { sd_err(("%s Failed, error = %d\n", __FUNCTION__, ret)); return ret; } @@ -1619,6 +1622,8 @@ sdioh_stop(sdioh_info_t *si) #endif bcmsdh_oob_intr_set(FALSE); #endif /* !defined(OOB_INTR_ONLY) */ + if (mmc_power_save_host((gInstance->func[0])->card->host)) + sd_err(("%s card power save fail\n", __func__)); } else sd_err(("%s Failed\n", __FUNCTION__)); diff --git a/drivers/net/wireless/bcm4335/bcmsdh_sdmmc_linux.c b/drivers/net/wireless/bcm4335/bcmsdh_sdmmc_linux.c index a341ec5d687b..29afa399f9c7 100644 --- a/drivers/net/wireless/bcm4335/bcmsdh_sdmmc_linux.c +++ b/drivers/net/wireless/bcm4335/bcmsdh_sdmmc_linux.c @@ -34,6 +34,7 @@ #include <linux/mmc/core.h> #include <linux/mmc/card.h> +#include <linux/mmc/host.h> #include <linux/mmc/sdio_func.h> #include <linux/mmc/sdio_ids.h> @@ -136,6 +137,8 @@ static int bcmsdh_sdmmc_probe(struct sdio_func *func, #endif sd_trace(("F2 found, calling bcmsdh_probe...\n")); ret = bcmsdh_probe(&func->dev); + if (mmc_power_save_host(func->card->host)) + sd_err(("%s: card power save fail", __func__)); } } else { ret = -ENODEV; |