wlcore: change the wait for event mechanism
authorYoni Divinsky <yoni.divinsky@ti.com>
Wed, 27 Jun 2012 18:35:47 +0000 (21:35 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 10 Jul 2012 16:10:14 +0000 (12:10 -0400)
commitc45ee4ff1f66b2a02f51b8a2c1c3dcfd7faefab0
tree87b18f4d2ddccfac15211ffff354f413c1f815bf
parentc24ec83bcac50160c344b3eb0e4c601b6cb4f7e5
wlcore: change the wait for event mechanism

wlcore needs to wait for certain events for example
for roc complete event. Usually the events are received
from the FW very fast, therefore wlcore can poll with
a short delay and if after a second the event was
not received yet poll with a long (1-5 msec) delay.

This implementation is similar to the sending of
commands to the FW.

Empirically the change reduced the wait for roc event
from ~10-40msec to 100s of usecs.

[replace udelay/msleep with usleep_range - Arik]

Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
drivers/net/wireless/ti/wlcore/cmd.c