diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2009-12-11 08:41:02 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-28 16:31:34 -0500 |
commit | 01ac17ecb6292ceab9bfc498145491b78552b239 (patch) | |
tree | 5ef76d5b4b0d50797af7fb98383f84c2da7c6641 /drivers | |
parent | 9ccd921792e5b6719ff9e561438e095cba757727 (diff) |
wl1271: Add pre-power-on sleep
This patch adds a short delay before powering on the wl1271. Normally, it is
not needed, but if the wl1271 has been powered off shortly before, for reliable
firmware-booting this small stabilization delay is required.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_main.c | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h index 81e1c9531a3a..c965c4a718f3 100644 --- a/drivers/net/wireless/wl12xx/wl1271.h +++ b/drivers/net/wireless/wl12xx/wl1271.h | |||
@@ -458,7 +458,9 @@ int wl1271_plt_stop(struct wl1271 *wl); | |||
458 | 458 | ||
459 | #define WL1271_TX_QUEUE_MAX_LENGTH 20 | 459 | #define WL1271_TX_QUEUE_MAX_LENGTH 20 |
460 | 460 | ||
461 | /* WL1271 needs a 200ms sleep after power on */ | 461 | /* WL1271 needs a 200ms sleep after power on, and a 20ms sleep before power |
462 | on in case is has been shut down shortly before */ | ||
463 | #define WL1271_PRE_POWER_ON_SLEEP 20 /* in miliseconds */ | ||
462 | #define WL1271_POWER_ON_SLEEP 200 /* in miliseconds */ | 464 | #define WL1271_POWER_ON_SLEEP 200 /* in miliseconds */ |
463 | 465 | ||
464 | static inline bool wl1271_11a_enabled(void) | 466 | static inline bool wl1271_11a_enabled(void) |
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c index 0795bf3c60da..0520b38e8e72 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c | |||
@@ -618,6 +618,7 @@ static int wl1271_chip_wakeup(struct wl1271 *wl) | |||
618 | struct wl1271_partition_set partition; | 618 | struct wl1271_partition_set partition; |
619 | int ret = 0; | 619 | int ret = 0; |
620 | 620 | ||
621 | msleep(WL1271_PRE_POWER_ON_SLEEP); | ||
621 | wl1271_power_on(wl); | 622 | wl1271_power_on(wl); |
622 | msleep(WL1271_POWER_ON_SLEEP); | 623 | msleep(WL1271_POWER_ON_SLEEP); |
623 | wl1271_spi_reset(wl); | 624 | wl1271_spi_reset(wl); |