summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwl8k.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2009-10-22 20:20:16 +0200
committerJohn W. Linville <linville@tuxdriver.com>2009-11-04 18:44:45 -0500
commit3d76e82c9538d8104e578ca460d35f214bfddfd3 (patch)
tree0c12376c51edd564d8e6dec453e8678750b76aa8 /drivers/net/wireless/mwl8k.c
parent32060e1b64f23fe315a35d2df8c2c7ad010df73e (diff)
downloadblackbird-op-linux-3d76e82c9538d8104e578ca460d35f214bfddfd3.tar.gz
blackbird-op-linux-3d76e82c9538d8104e578ca460d35f214bfddfd3.zip
mwl8k: use cond_resched() when loading firmware blocks
Since each firmware block takes on the order of several hundred usec to upload to the hardware, using msleep in the inner loop would make the firmware loading process take a lot more time than just doing busy-waiting like we do now. But if we keep the busy-waiting, we can at least add a cond_resched() to the inner loop so that we give other tasks a chance to run while the firmware is being loaded. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r--drivers/net/wireless/mwl8k.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index fcf7139c77c8..496d3c5097d5 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -12,6 +12,7 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
+#include <linux/sched.h>
#include <linux/spinlock.h>
#include <linux/list.h>
#include <linux/pci.h>
@@ -428,6 +429,7 @@ mwl8k_send_fw_load_cmd(struct mwl8k_priv *priv, void *data, int length)
break;
}
+ cond_resched();
udelay(1);
} while (--loops);
OpenPOWER on IntegriCloud