All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: "Björn Smedman" <bjorn.smedman@venatech.se>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	"Luis R. Rodriguez" <lrodriguez@atheros.com>
Subject: Re: [RFC] ath9k: Make AR_SREV_5416() macro evaluate to true for AR9100
Date: Sat, 27 Feb 2010 18:47:22 +0100	[thread overview]
Message-ID: <4B895AAA.6070700@openwrt.org> (raw)
In-Reply-To: <133e8d7e1002270926p64cfd2b5uc4017bf0187c53c2@mail.gmail.com>

On 2010-02-27 6:26 PM, Björn Smedman wrote:
> The AR_SREV_5416() macro evaluates to false for AR9100 while the
> definitions for AR_SREV_5416_20_OR_LATER() and
> AR_SREV_5416_22_OR_LATER() seem to assume AR9100 based chips fall
> under this category. For example the last line of
> 
> #define AR_SREV_5416_20_OR_LATER(_ah) \
>         (((AR_SREV_5416(_ah)) && \
>          ((_ah)->hw_version.macRev >= AR_SREV_REVISION_5416_20)) || \
>          ((_ah)->hw_version.macVersion >= AR_SREV_VERSION_9100))
> 
> makes no sense if AR_SREV_5416(_ah) is false when
> (_ah)->hw_version.macVersion == AR_SREV_VERSION_9100.
I think this is wrong. The AR_SREV_xxxx macros typically point to a
specific chip generation, whereas the AR_SREV_XXXX_OR_LATER() point to
the chip generation or any later.
AR9100 is related to AR9160, but not AR5416, so AR_SREV_5416() should
return false for 9100 based devices.
If you look at the AR_SREV_5416_20_OR_LATER macros, they do not assume
that AR_SREV_5416() evaluates to true for the
((_ah)->hw_version.macVersion >= AR_SREV_VERSION_9100) case, as it's
either (is 5416 && macRev >= 20) or macVersion > 9100

- Felix

  reply	other threads:[~2010-02-27 17:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-27 17:26 [RFC] ath9k: Make AR_SREV_5416() macro evaluate to true for AR9100 Björn Smedman
2010-02-27 17:47 ` Felix Fietkau [this message]
2010-02-27 18:54   ` Björn Smedman
2010-02-27 19:09     ` Felix Fietkau

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=4B895AAA.6070700@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=bjorn.smedman@venatech.se \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lrodriguez@atheros.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.