aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorSaravanan Dhanabal <ext-saravanan.dhanabal@nokia.com>2010-03-26 06:53:33 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-03-31 14:39:16 -0400
commitbc0f03ea579d78f845a44a0c611806da64057b03 (patch)
tree5baea9ca27c4e2558487e9d594ab00cf7db96dd6 /drivers/net/wireless
parentc18995540cc4d2c84d130581b8b6720b22ca16b5 (diff)
wl1271: Fix msleep() delay while waiting for completion
After last transmission, the device goes to sleep earlier than the configured dynamic power save timeout. If timeout is set to 400ms, device enters into sleep mode at around 330ms since from last TX. This patch removes the msleep(1), which causes the delay after ELP wakeup. Replaced with udelay(10), the variation is around 7-10ms. Signed-off-by: Saravanan Dhanabal <ext-saravanan.dhanabal@nokia.com> Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_cmd.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c
index 0cb4cbb00395..f11f9f47ffd5 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.c
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c
@@ -36,6 +36,8 @@
36#include "wl1271_cmd.h" 36#include "wl1271_cmd.h"
37#include "wl1271_event.h" 37#include "wl1271_event.h"
38 38
39#define WL1271_CMD_POLL_COUNT 5
40
39/* 41/*
40 * send command to firmware 42 * send command to firmware
41 * 43 *
@@ -52,6 +54,7 @@ int wl1271_cmd_send(struct wl1271 *wl, u16 id, void *buf, size_t len,
52 u32 intr; 54 u32 intr;
53 int ret = 0; 55 int ret = 0;
54 u16 status; 56 u16 status;
57 u16 poll_count = 0;
55 58
56 cmd = buf; 59 cmd = buf;
57 cmd->id = cpu_to_le16(id); 60 cmd->id = cpu_to_le16(id);
@@ -73,7 +76,11 @@ int wl1271_cmd_send(struct wl1271 *wl, u16 id, void *buf, size_t len,
73 goto out; 76 goto out;
74 } 77 }
75 78
76 msleep(1); 79 udelay(10);
80 poll_count++;
81 if (poll_count == WL1271_CMD_POLL_COUNT)
82 wl1271_info("cmd polling took over %d cycles",
83 poll_count);
77 84
78 intr = wl1271_read32(wl, ACX_REG_INTERRUPT_NO_CLEAR); 85 intr = wl1271_read32(wl, ACX_REG_INTERRUPT_NO_CLEAR);
79 } 86 }