diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2011-05-19 09:11:24 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-01 15:12:27 -0400 |
commit | 6ac53692179da165b2cb1e2a122b0ed9dad9b9ad (patch) | |
tree | 39e3f28ded02e3c122e31f716fdc03710270e1ed /drivers/net | |
parent | 5595f119649b3178c03479baa794113b8533158a (diff) |
b43: LP-PHY: use new pointers path to access ssb_device
LP-PHY code is SSB specific, add check for bus type.
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/phy_lp.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c index 2606c25e574..daec1d9e4a1 100644 --- a/drivers/net/wireless/b43/phy_lp.c +++ b/drivers/net/wireless/b43/phy_lp.c | |||
@@ -214,7 +214,7 @@ static void lpphy_table_init(struct b43_wldev *dev) | |||
214 | 214 | ||
215 | static void lpphy_baseband_rev0_1_init(struct b43_wldev *dev) | 215 | static void lpphy_baseband_rev0_1_init(struct b43_wldev *dev) |
216 | { | 216 | { |
217 | struct ssb_bus *bus = dev->sdev->bus; | 217 | struct ssb_bus *bus = dev->dev->sdev->bus; |
218 | struct ssb_sprom *sprom = dev->dev->bus_sprom; | 218 | struct ssb_sprom *sprom = dev->dev->bus_sprom; |
219 | struct b43_phy_lp *lpphy = dev->phy.lp; | 219 | struct b43_phy_lp *lpphy = dev->phy.lp; |
220 | u16 tmp, tmp2; | 220 | u16 tmp, tmp2; |
@@ -519,7 +519,7 @@ struct b2062_freqdata { | |||
519 | static void lpphy_2062_init(struct b43_wldev *dev) | 519 | static void lpphy_2062_init(struct b43_wldev *dev) |
520 | { | 520 | { |
521 | struct b43_phy_lp *lpphy = dev->phy.lp; | 521 | struct b43_phy_lp *lpphy = dev->phy.lp; |
522 | struct ssb_bus *bus = dev->sdev->bus; | 522 | struct ssb_bus *bus = dev->dev->sdev->bus; |
523 | u32 crystalfreq, tmp, ref; | 523 | u32 crystalfreq, tmp, ref; |
524 | unsigned int i; | 524 | unsigned int i; |
525 | const struct b2062_freqdata *fd = NULL; | 525 | const struct b2062_freqdata *fd = NULL; |
@@ -1289,7 +1289,7 @@ finish: | |||
1289 | 1289 | ||
1290 | static void lpphy_rev2plus_rc_calib(struct b43_wldev *dev) | 1290 | static void lpphy_rev2plus_rc_calib(struct b43_wldev *dev) |
1291 | { | 1291 | { |
1292 | struct ssb_bus *bus = dev->sdev->bus; | 1292 | struct ssb_bus *bus = dev->dev->sdev->bus; |
1293 | u32 crystal_freq = bus->chipco.pmu.crystalfreq * 1000; | 1293 | u32 crystal_freq = bus->chipco.pmu.crystalfreq * 1000; |
1294 | u8 tmp = b43_radio_read(dev, B2063_RX_BB_SP8) & 0xFF; | 1294 | u8 tmp = b43_radio_read(dev, B2063_RX_BB_SP8) & 0xFF; |
1295 | int i; | 1295 | int i; |
@@ -2428,7 +2428,7 @@ static int lpphy_b2062_tune(struct b43_wldev *dev, | |||
2428 | unsigned int channel) | 2428 | unsigned int channel) |
2429 | { | 2429 | { |
2430 | struct b43_phy_lp *lpphy = dev->phy.lp; | 2430 | struct b43_phy_lp *lpphy = dev->phy.lp; |
2431 | struct ssb_bus *bus = dev->sdev->bus; | 2431 | struct ssb_bus *bus = dev->dev->sdev->bus; |
2432 | const struct b206x_channel *chandata = NULL; | 2432 | const struct b206x_channel *chandata = NULL; |
2433 | u32 crystal_freq = bus->chipco.pmu.crystalfreq * 1000; | 2433 | u32 crystal_freq = bus->chipco.pmu.crystalfreq * 1000; |
2434 | u32 tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8, tmp9; | 2434 | u32 tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8, tmp9; |
@@ -2518,7 +2518,7 @@ static void lpphy_b2063_vco_calib(struct b43_wldev *dev) | |||
2518 | static int lpphy_b2063_tune(struct b43_wldev *dev, | 2518 | static int lpphy_b2063_tune(struct b43_wldev *dev, |
2519 | unsigned int channel) | 2519 | unsigned int channel) |
2520 | { | 2520 | { |
2521 | struct ssb_bus *bus = dev->sdev->bus; | 2521 | struct ssb_bus *bus = dev->dev->sdev->bus; |
2522 | 2522 | ||
2523 | static const struct b206x_channel *chandata = NULL; | 2523 | static const struct b206x_channel *chandata = NULL; |
2524 | u32 crystal_freq = bus->chipco.pmu.crystalfreq * 1000; | 2524 | u32 crystal_freq = bus->chipco.pmu.crystalfreq * 1000; |
@@ -2666,6 +2666,11 @@ static int b43_lpphy_op_init(struct b43_wldev *dev) | |||
2666 | { | 2666 | { |
2667 | int err; | 2667 | int err; |
2668 | 2668 | ||
2669 | if (dev->dev->bus_type != B43_BUS_SSB) { | ||
2670 | b43err(dev->wl, "LP-PHY is supported only on SSB!\n"); | ||
2671 | return -EOPNOTSUPP; | ||
2672 | } | ||
2673 | |||
2669 | lpphy_read_band_sprom(dev); //FIXME should this be in prepare_structs? | 2674 | lpphy_read_band_sprom(dev); //FIXME should this be in prepare_structs? |
2670 | lpphy_baseband_init(dev); | 2675 | lpphy_baseband_init(dev); |
2671 | lpphy_radio_init(dev); | 2676 | lpphy_radio_init(dev); |