2008-11-03 20:48:57

by Benoit Papillault

[permalink] [raw]
Subject: [PATCH] ath9k : Display MAC/BB and RF version at startup

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 <[email protected]>

diff --git a/drivers/net/wireless/ath9k/hw.c
b/drivers/net/wireless/ath9k/hw.c
index ded9453..f2916a5 100644
--- a/drivers/net/wireless/ath9k/hw.c
+++ b/drivers/net/wireless/ath9k/hw.c
@@ -382,8 +382,9 @@ static const char *ath9k_hw_devname(u16 devid)
{
switch (devid) {
case AR5416_DEVID_PCI:
- case AR5416_DEVID_PCIE:
return "Atheros 5416";
+ case AR5416_DEVID_PCIE:
+ return "Atheros 5418";
case AR9160_DEVID_PCI:
return "Atheros 9160";
case AR9280_DEVID_PCI:
diff --git a/drivers/net/wireless/ath9k/main.c
b/drivers/net/wireless/ath9k/main.c
index c67dadc..7c53ea8 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -18,6 +18,7 @@

#include <linux/nl80211.h>
#include "core.h"
+#include "reg.h"

#define ATH_PCI_VERSION "0.1"

@@ -1524,10 +1525,11 @@ static int ath_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
void __iomem *mem;
struct ath_softc *sc;
struct ieee80211_hw *hw;
- const char *athname;
u8 csz;
u32 val;
int ret = 0;
+ struct ath_hal *ah;
+ u16 macVersion, rfVersion;

if (pci_enable_device(pdev))
return -EIO;
@@ -1614,11 +1616,26 @@ static int ath_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
goto bad4;
}

- athname = ath9k_hw_probe(id->vendor, id->device);
-
- 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,
(unsigned long)mem, pdev->irq);

return 0;


2008-11-06 21:49:32

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [ath9k-devel] [PATCH] ath9k : Display MAC/BB and RF version at startup (v2)

On Thu, Nov 06, 2008 at 01:47:40PM -0800, Luis Rodriguez wrote:
> On Thu, Nov 6, 2008 at 1:26 PM, Benoit PAPILLAULT
> <[email protected]> wrote:
> > 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 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 <[email protected]>
>
> thanks, I'm going to test it on our later hardware, but patch fails
> with git am (and therefore with patch itself):
>
> mcgrof@mosca ~/wireless-testing (git::11dv3)$ patch -p1 <
> /home/mcgrof/name-ath9k.patch
> patching file drivers/net/wireless/ath9k/hw.c
> patching file drivers/net/wireless/ath9k/main.c
> patch: **** malformed patch at line 105: pci_device_id *id)

After tinkering with it applies though, seems your > 80 columns get
wrapped.

From: Benoit PAPILLAULT <[email protected]>
PATCH] ath9k : Display MAC/BB and RF version at

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 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 <[email protected]>

