aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2011-07-17 20:01:30 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-07-19 16:49:56 -0400
commit40c6226967c8b27eb21f6894abff1e145861c6e1 (patch)
tree224149eb23d301e184890e2dedc38bf512d4fcca /drivers/net
parent124cc1117569fbe23b2be1e01d76a01202a0ca93 (diff)
b43: bcma: read info about supported bands
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/b43/main.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 8a2e059de235..295c7e3b2c40 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4948,6 +4948,7 @@ static int b43_wireless_core_attach(struct b43_wldev *dev)
4948 struct b43_wl *wl = dev->wl; 4948 struct b43_wl *wl = dev->wl;
4949 struct pci_dev *pdev = NULL; 4949 struct pci_dev *pdev = NULL;
4950 int err; 4950 int err;
4951 u32 tmp;
4951 bool have_2ghz_phy = 0, have_5ghz_phy = 0; 4952 bool have_2ghz_phy = 0, have_5ghz_phy = 0;
4952 4953
4953 /* Do NOT do any device initialization here. 4954 /* Do NOT do any device initialization here.
@@ -4973,17 +4974,17 @@ static int b43_wireless_core_attach(struct b43_wldev *dev)
4973 switch (dev->dev->bus_type) { 4974 switch (dev->dev->bus_type) {
4974#ifdef CONFIG_B43_BCMA 4975#ifdef CONFIG_B43_BCMA
4975 case B43_BUS_BCMA: 4976 case B43_BUS_BCMA:
4976 /* FIXME */ 4977 tmp = bcma_aread32(dev->dev->bdev, BCMA_IOST);
4977 have_2ghz_phy = 1; 4978 have_2ghz_phy = !!(tmp & B43_BCMA_IOST_2G_PHY);
4978 have_5ghz_phy = 0; 4979 have_5ghz_phy = !!(tmp & B43_BCMA_IOST_5G_PHY);
4979 break; 4980 break;
4980#endif 4981#endif
4981#ifdef CONFIG_B43_SSB 4982#ifdef CONFIG_B43_SSB
4982 case B43_BUS_SSB: 4983 case B43_BUS_SSB:
4983 if (dev->dev->core_rev >= 5) { 4984 if (dev->dev->core_rev >= 5) {
4984 u32 tmshigh = ssb_read32(dev->dev->sdev, SSB_TMSHIGH); 4985 tmp = ssb_read32(dev->dev->sdev, SSB_TMSHIGH);
4985 have_2ghz_phy = !!(tmshigh & B43_TMSHIGH_HAVE_2GHZ_PHY); 4986 have_2ghz_phy = !!(tmp & B43_TMSHIGH_HAVE_2GHZ_PHY);
4986 have_5ghz_phy = !!(tmshigh & B43_TMSHIGH_HAVE_5GHZ_PHY); 4987 have_5ghz_phy = !!(tmp & B43_TMSHIGH_HAVE_5GHZ_PHY);
4987 } else 4988 } else
4988 B43_WARN_ON(1); 4989 B43_WARN_ON(1);
4989 break; 4990 break;