Skip to contentSkip to conversation

ath5k: Add SREV values for newer chips

PATCH In review Nick Kossifidis 4 participants 8 messages Oct 27, 2007 – Nov 1, 2007 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 4/7 ath5k: Add SREV values for newer chips

* Add new Silicon Revision values (hex values written on chip) to be able to identify them.

* Give more infos about mac/phy/radio revision during attach.

Changes-licensed-under: 3-clause-BSD

---

drivers/net/wireless/ath5k/ath5k.h +22 -2
index 795d7dd..fa9f3ae 100644
@@ -126,6 +126,18 @@ enum ath5k_radio {
 /*
  * Common silicon revision/version values
  */
+
+enum ath5k_srev_type {
+	AR5K_VERSION_VER,
+	AR5K_VERSION_RAD,
+};
+
+struct ath5k_srev_name {
+	const char		*sr_name;
+	enum ath5k_srev_type	sr_type;
+	u_int			sr_val;
+};
+
 #define AR5K_SREV_UNKNOWN	0xffff
 
 #define AR5K_SREV_VER_AR5210	0x00
@@ -135,7 +147,13 @@ enum ath5k_radio {
 #define AR5K_SREV_VER_AR5211	0x40
 #define AR5K_SREV_VER_AR5212	0x50
 #define AR5K_SREV_VER_AR5213	0x55
-#define AR5K_SREV_VER_UNSUPP	0x60
+#define AR5K_SREV_VER_AR5213A	0x59
+#define AR5K_SREV_VER_AR2424	0xa0
+#define AR5K_SREV_VER_AR5424	0xa3
+#define AR5K_SREV_VER_AR5413	0xa4
+#define AR5K_SREV_VER_AR5414	0xa5
+#define AR5K_SREV_VER_AR5416	0xc0	/* ? */
+#define AR5K_SREV_VER_AR5418	0xca
 
 #define AR5K_SREV_RAD_5110	0x00
 #define AR5K_SREV_RAD_5111	0x10
@@ -145,7 +163,9 @@ enum ath5k_radio {
 #define AR5K_SREV_RAD_5112A	0x35
 #define AR5K_SREV_RAD_2112	0x40
 #define AR5K_SREV_RAD_2112A	0x45
-#define AR5K_SREV_RAD_UNSUPP	0x50
+#define AR5K_SREV_RAD_SC1	0x63	/* Found on 5413/5414 */
+#define AR5K_SREV_RAD_SC2	0xa2	/* Found on 2424/5424 */
+#define AR5K_SREV_RAD_5133	0xc0	/* MIMO found on 5418 */
 
 /* IEEE defs */
 
drivers/net/wireless/ath5k/base.c +60 -13

93 lines not on this page · raw message

#1 lore raw

forgot to mention

for ath5k.h
Changes-licensed-under: ISC

Signature · 3 lines
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick
#2 lore raw
In reply to Nick Kossifidis
Quoted 22 lines · Nick Kossifidis

* Give more infos about mac/phy/radio revision during attach.

drivers/net/wireless/ath5k/base.c +11 -4
@@ -535,10 +568,24 @@ ath5k_pci_probe(struct pci_dev *pdev,
        if (ret)
                goto err_ah;
 
-       dev_info(&pdev->dev, "%s chip found: mac %d.%d phy %d.%d\n",
-                       ath5k_chip_name(id->driver_data), sc->ah->ah_mac_version,
-                       sc->ah->ah_mac_revision, sc->ah->ah_phy_revision >> 4,
-                       sc->ah->ah_phy_revision & 0xf);
+       dev_info(&pdev->dev, "Atheros AR%s chip found: MAC 0x%x, PHY: 0x%x\n",
+                       ath5k_chip_name(AR5K_VERSION_VER,sc->ah->ah_mac_srev),
+                                       sc->ah->ah_mac_srev,
+                                       sc->ah->ah_phy_revision);
+
+       if(sc->ah->ah_radio_5ghz_revision && !sc->ah->ah_radio_2ghz_revision){
+               dev_info(&pdev->dev, "RF%s radio found (0x%x)\n",
+                       ath5k_chip_name(AR5K_VERSION_RAD,sc->ah->ah_radio_5ghz_revision),
+                                       sc->ah->ah_radio_5ghz_revision);
+       } else if(sc->ah->ah_radio_5ghz_revision && sc->ah->ah_radio_2ghz_revision){
+               dev_info(&pdev->dev, "RF%s 5GHz radio found (0x%x)\n",

drivers/net/wireless/ath5k/base.c ath5k_pci_probe(struct pci_dev *pdev, · line 591

Quoted 10 lines
drivers/net/wireless/ath5k/base.c +7 -0
+                       ath5k_chip_name(AR5K_VERSION_RAD,sc->ah->ah_radio_5ghz_revision),
+                                       sc->ah->ah_radio_5ghz_revision);
+               dev_info(&pdev->dev, "RF%s 2GHz radio found (0x%x)\n",
+                       ath5k_chip_name(AR5K_VERSION_RAD,sc->ah->ah_radio_2ghz_revision),
+                                       sc->ah->ah_radio_2ghz_revision);
+       }
+
 
        /* ready to process interrupts */
        __clear_bit(ATH_STAT_INVALID, sc->status);

I have ACK'd this as I believe its a lot more useful information than what we had before but I am confused by what some different prints may yield. For example, on AR5213, I get:

ath5k_pci 0001:11:02.0: Atheros AR5213 chip found: MAC 0x56, PHY: 0x41 ath5k_pci 0001:11:02.0: RF5111 5GHz radio found (0x17) ath5k_pci 0001:11:02.0: RF2111 2GHz radio found (0x23)

On my Cardbus card, I then get:

ath5k_pci 0000:15:00.0: Atheros AR5213A chip found: MAC 0x59, PHY: 0x43 ath5k_pci 0000:15:00.0: RF5112A radio found (0x36)

Now, both are capable of 2 GHz and 5 GHz though and only one prints a line which shows the type of RF both for 2 GHz and 5 GHz. Essentially my ah_radio_2ghz_revision is 0x00 for that card. What exactly does having a print for both RFs here indicate besides the fact we are indicating the type of radio and revision? And in the Cardbus card I have where only one RF line is printed what does that indicate?

Luis

#3 lore raw

2007/10/31, Luis R. Rodriguez <[email protected]>:

Quoted 48 lines · Nick Kossifidis
Quoted 23 lines

* Give more infos about mac/phy/radio revision during attach.

drivers/net/wireless/ath5k/base.c +11 -4
@@ -535,10 +568,24 @@ ath5k_pci_probe(struct pci_dev *pdev,
        if (ret)
                goto err_ah;
 
-       dev_info(&pdev->dev, "%s chip found: mac %d.%d phy %d.%d\n",
-                       ath5k_chip_name(id->driver_data), sc->ah->ah_mac_version,
-                       sc->ah->ah_mac_revision, sc->ah->ah_phy_revision >> 4,
-                       sc->ah->ah_phy_revision & 0xf);
+       dev_info(&pdev->dev, "Atheros AR%s chip found: MAC 0x%x, PHY: 0x%x\n",
+                       ath5k_chip_name(AR5K_VERSION_VER,sc->ah->ah_mac_srev),
+                                       sc->ah->ah_mac_srev,
+                                       sc->ah->ah_phy_revision);
+
+       if(sc->ah->ah_radio_5ghz_revision && !sc->ah->ah_radio_2ghz_revision){
+               dev_info(&pdev->dev, "RF%s radio found (0x%x)\n",
+                       ath5k_chip_name(AR5K_VERSION_RAD,sc->ah->ah_radio_5ghz_revision),
+                                       sc->ah->ah_radio_5ghz_revision);
+       } else if(sc->ah->ah_radio_5ghz_revision && sc->ah->ah_radio_2ghz_revision){
+               dev_info(&pdev->dev, "RF%s 5GHz radio found (0x%x)\n",

drivers/net/wireless/ath5k/base.c ath5k_pci_probe(struct pci_dev *pdev, · line 591

Quoted 10 lines
drivers/net/wireless/ath5k/base.c +7 -0
+                       ath5k_chip_name(AR5K_VERSION_RAD,sc->ah->ah_radio_5ghz_revision),
+                                       sc->ah->ah_radio_5ghz_revision);
+               dev_info(&pdev->dev, "RF%s 2GHz radio found (0x%x)\n",
+                       ath5k_chip_name(AR5K_VERSION_RAD,sc->ah->ah_radio_2ghz_revision),
+                                       sc->ah->ah_radio_2ghz_revision);
+       }
+
 
        /* ready to process interrupts */
        __clear_bit(ATH_STAT_INVALID, sc->status);

I have ACK'd this as I believe its a lot more useful information than what we had before but I am confused by what some different prints may yield. For example, on AR5213, I get:

ath5k_pci 0001:11:02.0: Atheros AR5213 chip found: MAC 0x56, PHY: 0x41 ath5k_pci 0001:11:02.0: RF5111 5GHz radio found (0x17) ath5k_pci 0001:11:02.0: RF2111 2GHz radio found (0x23)

On my Cardbus card, I then get:

ath5k_pci 0000:15:00.0: Atheros AR5213A chip found: MAC 0x59, PHY: 0x43 ath5k_pci 0000:15:00.0: RF5112A radio found (0x36)

Quoted 8 lines

Now, both are capable of 2 GHz and 5 GHz though and only one prints a line which shows the type of RF both for 2 GHz and 5 GHz. Essentially my ah_radio_2ghz_revision is 0x00 for that card. What exactly does having a print for both RFs here indicate besides the fact we are indicating the type of radio and revision? And in the Cardbus card I have where only one RF line is printed what does that indicate?

Luis

RF5111 is only 5GHz capable without 2111, 2111 is only 2GHz capable (it's actually an extension to 5111), on the other hand 5112 is multiband, that's why we don't say it's type. On single chip solutions both revisions are 0 so no RF chip msg is displayed.

We have to handle this better for b/g only cards but i didn't have such cards to test so i'll try it later (first we have to see what's going on and they don't work).

Signature · 3 lines
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick
#4 lore raw
Quoted 56 lines · Nick Kossifidis

2007/10/31, Luis R. Rodriguez <[email protected]>:

Quoted 55 lines · Nick Kossifidis
Quoted 23 lines

* Give more infos about mac/phy/radio revision during attach.

drivers/net/wireless/ath5k/base.c +11 -4
@@ -535,10 +568,24 @@ ath5k_pci_probe(struct pci_dev *pdev,
        if (ret)
                goto err_ah;
 
-       dev_info(&pdev->dev, "%s chip found: mac %d.%d phy %d.%d\n",
-                       ath5k_chip_name(id->driver_data), sc->ah->ah_mac_version,
-                       sc->ah->ah_mac_revision, sc->ah->ah_phy_revision >> 4,
-                       sc->ah->ah_phy_revision & 0xf);
+       dev_info(&pdev->dev, "Atheros AR%s chip found: MAC 0x%x, PHY: 0x%x\n",
+                       ath5k_chip_name(AR5K_VERSION_VER,sc->ah->ah_mac_srev),
+                                       sc->ah->ah_mac_srev,
+                                       sc->ah->ah_phy_revision);
+
+       if(sc->ah->ah_radio_5ghz_revision && !sc->ah->ah_radio_2ghz_revision){
+               dev_info(&pdev->dev, "RF%s radio found (0x%x)\n",
+                       ath5k_chip_name(AR5K_VERSION_RAD,sc->ah->ah_radio_5ghz_revision),
+                                       sc->ah->ah_radio_5ghz_revision);
+       } else if(sc->ah->ah_radio_5ghz_revision && sc->ah->ah_radio_2ghz_revision){
+               dev_info(&pdev->dev, "RF%s 5GHz radio found (0x%x)\n",

drivers/net/wireless/ath5k/base.c ath5k_pci_probe(struct pci_dev *pdev, · line 591

Quoted 10 lines
drivers/net/wireless/ath5k/base.c +7 -0
+                       ath5k_chip_name(AR5K_VERSION_RAD,sc->ah->ah_radio_5ghz_revision),
+                                       sc->ah->ah_radio_5ghz_revision);
+               dev_info(&pdev->dev, "RF%s 2GHz radio found (0x%x)\n",
+                       ath5k_chip_name(AR5K_VERSION_RAD,sc->ah->ah_radio_2ghz_revision),
+                                       sc->ah->ah_radio_2ghz_revision);
+       }
+
 
        /* ready to process interrupts */
        __clear_bit(ATH_STAT_INVALID, sc->status);

I have ACK'd this as I believe its a lot more useful information than what we had before but I am confused by what some different prints may yield. For example, on AR5213, I get:

ath5k_pci 0001:11:02.0: Atheros AR5213 chip found: MAC 0x56, PHY: 0x41 ath5k_pci 0001:11:02.0: RF5111 5GHz radio found (0x17) ath5k_pci 0001:11:02.0: RF2111 2GHz radio found (0x23)

On my Cardbus card, I then get:

ath5k_pci 0000:15:00.0: Atheros AR5213A chip found: MAC 0x59, PHY: 0x43 ath5k_pci 0000:15:00.0: RF5112A radio found (0x36)

Now, both are capable of 2 GHz and 5 GHz though and only one prints a line which shows the type of RF both for 2 GHz and 5 GHz. Essentially my ah_radio_2ghz_revision is 0x00 for that card. What exactly does having a print for both RFs here indicate besides the fact we are indicating the type of radio and revision? And in the Cardbus card I have where only one RF line is printed what does that indicate?

Quoted 5 lines
Quoted 1 line

Luis

RF5111 is only 5GHz capable without 2111, 2111 is only 2GHz capable (it's actually an extension to 5111), on the other hand 5112 is multiband, that's why we don't say it's type.

Can add in the message that its RF is multiband then (2GHz/5GHz note will work)?

Quoted 2 lines

On single chip solutions
both revisions are 0 so no RF chip msg is displayed.

Hm.. interesting.. we probably should inform the band the RF is capable of then at least. What do you think?

Quoted 3 lines

We have to handle this better for b/g only cards but i didn't have such cards to test so i'll try it later (first we have to see what's going on and they don't work).

You have one now?

Luis

#5 lore raw

2007/10/31, Luis R. Rodriguez <[email protected]>:

Quoted 63 lines · Nick Kossifidis
Quoted 56 lines

2007/10/31, Luis R. Rodriguez <[email protected]>:

Quoted 55 lines · Nick Kossifidis
Quoted 23 lines

* Give more infos about mac/phy/radio revision during attach.

drivers/net/wireless/ath5k/base.c +11 -4
@@ -535,10 +568,24 @@ ath5k_pci_probe(struct pci_dev *pdev,
        if (ret)
                goto err_ah;
 
-       dev_info(&pdev->dev, "%s chip found: mac %d.%d phy %d.%d\n",
-                       ath5k_chip_name(id->driver_data), sc->ah->ah_mac_version,
-                       sc->ah->ah_mac_revision, sc->ah->ah_phy_revision >> 4,
-                       sc->ah->ah_phy_revision & 0xf);
+       dev_info(&pdev->dev, "Atheros AR%s chip found: MAC 0x%x, PHY: 0x%x\n",
+                       ath5k_chip_name(AR5K_VERSION_VER,sc->ah->ah_mac_srev),
+                                       sc->ah->ah_mac_srev,
+                                       sc->ah->ah_phy_revision);
+
+       if(sc->ah->ah_radio_5ghz_revision && !sc->ah->ah_radio_2ghz_revision){
+               dev_info(&pdev->dev, "RF%s radio found (0x%x)\n",
+                       ath5k_chip_name(AR5K_VERSION_RAD,sc->ah->ah_radio_5ghz_revision),
+                                       sc->ah->ah_radio_5ghz_revision);
+       } else if(sc->ah->ah_radio_5ghz_revision && sc->ah->ah_radio_2ghz_revision){
+               dev_info(&pdev->dev, "RF%s 5GHz radio found (0x%x)\n",

drivers/net/wireless/ath5k/base.c ath5k_pci_probe(struct pci_dev *pdev, · line 591

Quoted 10 lines
drivers/net/wireless/ath5k/base.c +7 -0
+                       ath5k_chip_name(AR5K_VERSION_RAD,sc->ah->ah_radio_5ghz_revision),
+                                       sc->ah->ah_radio_5ghz_revision);
+               dev_info(&pdev->dev, "RF%s 2GHz radio found (0x%x)\n",
+                       ath5k_chip_name(AR5K_VERSION_RAD,sc->ah->ah_radio_2ghz_revision),
+                                       sc->ah->ah_radio_2ghz_revision);
+       }
+
 
        /* ready to process interrupts */
        __clear_bit(ATH_STAT_INVALID, sc->status);

I have ACK'd this as I believe its a lot more useful information than what we had before but I am confused by what some different prints may yield. For example, on AR5213, I get:

ath5k_pci 0001:11:02.0: Atheros AR5213 chip found: MAC 0x56, PHY: 0x41 ath5k_pci 0001:11:02.0: RF5111 5GHz radio found (0x17) ath5k_pci 0001:11:02.0: RF2111 2GHz radio found (0x23)

On my Cardbus card, I then get:

ath5k_pci 0000:15:00.0: Atheros AR5213A chip found: MAC 0x59, PHY: 0x43 ath5k_pci 0000:15:00.0: RF5112A radio found (0x36)

Now, both are capable of 2 GHz and 5 GHz though and only one prints a line which shows the type of RF both for 2 GHz and 5 GHz. Essentially my ah_radio_2ghz_revision is 0x00 for that card. What exactly does having a print for both RFs here indicate besides the fact we are indicating the type of radio and revision? And in the Cardbus card I have where only one RF line is printed what does that indicate?

Quoted 5 lines
Quoted 1 line

Luis

RF5111 is only 5GHz capable without 2111, 2111 is only 2GHz capable (it's actually an extension to 5111), on the other hand 5112 is multiband, that's why we don't say it's type.

Quoted 8 lines

Can add in the message that its RF is multiband then (2GHz/5GHz note will work)?

Quoted 2 lines

On single chip solutions
both revisions are 0 so no RF chip msg is displayed.

Hm.. interesting.. we probably should inform the band the RF is capable of then at least. What do you think?

Note: We set them to zero (check out attach) to make things easier. I believe that for single chips we should check capability bits and for b/g only report 2GHz, for a only report 5Ghz and for both report multband or nothing.

Quoted 8 lines
Quoted 3 lines

We have to handle this better for b/g only cards but i didn't have such cards to test so i'll try it later (first we have to see what's going on and they don't work).

You have one now?

Luis

Nope but i believe that regdumps from them should give us something...

Signature · 3 lines
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick
#6 lore raw
Quoted 69 lines · Nick Kossifidis

2007/10/31, Luis R. Rodriguez <[email protected]>:

Quoted 68 lines · Nick Kossifidis
Quoted 56 lines

2007/10/31, Luis R. Rodriguez <[email protected]>:

Quoted 55 lines · Nick Kossifidis
Quoted 23 lines

* Give more infos about mac/phy/radio revision during attach.

drivers/net/wireless/ath5k/base.c +11 -4
@@ -535,10 +568,24 @@ ath5k_pci_probe(struct pci_dev *pdev,
        if (ret)
                goto err_ah;
 
-       dev_info(&pdev->dev, "%s chip found: mac %d.%d phy %d.%d\n",
-                       ath5k_chip_name(id->driver_data), sc->ah->ah_mac_version,
-                       sc->ah->ah_mac_revision, sc->ah->ah_phy_revision >> 4,
-                       sc->ah->ah_phy_revision & 0xf);
+       dev_info(&pdev->dev, "Atheros AR%s chip found: MAC 0x%x, PHY: 0x%x\n",
+                       ath5k_chip_name(AR5K_VERSION_VER,sc->ah->ah_mac_srev),
+                                       sc->ah->ah_mac_srev,
+                                       sc->ah->ah_phy_revision);
+
+       if(sc->ah->ah_radio_5ghz_revision && !sc->ah->ah_radio_2ghz_revision){
+               dev_info(&pdev->dev, "RF%s radio found (0x%x)\n",
+                       ath5k_chip_name(AR5K_VERSION_RAD,sc->ah->ah_radio_5ghz_revision),
+                                       sc->ah->ah_radio_5ghz_revision);
+       } else if(sc->ah->ah_radio_5ghz_revision && sc->ah->ah_radio_2ghz_revision){
+               dev_info(&pdev->dev, "RF%s 5GHz radio found (0x%x)\n",

drivers/net/wireless/ath5k/base.c ath5k_pci_probe(struct pci_dev *pdev, · line 591

Quoted 10 lines
drivers/net/wireless/ath5k/base.c +7 -0
+                       ath5k_chip_name(AR5K_VERSION_RAD,sc->ah->ah_radio_5ghz_revision),
+                                       sc->ah->ah_radio_5ghz_revision);
+               dev_info(&pdev->dev, "RF%s 2GHz radio found (0x%x)\n",
+                       ath5k_chip_name(AR5K_VERSION_RAD,sc->ah->ah_radio_2ghz_revision),
+                                       sc->ah->ah_radio_2ghz_revision);
+       }
+
 
        /* ready to process interrupts */
        __clear_bit(ATH_STAT_INVALID, sc->status);

I have ACK'd this as I believe its a lot more useful information than what we had before but I am confused by what some different prints may yield. For example, on AR5213, I get:

ath5k_pci 0001:11:02.0: Atheros AR5213 chip found: MAC 0x56, PHY: 0x41 ath5k_pci 0001:11:02.0: RF5111 5GHz radio found (0x17) ath5k_pci 0001:11:02.0: RF2111 2GHz radio found (0x23)

On my Cardbus card, I then get:

ath5k_pci 0000:15:00.0: Atheros AR5213A chip found: MAC 0x59, PHY: 0x43 ath5k_pci 0000:15:00.0: RF5112A radio found (0x36)

Now, both are capable of 2 GHz and 5 GHz though and only one prints a line which shows the type of RF both for 2 GHz and 5 GHz. Essentially my ah_radio_2ghz_revision is 0x00 for that card. What exactly does having a print for both RFs here indicate besides the fact we are indicating the type of radio and revision? And in the Cardbus card I have where only one RF line is printed what does that indicate?

Quoted 5 lines
Quoted 1 line

Luis

RF5111 is only 5GHz capable without 2111, 2111 is only 2GHz capable (it's actually an extension to 5111), on the other hand 5112 is multiband, that's why we don't say it's type.

Can add in the message that its RF is multiband then (2GHz/5GHz note will work)?

Quoted 2 lines

On single chip solutions
both revisions are 0 so no RF chip msg is displayed.

Quoted 8 lines
Quoted 3 lines

Hm.. interesting.. we probably should inform the band the RF is capable of then at least. What do you think?

Note: We set them to zero (check out attach) to make things easier. I believe that for single chips we should check capability bits and for b/g only report 2GHz, for a only report 5Ghz and for both report multband or nothing.

Agreed, and for the last part I think it might be more helpful to report 'multiband' instead of nothing.

Quoted 10 lines
Quoted 8 lines
Quoted 3 lines

We have to handle this better for b/g only cards but i didn't have such cards to test so i'll try it later (first we have to see what's going on and they don't work).

You have one now?

Luis

Nope but i believe that regdumps from them should give us something...

Yes, but its easier if we get you an BG card for testing purposes. Anyone know where we can reliably purchase them from?

Luis

#7 lore raw

Hi.

Quoted 3 lines
Quoted 1 line

Nope but i believe that regdumps from them should give us something...

Yes, but its easier if we get you an BG card for testing purposes. Anyone know where we can reliably purchase them from?

I have to check first, but I think that we have received a b/g-only card from Compex as part of their donation to MadWifi.

Bye, Mike