diff --git a/drivers/net/wireless/ath9k/hw.c
b/drivers/net/wireless/ath9k/hw.c
index ded9453..f2916a5 100644
--- a/drivers/net/wireless/ath9k/hw.c
+++ b/drivers/net/wireless/ath9k/hw.c
@@ -382,8 +382,9 @@ static const char *ath9k_hw_devname(u16 devid)
{
switch (devid) {
case AR5416_DEVID_PCI:
- case AR5416_DEVID_PCIE:
return "Atheros 5416";
+ case AR5416_DEVID_PCIE:
+ return "Atheros 5418";
case AR9160_DEVID_PCI:
return "Atheros 9160";
case AR9280_DEVID_PCI:
diff --git a/drivers/net/wireless/ath9k/main.c
b/drivers/net/wireless/ath9k/main.c
index c67dadc..2913c13 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -18,6 +18,7 @@

#include <linux/nl80211.h>
#include "core.h"
+#include "reg.h"

#define ATH_PCI_VERSION "0.1"

@@ -1519,15 +1520,74 @@ static struct ieee80211_ops ath9k_ops = {
.set_frag_threshold = ath9k_no_fragmentation,
};

+static struct {
+ u32 version;
+ const char * name;
+} ath_mac_bb_names[] = {
+ { AR_SREV_VERSION_5416_PCI, "5416" },
+ { AR_SREV_VERSION_5416_PCIE, "5418" },
+ { AR_SREV_VERSION_9100, "9100" },
+ { AR_SREV_VERSION_9160, "9160" },
+ { AR_SREV_VERSION_9280, "9280" },
+ { AR_SREV_VERSION_9285, "9285" }
+};
+
+static struct {
+ u16 version;
+ const char * name;
+} ath_rf_names[] = {
+ { 0, "5133" },
+ { AR_RAD5133_SREV_MAJOR, "5133" },
+ { AR_RAD5122_SREV_MAJOR, "5122" },
+ { AR_RAD2133_SREV_MAJOR, "2133" },
+ { AR_RAD2122_SREV_MAJOR, "2122" }
+};
+
+/*
+ * Return the MAC/BB name. "????" is returned if the MAC/BB is unknown.
+ */
+
+static const char *
+ath_mac_bb_name(u32 mac_bb_version)
+{
+ int i;
+
+ for (i=0; i<ARRAY_SIZE(ath_mac_bb_names); i++) {
+ if (ath_mac_bb_names[i].version == mac_bb_version) {
+ return ath_mac_bb_names[i].name;
+ }
+ }
+
+ return "????";
+}
+
+/*
+ * Return the RF name. "????" is returned if the RF is unknown.
+ */
+
+static const char *
+ath_rf_name(u16 rf_version)
+{
+ int i;
+
+ for (i=0; i<ARRAY_SIZE(ath_rf_names); i++) {
+ if (ath_rf_names[i].version == rf_version) {
+ return ath_rf_names[i].name;
+ }
+ }
+
+ return "????";
+}
+
static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{
void __iomem *mem;
struct ath_softc *sc;
struct ieee80211_hw *hw;
- const char *athname;
u8 csz;
u32 val;
int ret = 0;
+ struct ath_hal *ah;

if (pci_enable_device(pdev))
return -EIO;
@@ -1614,11 +1674,15 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
goto bad4;
}

- athname = ath9k_hw_probe(id->vendor, id->device);
-
- printk(KERN_INFO "%s: %s: mem=0x%lx, irq=%d\n",
+ ah = sc->sc_ah;
+ printk(KERN_INFO
+ "%s: Atheros AR%s MAC/BB Rev:%x "
+ "AR%s RF Rev:%x: mem=0x%lx, irq=%d\n",
wiphy_name(hw->wiphy),
- athname ? athname : "Atheros ???",
+ ath_mac_bb_name(ah->ah_macVersion),
+ ah->ah_macRev,
+ ath_rf_name((ah->ah_analog5GhzRev & AR_RADIO_SREV_MAJOR)),
+ ah->ah_phyRev,
(unsigned long)mem, pdev->irq);

return 0;

2008-11-06 21:27:03

by Benoit Papillault

[permalink] [raw]
Subject: [PATCH] ath9k : Display MAC/BB and RF version at startup (v2)

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 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 <[email protected]>

diff --git a/drivers/net/wireless/ath9k/hw.c
b/drivers/net/wireless/ath9k/hw.c
index ded9453..f2916a5 100644
--- a/drivers/net/wireless/ath9k/hw.c
+++ b/drivers/net/wireless/ath9k/hw.c
@@ -382,8 +382,9 @@ static const char *ath9k_hw_devname(u16 devid)
{
switch (devid) {
case AR5416_DEVID_PCI:
- case AR5416_DEVID_PCIE:
return "Atheros 5416";
+ case AR5416_DEVID_PCIE:
+ return "Atheros 5418";
case AR9160_DEVID_PCI:
return "Atheros 9160";
case AR9280_DEVID_PCI:
diff --git a/drivers/net/wireless/ath9k/main.c
b/drivers/net/wireless/ath9k/main.c
index c67dadc..2913c13 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -18,6 +18,7 @@

#include <linux/nl80211.h>
#include "core.h"
+#include "reg.h"

#define ATH_PCI_VERSION "0.1"

@@ -1519,15 +1520,74 @@ static struct ieee80211_ops ath9k_ops = {
.set_frag_threshold = ath9k_no_fragmentation,
};

+static struct {
+ u32 version;
+ const char * name;
+} ath_mac_bb_names[] = {
+ { AR_SREV_VERSION_5416_PCI, "5416" },
+ { AR_SREV_VERSION_5416_PCIE, "5418" },
+ { AR_SREV_VERSION_9100, "9100" },
+ { AR_SREV_VERSION_9160, "9160" },
+ { AR_SREV_VERSION_9280, "9280" },
+ { AR_SREV_VERSION_9285, "9285" }
+};
+
+static struct {
+ u16 version;
+ const char * name;
+} ath_rf_names[] = {
+ { 0, "5133" },
+ { AR_RAD5133_SREV_MAJOR, "5133" },
+ { AR_RAD5122_SREV_MAJOR, "5122" },
+ { AR_RAD2133_SREV_MAJOR, "2133" },
+ { AR_RAD2122_SREV_MAJOR, "2122" }
+};
+
+/*
+ * Return the MAC/BB name. "????" is returned if the MAC/BB is unknown.
+ */
+
+static const char *
+ath_mac_bb_name(u32 mac_bb_version)
+{
+ int i;
+
+ for (i=0; i<ARRAY_SIZE(ath_mac_bb_names); i++) {
+ if (ath_mac_bb_names[i].version == mac_bb_version) {
+ return ath_mac_bb_names[i].name;
+ }
+ }
+
+ return "????";
+}
+
+/*
+ * Return the RF name. "????" is returned if the RF is unknown.
+ */
+
+static const char *
+ath_rf_name(u16 rf_version)
+{
+ int i;
+
+ for (i=0; i<ARRAY_SIZE(ath_rf_names); i++) {
+ if (ath_rf_names[i].version == rf_version) {
+ return ath_rf_names[i].name;
+ }
+ }
+
+ return "????";
+}
+
static int ath_pci_probe(struct pci_dev *pdev, const struct
pci_device_id *id)
{
void __iomem *mem;
struct ath_softc *sc;
struct ieee80211_hw *hw;
- const char *athname;
u8 csz;
u32 val;
int ret = 0;
+ struct ath_hal *ah;

if (pci_enable_device(pdev))
return -EIO;
@@ -1614,11 +1674,15 @@ static int ath_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
goto bad4;
}

- athname = ath9k_hw_probe(id->vendor, id->device);
-
- printk(KERN_INFO "%s: %s: mem=0x%lx, irq=%d\n",
+ ah = sc->sc_ah;
+ printk(KERN_INFO
+ "%s: Atheros AR%s MAC/BB Rev:%x "
+ "AR%s RF Rev:%x: mem=0x%lx, irq=%d\n",
wiphy_name(hw->wiphy),
- athname ? athname : "Atheros ???",
+ ath_mac_bb_name(ah->ah_macVersion),
+ ah->ah_macRev,
+ ath_rf_name((ah->ah_analog5GhzRev & AR_RADIO_SREV_MAJOR)),
+ ah->ah_phyRev,
(unsigned long)mem, pdev->irq);

return 0;

2008-11-05 03:02:25

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [PATCH] ath9k : Display MAC/BB and RF version at startup

On Mon, Nov 03, 2008 at 11:27:37PM -0800, Kalle Valo wrote:
> "Benoit PAPILLAULT" <[email protected]> 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 <[email protected]>
>
> [...]
>
> > - 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.

Agreed, also please remove 3x3 comment as we don't have support for
those yet nor do I even have hardware for it. To be clear ath9k supports
2x2 right now. :)

Luis

2008-11-05 13:14:39

by Benoit Papillault

[permalink] [raw]
Subject: Re: [PATCH] ath9k : Display MAC/BB and RF version at startup

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Luis R. Rodriguez a =E9crit :
>> I recommend adding a separate function returning the string instead =
of
>> this ugly "%s%s%s%s" trick. Much cleaner that way.

I'm going to send an updated patch.

>=20
> Agreed, also please remove 3x3 comment as we don't have support for
> those yet nor do I even have hardware for it. To be clear ath9k suppo=
rts
> 2x2 right now. :)

Hummm... This is what the Atheros web site says and I have 3 antennas
(very nice connector from UBNT btw). Of course, i don't know if it is
supported by the driver, but at least, I think, it's supported by the
hardware.

Reference : http://www.atheros.com/pt/AR9001AP-3NX2.htm

Regards,
Benoit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJEZw9OR6EySwP7oIRApusAKDnN+sBIl4hAR2YoAxMaTDkSvvn1QCgompH
a6SODwjspKIGFe8JLT7TnHY=3D
=3DuiLr
-----END PGP SIGNATURE-----

2008-11-07 00:28:14

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [PATCH] ath9k : Display MAC/BB and RF version at startup

T24gV2VkLCBOb3YgNSwgMjAwOCBhdCA1OjE0IEFNLCBCZW5vaXQgUEFQSUxMQVVMVAo8YmVub2l0
LnBhcGlsbGF1bHRAZnJlZS5mcj4gd3JvdGU6Cj4gLS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NB
R0UtLS0tLQo+IEhhc2g6IFNIQTEKPgo+IEx1aXMgUi4gUm9kcmlndWV6IGEgw6ljcml0IDoKPj4+
IEkgcmVjb21tZW5kIGFkZGluZyBhIHNlcGFyYXRlIGZ1bmN0aW9uIHJldHVybmluZyB0aGUgc3Ry
aW5nIGluc3RlYWQgb2YKPj4+IHRoaXMgdWdseSAiJXMlcyVzJXMiIHRyaWNrLiBNdWNoIGNsZWFu
ZXIgdGhhdCB3YXkuCj4KPiBJJ20gZ29pbmcgdG8gc2VuZCBhbiB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CwgYXBvbG9naWVzIGZvciB0aGUgbWlzY29tbXVuaWNhdGlvbiB0aGVyZS4K
CiAgTHVpcwo=

2008-11-04 07:28:01

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] ath9k : Display MAC/BB and RF version at startup

"Benoit PAPILLAULT" <[email protected]> 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 <[email protected]>

[...]

> - 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

2008-11-07 00:31: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nR3KS4gT2YgY291cnNlLCBpIGRv
bid0IGtub3cgaWYgaXQgaXMKPj4gc3VwcG9ydGVkIGJ5IHRoZSBkcml2ZXIsIGJ1dCBhdCBsZWFz
dCwgSSB0aGluaywgaXQncyBzdXBwb3J0ZWQgYnkgdGhlCj4+IGhhcmR3YXJlLgo+Pgo+PiBSZWZl
cmVuY2UgOiBodHRwOi8vd3d3LmF0aGVyb3MuY29tL3B0L0FSOTAwMUFQLTNOWDIuaHRtCj4KPiBU
aGFua3MgZm9yIHRoaXMsIEkgcmV2aWV3ZWQgdGhpcyBub3cgYW5kIHlvdSBhcmUgY29ycmVjdCwg
SSB3YXMKPiBjb21wbGV0ZWx5IG1pc3Rha2luZyB0aGUgbnVtYmVyIG9mIHN0cmVhbXMgd2l0aCB0
aGUgbnVtYmVyIG9mIGNoYWlucy4KPiAzeDMgbWVhbnMgbnVtYmVyIG9mIFRYL1JYIGNoYWlucywg
dGhlc2UgZGV2aWNlcyBob3dldmVyIHN0aWxsIG9ubHkKPiBzdXBwb3J0IDIgc3RyZWFtcyB3aGlj
aCBtZWFuIG1heCB0aGVvcmV0aWNhbCB0aHJvdWdocHV0IGlzIHN0aWxsIDMwMAo+IE1icHMuIFNv
IDN4MyB3YXMgY29ycmVjdCwgYXBvbG9naWVzIGZvciB0aGUgbWlzY29tbXVuaWNhdGlvbiB0aGVy
ZS4KCk9uIEhUNDAgOikgYWxzbyBJIHVwZGF0ZWQgdGhlIGRvYyBoZXJlOgoKaHR0cDovL3dpcmVs
ZXNzLmtlcm5lbC5vcmcvZW4vZGV2ZWxvcGVycy9Eb2N1bWVudGF0aW9uL2llZWU4MDIxMS84MDIu
MTFuCgogIEx1aXMK

2008-11-06 21:47:41

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [ath9k-devel] [PATCH] ath9k : Display MAC/BB and RF version at startup (v2)

On Thu, Nov 6, 2008 at 1:26 PM, Benoit PAPILLAULT
<[email protected]> wrote:
> 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 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 <[email protected]>

thanks, I'm going to test it on our later hardware, but patch fails
with git am (and therefore with patch itself):

mcgrof@mosca ~/wireless-testing (git::11dv3)$ patch -p1 <
/home/mcgrof/name-ath9k.patch
patching file drivers/net/wireless/ath9k/hw.c
patching file drivers/net/wireless/ath9k/main.c
patch: **** malformed patch at line 105: pci_device_id *id)

Luis