login
Header Space

 
 

[PATCH] wireless, airo: waitbusy() won't delay

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <breed@...>
Cc: <linux-wireless@...>, lkml <linux-kernel@...>
Date: Tuesday, May 13, 2008 - 4:12 pm

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>
---
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 45f47c1..efb7444 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);



--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] wireless, airo: waitbusy() won't delay, Roel Kluin, (Tue May 13, 4:12 pm)
Re: [PATCH] wireless, airo: waitbusy() won't delay, Dan Williams, (Tue May 13, 5:43 pm)
speck-geostationary