ath5k: Fix device info reporting
PATCH 2/4 ath5k: Fix device info reporting
*Fix device info code
Changes-licensed-under: 3-clause-BSD
---
drivers/net/wireless/ath5k/base.c +30 -12
@@ -570,22 +570,40 @@ ath5k_pci_probe(struct pci_dev *pdev,if (ret) goto err_ah; -dev_info (&pdev->dev,"Atheros AR%s chip found: MAC 0x%x, PHY: 0x%x\n" , +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" , -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); +if (!sc->ah->ah_single_chip){ +/* Single chip radio (!RF5111) */ +if (sc->ah->ah_radio_5ghz_revision && !sc->ah->ah_radio_2ghz_revision) { +/* No 5GHz support -> report 2GHz radio */ +if (!test_bit (MODE_IEEE80211A , sc->ah->ah_capabilities.cap_mode)){ +dev_info (&pdev->dev,"RF%s 2GHz radio found (0x%x)\n" , +ath5k_chip_name (AR5K_VERSION_RAD ,sc->ah->ah_radio_5ghz_revision), + sc->ah->ah_radio_5ghz_revision); +/* No 2GHz support (5110 and some 5Ghz only cards) -> report 5Ghz radio */ + }else if (!test_bit (MODE_IEEE80211B , sc->ah->ah_capabilities.cap_mode)){ +dev_info (&pdev->dev,"RF%s 5GHz radio found (0x%x)\n" , +ath5k_chip_name (AR5K_VERSION_RAD ,sc->ah->ah_radio_5ghz_revision), + sc->ah->ah_radio_5ghz_revision); +/* Multiband radio */ + }else { +dev_info (&pdev->dev,"RF%s multiband radio found (0x%x)\n" , +ath5k_chip_name (AR5K_VERSION_RAD ,sc->ah->ah_radio_5ghz_revision), + sc->ah->ah_radio_5ghz_revision); + } + } +/* Multi chip radio (RF5111 - RF2111) -> report both 2GHz/5GHz radios */ +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" , +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); + } }
Quoted 22 lines · Nick Kossifidis
*Fix device info code
Changes-licensed-under: 3-clause-BSD
Signed-off-by Nick Kossifidis <[email protected]>---
drivers/net/wireless/ath5k/base.c +1
-3@@ -570,22 +570,40 @@ ath5k_pci_probe(struct pci_dev *pdev,if (ret) goto err_ah; -dev_info (&pdev->dev,"Atheros AR%s chip found: MAC 0x%x, PHY: 0x%x\n" , +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",
drivers/net/wireless/ath5k/base.c ath5k_pci_probe(struct pci_dev *pdev, · line 578
Quoted 10 lines
drivers/net/wireless/ath5k/base.c +1
-9-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" , -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); +if (!sc->ah->ah_single_chip){
I'm a bit confused here you check for not single chip
drivers/net/wireless/ath5k/base.c ath5k_pci_probe(struct pci_dev *pdev, · line 580
Quoted 2 lines
drivers/net/wireless/ath5k/base.c +2
-0+/* Single chip radio (!RF5111) */ +if (sc->ah->ah_radio_5ghz_revision && !sc->ah->ah_radio_2ghz_revision) {
And here you say it is. Can you elaborate a bit on this?
Quoted 18 lines
drivers/net/wireless/ath5k/base.c +18
-0+/* No 5GHz support -> report 2GHz radio */ +if (!test_bit (MODE_IEEE80211A , sc->ah->ah_capabilities.cap_mode)){ +dev_info (&pdev->dev,"RF%s 2GHz radio found (0x%x)\n" , +ath5k_chip_name (AR5K_VERSION_RAD ,sc->ah->ah_radio_5ghz_revision), + sc->ah->ah_radio_5ghz_revision); +/* No 2GHz support (5110 and some 5Ghz only cards) -> report 5Ghz radio */ + }else if (!test_bit (MODE_IEEE80211B , sc->ah->ah_capabilities.cap_mode)){ +dev_info (&pdev->dev,"RF%s 5GHz radio found (0x%x)\n" , +ath5k_chip_name (AR5K_VERSION_RAD ,sc->ah->ah_radio_5ghz_revision), + sc->ah->ah_radio_5ghz_revision); +/* Multiband radio */ + }else { +dev_info (&pdev->dev,"RF%s multiband radio found (0x%x)\n" , +ath5k_chip_name (AR5K_VERSION_RAD ,sc->ah->ah_radio_5ghz_revision), + sc->ah->ah_radio_5ghz_revision); + } + } +/* Multi chip radio (RF5111 - RF2111) -> report both 2GHz/5GHz radios */
drivers/net/wireless/ath5k/base.c ath5k_pci_probe(struct pci_dev *pdev, · line 608
Quoted 10 lines
drivers/net/wireless/ath5k/base.c +8
-0+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" , +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); + } }
Thanks,
Luis
2007/11/15, Luis R. Rodriguez <[email protected]>:
Quoted 21 lines · Nick Kossifidis
Quoted 20 lines
*Fix device info code
Changes-licensed-under: 3-clause-BSD
Signed-off-by Nick Kossifidis <[email protected]>---
drivers/net/wireless/ath5k/base.c +1
-1@@ -570,22 +570,40 @@ ath5k_pci_probe(struct pci_dev *pdev,if (ret) goto err_ah; -dev_info (&pdev->dev,"Atheros AR%s chip found: MAC 0x%x, PHY: 0x%x\n" , +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);
Quoted 15 lines
drivers/net/wireless/ath5k/base.c ath5k_pci_probe(struct pci_dev *pdev, · line 578
Quoted 12 lines
drivers/net/wireless/ath5k/base.c +1
-11-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" , -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); +if (!sc->ah->ah_single_chip){I'm a bit confused here you check for not single chip
Single chip solution (ah_single_chip) means PHY chip integrated with MAC, we don't need to print radio info for them because there are no separate radio chips.
Quoted 5 lines
drivers/net/wireless/ath5k/base.c ath5k_pci_probe(struct pci_dev *pdev, · line 580
Quoted 2 lines
drivers/net/wireless/ath5k/base.c +2
-0+/* Single chip radio (!RF5111) */ +if (sc->ah->ah_radio_5ghz_revision && !sc->ah->ah_radio_2ghz_revision) {And here you say it is. Can you elaborate a bit on this?
This is single chip radio, a PHY that both 5HGz/2GHz radios are in one chip (only 5111 is a dual chip radio with 5111 for 5GHz and 2111 for 2GHz).
Quoted 37 lines
Quoted 18 lines
drivers/net/wireless/ath5k/base.c +18
-0+/* No 5GHz support -> report 2GHz radio */ +if (!test_bit (MODE_IEEE80211A , sc->ah->ah_capabilities.cap_mode)){ +dev_info (&pdev->dev,"RF%s 2GHz radio found (0x%x)\n" , +ath5k_chip_name (AR5K_VERSION_RAD ,sc->ah->ah_radio_5ghz_revision), + sc->ah->ah_radio_5ghz_revision); +/* No 2GHz support (5110 and some 5Ghz only cards) -> report 5Ghz radio */ + }else if (!test_bit (MODE_IEEE80211B , sc->ah->ah_capabilities.cap_mode)){ +dev_info (&pdev->dev,"RF%s 5GHz radio found (0x%x)\n" , +ath5k_chip_name (AR5K_VERSION_RAD ,sc->ah->ah_radio_5ghz_revision), + sc->ah->ah_radio_5ghz_revision); +/* Multiband radio */ + }else { +dev_info (&pdev->dev,"RF%s multiband radio found (0x%x)\n" , +ath5k_chip_name (AR5K_VERSION_RAD ,sc->ah->ah_radio_5ghz_revision), + sc->ah->ah_radio_5ghz_revision); + } + } +/* Multi chip radio (RF5111 - RF2111) -> report both 2GHz/5GHz radios */ drivers/net/wireless/ath5k/base.c ath5k_pci_probe(struct pci_dev *pdev, · line 608
Quoted 10 lines
drivers/net/wireless/ath5k/base.c +8
-0+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" , +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); + } }Thanks,
Luis
_______________________________________________
ath5k-devel mailing list
[email protected]
https://lists.ath5k.org/mailman/listinfo/ath5k-devel
Signature · 3 lines
GPG ID: 0xD21DB2DB As you read this post global entropy rises. Have Fun ;-) Nick
Luis R. Rodriguez
Acked-byQuoted 38 lines · Nick Kossifidis
2007/11/15, Luis R. Rodriguez <[email protected]>:
Quoted 21 lines · Nick Kossifidis
Quoted 20 lines
*Fix device info code
Changes-licensed-under: 3-clause-BSD
Signed-off-by Nick Kossifidis <[email protected]>---
drivers/net/wireless/ath5k/base.c +1
-1@@ -570,22 +570,40 @@ ath5k_pci_probe(struct pci_dev *pdev,if (ret) goto err_ah; -dev_info (&pdev->dev,"Atheros AR%s chip found: MAC 0x%x, PHY: 0x%x\n" , +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);Quoted 15 lines
drivers/net/wireless/ath5k/base.c ath5k_pci_probe(struct pci_dev *pdev, · line 578
Quoted 12 lines
drivers/net/wireless/ath5k/base.c +1
-11-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" , -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); +if (!sc->ah->ah_single_chip){I'm a bit confused here you check for not single chip
Quoted 3 lines
Single chip solution (
ah_single_chip) means PHY chip integrated with MAC, we don't need to print radio info for them because there are no separate radio chips.
Ah, thanks for clarifying this. Hm, we should rename ah_single_chip then being that we use "single chip" very differently below. That can wait though.
Quoted 9 lines
Quoted 5 lines
drivers/net/wireless/ath5k/base.c ath5k_pci_probe(struct pci_dev *pdev, · line 580
Quoted 2 lines
drivers/net/wireless/ath5k/base.c +2
-0+/* Single chip radio (!RF5111) */ +if (sc->ah->ah_radio_5ghz_revision && !sc->ah->ah_radio_2ghz_revision) {And here you say it is. Can you elaborate a bit on this?
This is single chip radio, a PHY that both 5HGz/2GHz radios are in one chip (only 5111 is a dual chip radio with 5111 for 5GHz and 2111 for 2GHz).
Thanks for clarifying this.
Luis