wireless, airo: waitbusy() won't delay
PATCH 1/1 wireless, airo: waitbusy() won't delay
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 <[email protected]>
---
drivers/net/wireless/airo.c +1 -1
@@ -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 );
Quoted 4 lines · Roel Kluin
There will be no delay even when
COMMAND_BUSY(defined0x8000) is set:0x8000& (delay < 10000) will evaluate to 0 - when delay is 0.Signed-off-by Roel Kluin <[email protected]>
Good catch.
Acked-by Dan Williams <[email protected]>
Quoted 21 lines
---
drivers/net/wireless/airo.c +1
-2@@ -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 ); --To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html