lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080110122859.569b3774.randy.dunlap@oracle.com>
Date:	Thu, 10 Jan 2008 12:28:59 -0800
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	Roel Kluin <12o3l@...cali.nl>
Cc:	linville@...driver.com, lkml <linux-kernel@...r.kernel.org>,
	linux-wireless@...r.kernel.org
Subject: Re: [PATCH wireless/arlan] Replace logical- by bit-and

On Thu, 10 Jan 2008 20:15:53 +0100 Roel Kluin wrote:

> Totally untested patch below from linus' git tree. The && is incorrect, right?
> 
> from drivers/net/wireless/arlan.h:390:
> #define ARLAN_POWER             0x40
> #define ARLAN_ACCESS            0x80
> 
> Replace logical and by bit-and
> 
> Signed-off-by: Roel Kluin <12o3l@...cali.nl>
> ---
> diff --git a/drivers/net/wireless/arlan.h b/drivers/net/wireless/arlan.h
> index 3ed1df7..7b7498f 100644
> --- a/drivers/net/wireless/arlan.h
> +++ b/drivers/net/wireless/arlan.h
> @@ -485,7 +485,7 @@ struct arlan_private {
>  #define clearClearInterrupt(dev){\
>     writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_CLEAR_INTERRUPT);}
>  #define setPowerOff(dev){\
> -   writeControlRegister(dev,readControlRegister(dev) | (ARLAN_POWER && ARLAN_ACCESS));\
> +   writeControlRegister(dev, readControlRegister(dev) | (ARLAN_POWER & ARLAN_ACCESS));\

eh?  How does that help?

0x80 && 0x40 -> 0
0x80 & 0x40  -> 0

so readControlRegister() | (0)
??

Maybe it should be (ARLAN_POWER | ARLAN_ACCESS), but some
arlan developer or someone with specs should help here...


>     writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_ACCESS);}
>  #define setPowerOn(dev){\
>     writeControlRegister(dev,readControlRegister(dev) & ~(ARLAN_POWER));   }

or am I sleeping()?
---
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