aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEyal Shapira <eyal@wizery.com>2011-11-08 08:56:55 -0500
committerLuciano Coelho <coelho@ti.com>2011-11-08 09:00:35 -0500
commitb693289406f0b8ca70ab77e745be6196d5740eb0 (patch)
treeb082f846a5af6dc6507c56b116f269858050bfd1
parentc31e494689128203ef04fb946f05a72d33eee948 (diff)
wl12xx: fix SDIO suspend/resume
wl1271_suspend/resume() accessed the wrong struct and not wl1271 which caused it to think that wow was enabled when it wasn't. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
-rw-r--r--drivers/net/wireless/wl12xx/sdio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/sdio.c b/drivers/net/wireless/wl12xx/sdio.c
index ed97f9cee3f0..468a50553fac 100644
--- a/drivers/net/wireless/wl12xx/sdio.c
+++ b/drivers/net/wireless/wl12xx/sdio.c
@@ -289,7 +289,8 @@ static int wl1271_suspend(struct device *dev)
289 /* Tell MMC/SDIO core it's OK to power down the card 289 /* Tell MMC/SDIO core it's OK to power down the card
290 * (if it isn't already), but not to remove it completely */ 290 * (if it isn't already), but not to remove it completely */
291 struct sdio_func *func = dev_to_sdio_func(dev); 291 struct sdio_func *func = dev_to_sdio_func(dev);
292 struct wl1271 *wl = sdio_get_drvdata(func); 292 struct wl12xx_sdio_glue *glue = sdio_get_drvdata(func);
293 struct wl1271 *wl = platform_get_drvdata(glue->core);
293 mmc_pm_flag_t sdio_flags; 294 mmc_pm_flag_t sdio_flags;
294 int ret = 0; 295 int ret = 0;
295 296
@@ -324,7 +325,8 @@ out:
324static int wl1271_resume(struct device *dev) 325static int wl1271_resume(struct device *dev)
325{ 326{
326 struct sdio_func *func = dev_to_sdio_func(dev); 327 struct sdio_func *func = dev_to_sdio_func(dev);
327 struct wl1271 *wl = sdio_get_drvdata(func); 328 struct wl12xx_sdio_glue *glue = sdio_get_drvdata(func);
329 struct wl1271 *wl = platform_get_drvdata(glue->core);
328 330
329 dev_dbg(dev, "wl1271 resume\n"); 331 dev_dbg(dev, "wl1271 resume\n");
330 if (wl->wow_enabled) { 332 if (wl->wow_enabled) {