提交 bc0f03ea 编写于 作者: S Saravanan Dhanabal 提交者: John W. Linville

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: NSaravanan Dhanabal <ext-saravanan.dhanabal@nokia.com>
Reviewed-by: NJuuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: NLuciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 c1899554
......@@ -36,6 +36,8 @@
#include "wl1271_cmd.h"
#include "wl1271_event.h"
#define WL1271_CMD_POLL_COUNT 5
/*
* send command to firmware
*
......@@ -52,6 +54,7 @@ int wl1271_cmd_send(struct wl1271 *wl, u16 id, void *buf, size_t len,
u32 intr;
int ret = 0;
u16 status;
u16 poll_count = 0;
cmd = buf;
cmd->id = cpu_to_le16(id);
......@@ -73,7 +76,11 @@ int wl1271_cmd_send(struct wl1271 *wl, u16 id, void *buf, size_t len,
goto out;
}
msleep(1);
udelay(10);
poll_count++;
if (poll_count == WL1271_CMD_POLL_COUNT)
wl1271_info("cmd polling took over %d cycles",
poll_count);
intr = wl1271_read32(wl, ACX_REG_INTERRUPT_NO_CLEAR);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册