mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: Roel Kluin <12o3l@tiscali.nl>
Cc: linville@tuxdriver.com, lkml <linux-kernel@vger.kernel.org>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH wireless/arlan] Replace logical- by bit-and
Date: Thu, 10 Jan 2008 12:28:59 -0800	[thread overview]
Message-ID: <20080110122859.569b3774.randy.dunlap@oracle.com> (raw)
In-Reply-To: <47866EE9.80003@tiscali.nl>

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@tiscali.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

  reply	other threads:[~2008-01-10 20:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4722453E.2090801@tiscali.nl>
     [not found] ` <472248AC.7080201@tiscali.nl>
2008-01-10 19:15   ` Roel Kluin
2008-01-10 20:28     ` Randy Dunlap [this message]
2008-01-10 20:48       ` Chuck Ebbert
2008-01-10 21:16         ` Randy Dunlap
2008-01-10 21:28           ` John W. Linville
2008-01-10 22:19       ` Roel Kluin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080110122859.569b3774.randy.dunlap@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=12o3l@tiscali.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome