linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gabor Juhos <juhosg@openwrt.org>
To: Sujith <m.sujith@gmail.com>
Cc: "ath9k-devel@lists.ath9k.org" <ath9k-devel@lists.ath9k.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"John W. Linville" <linville@tuxdriver.com>
Subject: Re: [ath9k-devel] [RFC] ath9k: use correct init values for ar9100 devices
Date: Wed, 04 Mar 2009 15:57:30 +0100	[thread overview]
Message-ID: <49AE96DA.9010208@openwrt.org> (raw)
In-Reply-To: <18862.36931.112561.497768@gargle.gargle.HOWL>

Sujith =EDrta:
> Gabor Juhos wrote:
>>>> +#define AR_SREV_5416(_ah) \
>>>> +       (((_ah)->hw_version.macVersion =3D=3D AR_SREV_VERSION_5416=
_PCIE) || \
>>>> +       ((_ah)->hw_version.macVersion =3D=3D AR_SREV_VERSION_5416_=
PCI))
>>>> +#define AR_SREV_5416_V20_OR_LATER(_ah) \
>>>> +       (((_ah)->hw_version.macVersion > AR_SREV_VERSION_5416_PCIE=
) || \
>>>> +       ((AR_SREV_5416(_ah)) && \
>>>> +       ((_ah)->hw_version.macRev >=3D AR_SREV_REVISION_5416_20)))
>>>> +#define AR_SREV_5416_V22_OR_LATER(_ah) \
>>>> +       (((_ah)->hw_version.macVersion > AR_SREV_VERSION_5416_PCIE=
) || \
>>>> +       ((AR_SREV_5416(_ah)) && \
>>>> +       ((_ah)->hw_version.macRev >=3D AR_SREV_REVISION_5416_22)))
>>>> +
>>> Hm, the 5416_V1, 5416_V2 macros have to check 3 different HW (5416,=
 9100, 9160).
>> I don't see any 5416_V1 macro here. The AR_SREV_5416 should check th=
e silicon
>> revision of the AR5416 cards only. But if we would be consistent, we=
 should have
>> a _V10_OR_LATER although i don't see where it would be useful. The _=
V20_OR_LATER
>> and the _V22_OR_LATER macro I proposed above will cover the 9100 and=
 9160 chips.
>>
>=20
> I meant the AR_SREV_5416_V20_OR_LATER and AR_SREV_5416_V22_OR_LATER m=
acros.
> Yes, the naming implies that they are meant for AR5416 chipsets only,=
 but they
> do handle AR9100 and AR9160 chipsets.
>=20
> The proposed macros don't have the AR9100 and AR9160 macVersion check=
s, no ?

You are right, they don't have such version checks explicitly, but

AR_SREV_VERSION_9100 > AR_SREV_VERSION_5416_PCIE and
AR_SREV_VERSION_9160 > AR_SREV_VERSION_5416_PCIE

Maybe this looks cleaner:

#define AR_SREV_5416_V20_OR_LATER(_ah) \
	(((_ah)->hw_version.macVersion >=3D AR_SREV_VERSION_9100) || \
	 ((AR_SREV_5416(_ah)) && \
	 ((_ah)->hw_version.macRev >=3D AR_SREV_REVISION_5416_20)))

#define AR_SREV_5416_V22_OR_LATER(_ah) \
	(((_ah)->hw_version.macVersion >=3D AR_SREV_VERSION_9100) || \
	 ((AR_SREV_5416(_ah)) && \
	 ((_ah)->hw_version.macRev >=3D AR_SREV_REVISION_5416_22)))

or in this form:

#define AR_SREV_5416_V20_OR_LATER(_ah) \
	(((AR_SREV_5416(_ah)) && \
	 ((_ah)->hw_version.macRev >=3D AR_SREV_REVISION_5416_20)) || \
	 ((_ah)->hw_version.macVersion >=3D AR_SREV_VERSION_9100))

#define AR_SREV_5416_V22_OR_LATER(_ah) \
	(((AR_SREV_5416(_ah)) && \
	 ((_ah)->hw_version.macRev >=3D AR_SREV_REVISION_5416_22)) || \
	 ((_ah)->hw_version.macVersion >=3D AR_SREV_VERSION_9100))


Regards,
Gabor

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

  reply	other threads:[~2009-03-04 14:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-03 18:10 [RFC] ath9k: use correct init values for ar9100 devices Gabor Juhos
2009-03-04  4:30 ` Sujith
2009-03-04  5:35   ` Sujith
     [not found]     ` <49AE8466.3040906@openwrt.org>
2009-03-04 14:21       ` [ath9k-devel] " Sujith
2009-03-04 16:20         ` Gabor Juhos
2009-03-05  1:49           ` Sujith
2009-03-05 10:43             ` Gabor Juhos
2009-03-05 15:00               ` Sujith
2009-03-04 13:41   ` Gabor Juhos
2009-03-04 14:29     ` [ath9k-devel] " Sujith
2009-03-04 14:57       ` Gabor Juhos [this message]
2009-03-05  1:51         ` Sujith
2009-03-05  2:15           ` Luis R. Rodriguez

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=49AE96DA.9010208@openwrt.org \
    --to=juhosg@openwrt.org \
    --cc=ath9k-devel@lists.ath9k.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=m.sujith@gmail.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;
as well as URLs for NNTP newsgroup(s).