linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wireless, airo: waitbusy() won't delay
@ 2008-05-13 20:12 Roel Kluin
  2008-05-13 21:43 ` Dan Williams
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2008-05-13 20:12 UTC (permalink / raw)
  To: breed; +Cc: linux-wireless, lkml

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);




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] wireless, airo: waitbusy() won't delay
  2008-05-13 20:12 [PATCH] wireless, airo: waitbusy() won't delay Roel Kluin
@ 2008-05-13 21:43 ` Dan Williams
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Williams @ 2008-05-13 21:43 UTC (permalink / raw)
  To: Roel Kluin; +Cc: breed, linux-wireless, lkml

On Tue, 2008-05-13 at 22:12 +0200, Roel Kluin wrote:
> 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>

Good catch.

Acked-by: Dan Williams <dcbw@redhat.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);
> 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-13 21:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-13 20:12 [PATCH] wireless, airo: waitbusy() won't delay Roel Kluin
2008-05-13 21:43 ` Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).