diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2011-05-17 20:06:42 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-01 15:10:57 -0400 |
commit | 79d2232fed23e8e0d1b11abe2f9b78fb09084506 (patch) | |
tree | 6b5a26596f0e489858109e58c5ced7baeef4e441 /drivers/net/wireless/b43/phy_n.c | |
parent | c244e08c7aa30abea3c29ff17a40f4b0a58a7913 (diff) |
b43: bus: abstract board info
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/phy_n.c')
-rw-r--r-- | drivers/net/wireless/b43/phy_n.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index 46428ad5ab84..ad14f3b428c5 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c | |||
@@ -424,15 +424,14 @@ static void b43_radio_init2055_post(struct b43_wldev *dev) | |||
424 | { | 424 | { |
425 | struct b43_phy_n *nphy = dev->phy.n; | 425 | struct b43_phy_n *nphy = dev->phy.n; |
426 | struct ssb_sprom *sprom = dev->dev->bus_sprom; | 426 | struct ssb_sprom *sprom = dev->dev->bus_sprom; |
427 | struct ssb_boardinfo *binfo = &(dev->sdev->bus->boardinfo); | ||
428 | int i; | 427 | int i; |
429 | u16 val; | 428 | u16 val; |
430 | bool workaround = false; | 429 | bool workaround = false; |
431 | 430 | ||
432 | if (sprom->revision < 4) | 431 | if (sprom->revision < 4) |
433 | workaround = (binfo->vendor != PCI_VENDOR_ID_BROADCOM && | 432 | workaround = (dev->dev->board_vendor != PCI_VENDOR_ID_BROADCOM |
434 | binfo->type == 0x46D && | 433 | && dev->dev->board_type == 0x46D |
435 | binfo->rev >= 0x41); | 434 | && dev->dev->board_rev >= 0x41); |
436 | else | 435 | else |
437 | workaround = | 436 | workaround = |
438 | !(sprom->boardflags2_lo & B43_BFL2_RXBB_INT_REG_DIS); | 437 | !(sprom->boardflags2_lo & B43_BFL2_RXBB_INT_REG_DIS); |
@@ -1373,7 +1372,6 @@ static void b43_nphy_gain_ctrl_workarounds(struct b43_wldev *dev) | |||
1373 | /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/Workarounds */ | 1372 | /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/Workarounds */ |
1374 | static void b43_nphy_workarounds(struct b43_wldev *dev) | 1373 | static void b43_nphy_workarounds(struct b43_wldev *dev) |
1375 | { | 1374 | { |
1376 | struct ssb_bus *bus = dev->sdev->bus; | ||
1377 | struct ssb_sprom *sprom = dev->dev->bus_sprom; | 1375 | struct ssb_sprom *sprom = dev->dev->bus_sprom; |
1378 | struct b43_phy *phy = &dev->phy; | 1376 | struct b43_phy *phy = &dev->phy; |
1379 | struct b43_phy_n *nphy = phy->n; | 1377 | struct b43_phy_n *nphy = phy->n; |
@@ -1505,7 +1503,7 @@ static void b43_nphy_workarounds(struct b43_wldev *dev) | |||
1505 | b43_phy_write(dev, B43_NPHY_RFCTL_LUT_TRSW_UP2, 0x301); | 1503 | b43_phy_write(dev, B43_NPHY_RFCTL_LUT_TRSW_UP2, 0x301); |
1506 | 1504 | ||
1507 | if (sprom->boardflags2_lo & 0x100 && | 1505 | if (sprom->boardflags2_lo & 0x100 && |
1508 | bus->boardinfo.type == 0x8B) { | 1506 | dev->dev->board_type == 0x8B) { |
1509 | delays1[0] = 0x1; | 1507 | delays1[0] = 0x1; |
1510 | delays1[5] = 0x14; | 1508 | delays1[5] = 0x14; |
1511 | } | 1509 | } |
@@ -3587,7 +3585,6 @@ static void b43_nphy_set_rx_core_state(struct b43_wldev *dev, u8 mask) | |||
3587 | */ | 3585 | */ |
3588 | int b43_phy_initn(struct b43_wldev *dev) | 3586 | int b43_phy_initn(struct b43_wldev *dev) |
3589 | { | 3587 | { |
3590 | struct ssb_bus *bus = dev->sdev->bus; | ||
3591 | struct ssb_sprom *sprom = dev->dev->bus_sprom; | 3588 | struct ssb_sprom *sprom = dev->dev->bus_sprom; |
3592 | struct b43_phy *phy = &dev->phy; | 3589 | struct b43_phy *phy = &dev->phy; |
3593 | struct b43_phy_n *nphy = phy->n; | 3590 | struct b43_phy_n *nphy = phy->n; |
@@ -3642,8 +3639,8 @@ int b43_phy_initn(struct b43_wldev *dev) | |||
3642 | b43_phy_write(dev, B43_NPHY_AFESEQ_TX2RX_PUD_40M, 0x20); | 3639 | b43_phy_write(dev, B43_NPHY_AFESEQ_TX2RX_PUD_40M, 0x20); |
3643 | 3640 | ||
3644 | if (sprom->boardflags2_lo & 0x100 || | 3641 | if (sprom->boardflags2_lo & 0x100 || |
3645 | (bus->boardinfo.vendor == PCI_VENDOR_ID_APPLE && | 3642 | (dev->dev->board_vendor == PCI_VENDOR_ID_APPLE && |
3646 | bus->boardinfo.type == 0x8B)) | 3643 | dev->dev->board_type == 0x8B)) |
3647 | b43_phy_write(dev, B43_NPHY_TXREALFD, 0xA0); | 3644 | b43_phy_write(dev, B43_NPHY_TXREALFD, 0xA0); |
3648 | else | 3645 | else |
3649 | b43_phy_write(dev, B43_NPHY_TXREALFD, 0xB8); | 3646 | b43_phy_write(dev, B43_NPHY_TXREALFD, 0xB8); |