]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
wireless, airo: waitbusy() won't delay
authorRoel Kluin <roel.kluin@gmail.com>
Tue, 13 May 2008 20:12:27 +0000 (22:12 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 16 May 2008 21:15:10 +0000 (17:15 -0400)
There will be no delay even when COMMAND_BUSY (defined 0x8000) is set:
0x8000 & (delay < 10000) will evaluate to 0 - when delay is 0.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/airo.c

index 45f47c1c0a353ec148a7ac60828954df9b042e90..efb7444a26ae6c42c03fb59ddabdc7bc2f410d9c 100644 (file)
@@ -2904,7 +2904,7 @@ EXPORT_SYMBOL(init_airo_card);
 
 static int waitbusy (struct airo_info *ai) {
        int delay = 0;
-       while ((IN4500 (ai, COMMAND) & COMMAND_BUSY) & (delay < 10000)) {
+       while ((IN4500 (ai, COMMAND) & COMMAND_BUSY) && (delay < 10000)) {
                udelay (10);
                if ((++delay % 20) == 0)
                        OUT4500(ai, EVACK, EV_CLEARCOMMANDBUSY);