Search Linux Wireless

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>

Good catch.

Acked-by: Dan Williams <dcbw@xxxxxxxxxx>

> ---
> 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@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux