diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2007-11-09 17:57:34 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:04:43 -0500 |
commit | 7797aa384870e3bb5bfd3b6a0eae61e7c7a4c993 (patch) | |
tree | 9d48b112dc1c973a17860fe39e82554724f7ed4b /drivers/net/wireless/b43legacy/main.c | |
parent | 95de2841aad971867851b59c0c5253ecc2e19832 (diff) |
b43legacy: Convert to use of the new SPROM structure
The b43legacy driver is modified to use the new SPROM structure.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43legacy/main.c')
-rw-r--r-- | drivers/net/wireless/b43legacy/main.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index e545f79ac747..1a8b67619077 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c | |||
@@ -1745,7 +1745,7 @@ static int b43legacy_gpio_init(struct b43legacy_wldev *dev) | |||
1745 | mask |= 0x0060; | 1745 | mask |= 0x0060; |
1746 | set |= 0x0060; | 1746 | set |= 0x0060; |
1747 | } | 1747 | } |
1748 | if (dev->dev->bus->sprom.r1.boardflags_lo & B43legacy_BFL_PACTRL) { | 1748 | if (dev->dev->bus->sprom.boardflags_lo & B43legacy_BFL_PACTRL) { |
1749 | b43legacy_write16(dev, B43legacy_MMIO_GPIO_MASK, | 1749 | b43legacy_write16(dev, B43legacy_MMIO_GPIO_MASK, |
1750 | b43legacy_read16(dev, | 1750 | b43legacy_read16(dev, |
1751 | B43legacy_MMIO_GPIO_MASK) | 1751 | B43legacy_MMIO_GPIO_MASK) |
@@ -2122,7 +2122,7 @@ static void b43legacy_periodic_every120sec(struct b43legacy_wldev *dev) | |||
2122 | static void b43legacy_periodic_every60sec(struct b43legacy_wldev *dev) | 2122 | static void b43legacy_periodic_every60sec(struct b43legacy_wldev *dev) |
2123 | { | 2123 | { |
2124 | b43legacy_phy_lo_mark_all_unused(dev); | 2124 | b43legacy_phy_lo_mark_all_unused(dev); |
2125 | if (dev->dev->bus->sprom.r1.boardflags_lo & B43legacy_BFL_RSSI) { | 2125 | if (dev->dev->bus->sprom.boardflags_lo & B43legacy_BFL_RSSI) { |
2126 | b43legacy_mac_suspend(dev); | 2126 | b43legacy_mac_suspend(dev); |
2127 | b43legacy_calc_nrssi_slope(dev); | 2127 | b43legacy_calc_nrssi_slope(dev); |
2128 | b43legacy_mac_enable(dev); | 2128 | b43legacy_mac_enable(dev); |
@@ -3064,7 +3064,7 @@ static int b43legacy_wireless_core_init(struct b43legacy_wldev *dev) | |||
3064 | hf |= B43legacy_HF_SYMW; | 3064 | hf |= B43legacy_HF_SYMW; |
3065 | if (phy->rev == 1) | 3065 | if (phy->rev == 1) |
3066 | hf |= B43legacy_HF_GDCW; | 3066 | hf |= B43legacy_HF_GDCW; |
3067 | if (sprom->r1.boardflags_lo & B43legacy_BFL_PACTRL) | 3067 | if (sprom->boardflags_lo & B43legacy_BFL_PACTRL) |
3068 | hf |= B43legacy_HF_OFDMPABOOST; | 3068 | hf |= B43legacy_HF_OFDMPABOOST; |
3069 | } else if (phy->type == B43legacy_PHYTYPE_B) { | 3069 | } else if (phy->type == B43legacy_PHYTYPE_B) { |
3070 | hf |= B43legacy_HF_SYMW; | 3070 | hf |= B43legacy_HF_SYMW; |
@@ -3556,12 +3556,12 @@ static void b43legacy_sprom_fixup(struct ssb_bus *bus) | |||
3556 | if (bus->boardinfo.vendor == PCI_VENDOR_ID_APPLE && | 3556 | if (bus->boardinfo.vendor == PCI_VENDOR_ID_APPLE && |
3557 | bus->boardinfo.type == 0x4E && | 3557 | bus->boardinfo.type == 0x4E && |
3558 | bus->boardinfo.rev > 0x40) | 3558 | bus->boardinfo.rev > 0x40) |
3559 | bus->sprom.r1.boardflags_lo |= B43legacy_BFL_PACTRL; | 3559 | bus->sprom.boardflags_lo |= B43legacy_BFL_PACTRL; |
3560 | 3560 | ||
3561 | /* Convert Antennagain values to Q5.2 */ | 3561 | /* Convert Antennagain values to Q5.2 */ |
3562 | if (bus->sprom.r1.antenna_gain_bg == 0xFF) | 3562 | if (bus->sprom.antenna_gain_bg == 0xFF) |
3563 | bus->sprom.r1.antenna_gain_bg = 2; /* if unset, use 2 dBm */ | 3563 | bus->sprom.antenna_gain_bg = 2; /* if unset, use 2 dBm */ |
3564 | bus->sprom.r1.antenna_gain_bg <<= 2; | 3564 | bus->sprom.antenna_gain_bg <<= 2; |
3565 | } | 3565 | } |
3566 | 3566 | ||
3567 | static void b43legacy_wireless_exit(struct ssb_device *dev, | 3567 | static void b43legacy_wireless_exit(struct ssb_device *dev, |
@@ -3596,10 +3596,10 @@ static int b43legacy_wireless_init(struct ssb_device *dev) | |||
3596 | hw->max_noise = -110; | 3596 | hw->max_noise = -110; |
3597 | hw->queues = 1; /* FIXME: hardware has more queues */ | 3597 | hw->queues = 1; /* FIXME: hardware has more queues */ |
3598 | SET_IEEE80211_DEV(hw, dev->dev); | 3598 | SET_IEEE80211_DEV(hw, dev->dev); |
3599 | if (is_valid_ether_addr(sprom->r1.et1mac)) | 3599 | if (is_valid_ether_addr(sprom->et1mac)) |
3600 | SET_IEEE80211_PERM_ADDR(hw, sprom->r1.et1mac); | 3600 | SET_IEEE80211_PERM_ADDR(hw, sprom->et1mac); |
3601 | else | 3601 | else |
3602 | SET_IEEE80211_PERM_ADDR(hw, sprom->r1.il0mac); | 3602 | SET_IEEE80211_PERM_ADDR(hw, sprom->il0mac); |
3603 | 3603 | ||
3604 | /* Get and initialize struct b43legacy_wl */ | 3604 | /* Get and initialize struct b43legacy_wl */ |
3605 | wl = hw_to_b43legacy_wl(hw); | 3605 | wl = hw_to_b43legacy_wl(hw); |