From: Kalle Valo <kalle.valo@nokia.com>
To: "Benoit PAPILLAULT" <benoit.papillault@free.fr>
Cc: "linux-wireless\@vger.kernel.org"
<linux-wireless@vger.kernel.org>,
Luis Rodriguez <Luis.Rodriguez@Atheros.com>
Subject: Re: [PATCH] ath9k : Display MAC/BB and RF version at startup
Date: Tue, 04 Nov 2008 09:27:37 +0200 [thread overview]
Message-ID: <878ws0ar2u.fsf@nokia.com> (raw)
In-Reply-To: <490F63B6.8080600@free.fr> (ext Benoit PAPILLAULT's message of "Mon\, 03 Nov 2008 21\:48\:54 +0100")
"Benoit PAPILLAULT" <benoit.papillault@free.fr> writes:
> This patch decodes the MAC/BB version (for instance: AR5416) and the RF
> part version (for instance: AR5133). It has been tested on AR5416/AR5133
> which is a 2.4/5GHz 3x3 11n device. It also makes the differences
> between AR5416 (PCI) and AR5418 (PCI Express). Both are named AR5416 in
> the register definitions.
>
> Signed-off-by: Benoit Papillault <benoit.papillault@free.fr>
[...]
> - printk(KERN_INFO "%s: %s: mem=0x%lx, irq=%d\n",
> + ah = sc->sc_ah;
> + macVersion = ah->ah_macVersion;
> + rfVersion = (ah->ah_analog5GhzRev & AR_RADIO_SREV_MAJOR);
> + printk(KERN_INFO
> + "%s: Atheros AR%s%s%s%s%s%s MAC/BB Rev:%x "
> + "AR%s%s%s%s%s RF Rev:%x: mem=0x%lx, irq=%d\n",
> wiphy_name(hw->wiphy),
> - athname ? athname : "Atheros ???",
> + macVersion == AR_SREV_VERSION_5416_PCI ? "5416" : "",
> + macVersion == AR_SREV_VERSION_5416_PCIE ? "5418" : "",
> + macVersion == AR_SREV_VERSION_9100 ? "9100" : "",
> + macVersion == AR_SREV_VERSION_9160 ? "9160" : "",
> + macVersion == AR_SREV_VERSION_9280 ? "9280" : "",
> + macVersion == AR_SREV_VERSION_9285 ? "9285" : "",
> + ah->ah_macRev,
> + rfVersion == 0 ? "5133" : "",
> + rfVersion == AR_RAD5133_SREV_MAJOR ? "5133" : "",
> + rfVersion == AR_RAD5122_SREV_MAJOR ? "5122" : "",
> + rfVersion == AR_RAD2133_SREV_MAJOR ? "2133" : "",
> + rfVersion == AR_RAD2122_SREV_MAJOR ? "2122" : "",
> + ah->ah_phyRev,
I recommend adding a separate function returning the string instead of
this ugly "%s%s%s%s" trick. Much cleaner that way.
--
Kalle Valo
next prev parent reply other threads:[~2008-11-04 7:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-03 20:48 [PATCH] ath9k : Display MAC/BB and RF version at startup Benoit PAPILLAULT
2008-11-04 7:27 ` Kalle Valo [this message]
2008-11-05 3:02 ` Luis R. Rodriguez
2008-11-05 13:14 ` Benoit PAPILLAULT
2008-11-06 21:26 ` [ath9k-devel] [PATCH] ath9k : Display MAC/BB and RF version at startup (v2) Benoit PAPILLAULT
2008-11-06 21:26 ` Benoit PAPILLAULT
2008-11-06 21:47 ` [ath9k-devel] " Luis R. Rodriguez
2008-11-06 21:47 ` Luis R. Rodriguez
2008-11-06 21:49 ` Luis R. Rodriguez
2008-11-06 21:49 ` Luis R. Rodriguez
2008-11-07 0:28 ` [PATCH] ath9k : Display MAC/BB and RF version at startup Luis R. Rodriguez
2008-11-07 0:31 ` 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=878ws0ar2u.fsf@nokia.com \
--to=kalle.valo@nokia.com \
--cc=Luis.Rodriguez@Atheros.com \
--cc=benoit.papillault@free.fr \
--cc=linux-wireless@vger.kernel.org \
/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.