From: Roel Kluin Date: Tue, 13 May 2008 20:12:27 +0000 (+0200) Subject: wireless, airo: waitbusy() won't delay X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b7acbdfbd1f277c1eb23f344f899cfa4cd0bf36a;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 45f47c1c0a35..efb7444a26ae 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c @@ -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);