All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/4] ath5k: Fix device info reporting
@ 2007-11-14 16:14 Nick Kossifidis
  2007-11-15 18:38 ` Luis R. Rodriguez
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Kossifidis @ 2007-11-14 16:14 UTC (permalink / raw)
  To: ath5k-devel, linux-wireless; +Cc: linville, jirislaby, mcgrof

*Fix device info code

Changes-licensed-under: 3-clause-BSD
Signed-Off-by: Nick Kossifidis <mickflemm@gmail.com>

---
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index 4c4837f..0d0e060 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -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);
+		}
 	}
 
 



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

* Re: [PATCH 2/4] ath5k: Fix device info reporting
  2007-11-14 16:14 [PATCH 2/4] ath5k: Fix device info reporting Nick Kossifidis
@ 2007-11-15 18:38 ` Luis R. Rodriguez
  2007-11-15 23:59   ` [ath5k-devel] " Nick Kossifidis
  0 siblings, 1 reply; 4+ messages in thread
From: Luis R. Rodriguez @ 2007-11-15 18:38 UTC (permalink / raw)
  To: ath5k-devel, linux-wireless, linville, jirislaby, mcgrof

On Nov 14, 2007 11:14 AM, Nick Kossifidis <mick@madwifi.org> wrote:
> *Fix device info code
>
> Changes-licensed-under: 3-clause-BSD
> Signed-Off-by: Nick Kossifidis <mickflemm@gmail.com>
>
> ---
> diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
> index 4c4837f..0d0e060 100644
> --- a/drivers/net/wireless/ath5k/base.c
> +++ b/drivers/net/wireless/ath5k/base.c
> @@ -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){

I'm a bit confused here you check for not single chip

> +               /* 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?

> +                       /* 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);
> +               }
>         }
>

Thanks,

  Luis

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

* Re: [ath5k-devel] [PATCH 2/4] ath5k: Fix device info reporting
  2007-11-15 18:38 ` Luis R. Rodriguez
@ 2007-11-15 23:59   ` Nick Kossifidis
  2007-11-16  1:12     ` Luis R. Rodriguez
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Kossifidis @ 2007-11-15 23:59 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: ath5k-devel, linux-wireless, linville, jirislaby

2007/11/15, Luis R. Rodriguez <mcgrof@gmail.com>:
> On Nov 14, 2007 11:14 AM, Nick Kossifidis <mick@madwifi.org> wrote:
> > *Fix device info code
> >
> > Changes-licensed-under: 3-clause-BSD
> > Signed-Off-by: Nick Kossifidis <mickflemm@gmail.com>
> >
> > ---
> > diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
> > index 4c4837f..0d0e060 100644
> > --- a/drivers/net/wireless/ath5k/base.c
> > +++ b/drivers/net/wireless/ath5k/base.c
> > @@ -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){
>
> 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.

> > +               /* 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).

> > +                       /* 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);
> > +               }
> >         }
> >
>
> Thanks,
>
>   Luis
> _______________________________________________
> ath5k-devel mailing list
> ath5k-devel@lists.ath5k.org
> https://lists.ath5k.org/mailman/listinfo/ath5k-devel
>


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

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

* Re: [ath5k-devel] [PATCH 2/4] ath5k: Fix device info reporting
  2007-11-15 23:59   ` [ath5k-devel] " Nick Kossifidis
@ 2007-11-16  1:12     ` Luis R. Rodriguez
  0 siblings, 0 replies; 4+ messages in thread
From: Luis R. Rodriguez @ 2007-11-16  1:12 UTC (permalink / raw)
  To: Nick Kossifidis; +Cc: ath5k-devel, linux-wireless, linville, jirislaby

On Nov 15, 2007 6:59 PM, Nick Kossifidis <mickflemm@gmail.com> wrote:
> 2007/11/15, Luis R. Rodriguez <mcgrof@gmail.com>:
>
> > On Nov 14, 2007 11:14 AM, Nick Kossifidis <mick@madwifi.org> wrote:
> > > *Fix device info code
> > >
> > > Changes-licensed-under: 3-clause-BSD
> > > Signed-Off-by: Nick Kossifidis <mickflemm@gmail.com>
> > >
> > > ---
> > > diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
> > > index 4c4837f..0d0e060 100644
> > > --- a/drivers/net/wireless/ath5k/base.c
> > > +++ b/drivers/net/wireless/ath5k/base.c
> > > @@ -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){
> >
> > 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.

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.

> > > +               /* 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.

Acked-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>

  Luis

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

end of thread, other threads:[~2007-11-16  1:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-14 16:14 [PATCH 2/4] ath5k: Fix device info reporting Nick Kossifidis
2007-11-15 18:38 ` Luis R. Rodriguez
2007-11-15 23:59   ` [ath5k-devel] " Nick Kossifidis
2007-11-16  1:12     ` Luis R. Rodriguez

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.