linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath5k: Enhance reporting on probe
@ 2007-10-06  2:02 Luis R. Rodriguez
  2007-10-07 10:20 ` Nick Kossifidis
  0 siblings, 1 reply; 2+ messages in thread
From: Luis R. Rodriguez @ 2007-10-06  2:02 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, Jiri Slaby, Nick Kossifidis

Enhance reporting of devices. I tried getting revisions for
ah_radio_2ghz_revision but it seems to be empty.

Oh and AR5210 no longer locks now with the interrupt fixes. But now we get:

ath5k_hw_reset: failed to reset TX queue #1
unable to reset hardware: -22

We'll need to fix this.

Signed-off-by: Luis R. Rodriguez <mcgrof@gmail.com>
---
 drivers/net/wireless/ath5k/base.c |   32 ++++++++++++++++++++++++++++----
 1 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index 97a7613..6097763 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -2330,11 +2330,26 @@ static const char *ath_chip_name(u8 mac_version)
 	return "Unknown";
 }
 
+static const char *ath_phy_name(enum ath5k_radio radio)
+{
+	switch (radio) {
+	case AR5K_RF5110:
+		return "RF5110";
+	case AR5K_RF5111:
+		return "RF5111";
+	case AR5K_RF5112:
+		return "RF5112";
+	default:
+		return "Unknown";
+	}
+}
+
 static int __devinit ath_pci_probe(struct pci_dev *pdev,
 		const struct pci_device_id *id)
 {
 	void __iomem *mem;
 	struct ath_softc *sc;
+	struct ath_hw *ah;
 	struct ieee80211_hw *hw;
 	int ret;
 	u8 csz;
@@ -2444,14 +2459,23 @@ static int __devinit ath_pci_probe(struct pci_dev *pdev,
 		goto err_irq;
 	}
 
+	ah = sc->ah;
+
 	ret = ath_attach(pdev, hw);
 	if (ret)
 		goto err_ah;
 
-	dev_info(&pdev->dev, "%s chip found: mac %d.%d phy %d.%d\n",
-			ath_chip_name(id->driver_data), sc->ah->ah_mac_version,
-			sc->ah->ah_mac_version, sc->ah->ah_phy_revision >> 4,
-			sc->ah->ah_phy_revision & 0xf);
+	dev_info(&pdev->dev, "MAC:\t\t%s %u.%u\n",
+		ath_chip_name(id->driver_data), 
+		ah->ah_mac_version,
+		ah->ah_mac_revision);
+	dev_info(&pdev->dev, "Phy:\t\t%s %u.%u\n",
+		ath_phy_name(ah->ah_radio),
+		ah->ah_phy_revision >> 4,
+		ah->ah_phy_revision & 0xf);
+	dev_info(&pdev->dev, "Radio:\t%u.%u\n",
+		ah->ah_radio_5ghz_revision >> 4,
+		ah->ah_radio_5ghz_revision & 0xf);
 
 	/* ready to process interrupts */
 	__clear_bit(ATH_STAT_INVALID, sc->status);
-- 
1.5.2.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ath5k: Enhance reporting on probe
  2007-10-06  2:02 [PATCH] ath5k: Enhance reporting on probe Luis R. Rodriguez
@ 2007-10-07 10:20 ` Nick Kossifidis
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Kossifidis @ 2007-10-07 10:20 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: John Linville, linux-wireless, Jiri Slaby

Have you checked out this ?

http://madwifi.org/changeset/2703

check out the table with the names here...
http://madwifi.org/browser/branches/ath5k/ath5k.h?rev=2709#L161

and the code that uses this table here...
http://madwifi.org/browser/branches/ath5k/ath5k_hw.c?rev=2709#L400

Where is the problem with this approach ???

2007/10/5, Luis R. Rodriguez <mcgrof@gmail.com>:
> Enhance reporting of devices. I tried getting revisions for
> ah_radio_2ghz_revision but it seems to be empty.
>
> Oh and AR5210 no longer locks now with the interrupt fixes. But now we get:
>
> ath5k_hw_reset: failed to reset TX queue #1
> unable to reset hardware: -22
>
> We'll need to fix this.
>
> Signed-off-by: Luis R. Rodriguez <mcgrof@gmail.com>
> ---
>  drivers/net/wireless/ath5k/base.c |   32 ++++++++++++++++++++++++++++----
>  1 files changed, 28 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
> index 97a7613..6097763 100644
> --- a/drivers/net/wireless/ath5k/base.c
> +++ b/drivers/net/wireless/ath5k/base.c
> @@ -2330,11 +2330,26 @@ static const char *ath_chip_name(u8 mac_version)
>         return "Unknown";
>  }
>
> +static const char *ath_phy_name(enum ath5k_radio radio)
> +{
> +       switch (radio) {
> +       case AR5K_RF5110:
> +               return "RF5110";
> +       case AR5K_RF5111:
> +               return "RF5111";
> +       case AR5K_RF5112:
> +               return "RF5112";
> +       default:
> +               return "Unknown";
> +       }
> +}
> +
>  static int __devinit ath_pci_probe(struct pci_dev *pdev,
>                 const struct pci_device_id *id)
>  {
>         void __iomem *mem;
>         struct ath_softc *sc;
> +       struct ath_hw *ah;
>         struct ieee80211_hw *hw;
>         int ret;
>         u8 csz;
> @@ -2444,14 +2459,23 @@ static int __devinit ath_pci_probe(struct pci_dev *pdev,
>                 goto err_irq;
>         }
>
> +       ah = sc->ah;
> +
>         ret = ath_attach(pdev, hw);
>         if (ret)
>                 goto err_ah;
>
> -       dev_info(&pdev->dev, "%s chip found: mac %d.%d phy %d.%d\n",
> -                       ath_chip_name(id->driver_data), sc->ah->ah_mac_version,
> -                       sc->ah->ah_mac_version, sc->ah->ah_phy_revision >> 4,
> -                       sc->ah->ah_phy_revision & 0xf);
> +       dev_info(&pdev->dev, "MAC:\t\t%s %u.%u\n",
> +               ath_chip_name(id->driver_data),
> +               ah->ah_mac_version,
> +               ah->ah_mac_revision);
> +       dev_info(&pdev->dev, "Phy:\t\t%s %u.%u\n",
> +               ath_phy_name(ah->ah_radio),
> +               ah->ah_phy_revision >> 4,
> +               ah->ah_phy_revision & 0xf);
> +       dev_info(&pdev->dev, "Radio:\t%u.%u\n",
> +               ah->ah_radio_5ghz_revision >> 4,
> +               ah->ah_radio_5ghz_revision & 0xf);
>
>         /* ready to process interrupts */
>         __clear_bit(ATH_STAT_INVALID, sc->status);
> --
> 1.5.2.5
>
>


-- 
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-10-07 10:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-06  2:02 [PATCH] ath5k: Enhance reporting on probe Luis R. Rodriguez
2007-10-07 10:20 ` Nick Kossifidis

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