diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2007-11-09 17:57:18 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:04:42 -0500 |
commit | 95de2841aad971867851b59c0c5253ecc2e19832 (patch) | |
tree | df6a79322a1f7b8992d38ca7d02502e0ded31b3f /drivers | |
parent | 458414b2e3d9dd7ee4510d18c119a7ccd3b43ec5 (diff) |
b43: Convert to use of the new SPROM structure
The b43 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')
-rw-r--r-- | drivers/net/wireless/b43/leds.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/b43/lo.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/b43/main.c | 32 | ||||
-rw-r--r-- | drivers/net/wireless/b43/phy.c | 59 | ||||
-rw-r--r-- | drivers/net/wireless/b43/wa.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/b43/xmit.c | 2 |
6 files changed, 55 insertions, 56 deletions
diff --git a/drivers/net/wireless/b43/leds.c b/drivers/net/wireless/b43/leds.c index e04eba1f9308..4b590d8c65ff 100644 --- a/drivers/net/wireless/b43/leds.c +++ b/drivers/net/wireless/b43/leds.c | |||
@@ -190,10 +190,10 @@ void b43_leds_init(struct b43_wldev *dev) | |||
190 | enum b43_led_behaviour behaviour; | 190 | enum b43_led_behaviour behaviour; |
191 | bool activelow; | 191 | bool activelow; |
192 | 192 | ||
193 | sprom[0] = bus->sprom.r1.gpio0; | 193 | sprom[0] = bus->sprom.gpio0; |
194 | sprom[1] = bus->sprom.r1.gpio1; | 194 | sprom[1] = bus->sprom.gpio1; |
195 | sprom[2] = bus->sprom.r1.gpio2; | 195 | sprom[2] = bus->sprom.gpio2; |
196 | sprom[3] = bus->sprom.r1.gpio3; | 196 | sprom[3] = bus->sprom.gpio3; |
197 | 197 | ||
198 | for (i = 0; i < 4; i++) { | 198 | for (i = 0; i < 4; i++) { |
199 | if (sprom[i] == 0xFF) { | 199 | if (sprom[i] == 0xFF) { |
diff --git a/drivers/net/wireless/b43/lo.c b/drivers/net/wireless/b43/lo.c index 0a50fd584c19..88f35e67e226 100644 --- a/drivers/net/wireless/b43/lo.c +++ b/drivers/net/wireless/b43/lo.c | |||
@@ -264,8 +264,8 @@ static u16 lo_measure_feedthrough(struct b43_wldev *dev, | |||
264 | rfover |= pga; | 264 | rfover |= pga; |
265 | rfover |= lna; | 265 | rfover |= lna; |
266 | rfover |= trsw_rx; | 266 | rfover |= trsw_rx; |
267 | if ((dev->dev->bus->sprom.r1.boardflags_lo & B43_BFL_EXTLNA) && | 267 | if ((dev->dev->bus->sprom.boardflags_lo & B43_BFL_EXTLNA) |
268 | phy->rev > 6) | 268 | && phy->rev > 6) |
269 | rfover |= B43_PHY_RFOVERVAL_EXTLNA; | 269 | rfover |= B43_PHY_RFOVERVAL_EXTLNA; |
270 | 270 | ||
271 | b43_phy_write(dev, B43_PHY_PGACTL, 0xE300); | 271 | b43_phy_write(dev, B43_PHY_PGACTL, 0xE300); |
@@ -634,7 +634,7 @@ static void lo_measure_setup(struct b43_wldev *dev, | |||
634 | & 0xFFFC); | 634 | & 0xFFFC); |
635 | if (phy->type == B43_PHYTYPE_G) { | 635 | if (phy->type == B43_PHYTYPE_G) { |
636 | if ((phy->rev >= 7) && | 636 | if ((phy->rev >= 7) && |
637 | (sprom->r1.boardflags_lo & B43_BFL_EXTLNA)) { | 637 | (sprom->boardflags_lo & B43_BFL_EXTLNA)) { |
638 | b43_phy_write(dev, B43_PHY_RFOVER, 0x933); | 638 | b43_phy_write(dev, B43_PHY_RFOVER, 0x933); |
639 | } else { | 639 | } else { |
640 | b43_phy_write(dev, B43_PHY_RFOVER, 0x133); | 640 | b43_phy_write(dev, B43_PHY_RFOVER, 0x133); |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 72321d802f1d..16b413d11d19 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -1924,7 +1924,7 @@ static int b43_gpio_init(struct b43_wldev *dev) | |||
1924 | mask |= 0x0180; | 1924 | mask |= 0x0180; |
1925 | set |= 0x0180; | 1925 | set |= 0x0180; |
1926 | } | 1926 | } |
1927 | if (dev->dev->bus->sprom.r1.boardflags_lo & B43_BFL_PACTRL) { | 1927 | if (dev->dev->bus->sprom.boardflags_lo & B43_BFL_PACTRL) { |
1928 | b43_write16(dev, B43_MMIO_GPIO_MASK, | 1928 | b43_write16(dev, B43_MMIO_GPIO_MASK, |
1929 | b43_read16(dev, B43_MMIO_GPIO_MASK) | 1929 | b43_read16(dev, B43_MMIO_GPIO_MASK) |
1930 | | 0x0200); | 1930 | | 0x0200); |
@@ -2289,7 +2289,7 @@ static void b43_periodic_every60sec(struct b43_wldev *dev) | |||
2289 | 2289 | ||
2290 | if (!b43_has_hardware_pctl(phy)) | 2290 | if (!b43_has_hardware_pctl(phy)) |
2291 | b43_lo_g_ctl_mark_all_unused(dev); | 2291 | b43_lo_g_ctl_mark_all_unused(dev); |
2292 | if (dev->dev->bus->sprom.r1.boardflags_lo & B43_BFL_RSSI) { | 2292 | if (dev->dev->bus->sprom.boardflags_lo & B43_BFL_RSSI) { |
2293 | b43_mac_suspend(dev); | 2293 | b43_mac_suspend(dev); |
2294 | b43_calc_nrssi_slope(dev); | 2294 | b43_calc_nrssi_slope(dev); |
2295 | if ((phy->radio_ver == 0x2050) && (phy->radio_rev == 8)) { | 2295 | if ((phy->radio_ver == 0x2050) && (phy->radio_rev == 8)) { |
@@ -3208,13 +3208,13 @@ static void b43_bluetooth_coext_enable(struct b43_wldev *dev) | |||
3208 | struct ssb_sprom *sprom = &dev->dev->bus->sprom; | 3208 | struct ssb_sprom *sprom = &dev->dev->bus->sprom; |
3209 | u32 hf; | 3209 | u32 hf; |
3210 | 3210 | ||
3211 | if (!(sprom->r1.boardflags_lo & B43_BFL_BTCOEXIST)) | 3211 | if (!(sprom->boardflags_lo & B43_BFL_BTCOEXIST)) |
3212 | return; | 3212 | return; |
3213 | if (dev->phy.type != B43_PHYTYPE_B && !dev->phy.gmode) | 3213 | if (dev->phy.type != B43_PHYTYPE_B && !dev->phy.gmode) |
3214 | return; | 3214 | return; |
3215 | 3215 | ||
3216 | hf = b43_hf_read(dev); | 3216 | hf = b43_hf_read(dev); |
3217 | if (sprom->r1.boardflags_lo & B43_BFL_BTCMOD) | 3217 | if (sprom->boardflags_lo & B43_BFL_BTCMOD) |
3218 | hf |= B43_HF_BTCOEXALT; | 3218 | hf |= B43_HF_BTCOEXALT; |
3219 | else | 3219 | else |
3220 | hf |= B43_HF_BTCOEX; | 3220 | hf |= B43_HF_BTCOEX; |
@@ -3345,7 +3345,7 @@ static int b43_wireless_core_init(struct b43_wldev *dev) | |||
3345 | hf |= B43_HF_SYMW; | 3345 | hf |= B43_HF_SYMW; |
3346 | if (phy->rev == 1) | 3346 | if (phy->rev == 1) |
3347 | hf |= B43_HF_GDCW; | 3347 | hf |= B43_HF_GDCW; |
3348 | if (sprom->r1.boardflags_lo & B43_BFL_PACTRL) | 3348 | if (sprom->boardflags_lo & B43_BFL_PACTRL) |
3349 | hf |= B43_HF_OFDMPABOOST; | 3349 | hf |= B43_HF_OFDMPABOOST; |
3350 | } else if (phy->type == B43_PHYTYPE_B) { | 3350 | } else if (phy->type == B43_PHYTYPE_B) { |
3351 | hf |= B43_HF_SYMW; | 3351 | hf |= B43_HF_SYMW; |
@@ -3862,20 +3862,20 @@ static void b43_sprom_fixup(struct ssb_bus *bus) | |||
3862 | /* boardflags workarounds */ | 3862 | /* boardflags workarounds */ |
3863 | if (bus->boardinfo.vendor == SSB_BOARDVENDOR_DELL && | 3863 | if (bus->boardinfo.vendor == SSB_BOARDVENDOR_DELL && |
3864 | bus->chip_id == 0x4301 && bus->boardinfo.rev == 0x74) | 3864 | bus->chip_id == 0x4301 && bus->boardinfo.rev == 0x74) |
3865 | bus->sprom.r1.boardflags_lo |= B43_BFL_BTCOEXIST; | 3865 | bus->sprom.boardflags_lo |= B43_BFL_BTCOEXIST; |
3866 | if (bus->boardinfo.vendor == PCI_VENDOR_ID_APPLE && | 3866 | if (bus->boardinfo.vendor == PCI_VENDOR_ID_APPLE && |
3867 | bus->boardinfo.type == 0x4E && bus->boardinfo.rev > 0x40) | 3867 | bus->boardinfo.type == 0x4E && bus->boardinfo.rev > 0x40) |
3868 | bus->sprom.r1.boardflags_lo |= B43_BFL_PACTRL; | 3868 | bus->sprom.boardflags_lo |= B43_BFL_PACTRL; |
3869 | 3869 | ||
3870 | /* Handle case when gain is not set in sprom */ | 3870 | /* Handle case when gain is not set in sprom */ |
3871 | if (bus->sprom.r1.antenna_gain_a == 0xFF) | 3871 | if (bus->sprom.antenna_gain_a == 0xFF) |
3872 | bus->sprom.r1.antenna_gain_a = 2; | 3872 | bus->sprom.antenna_gain_a = 2; |
3873 | if (bus->sprom.r1.antenna_gain_bg == 0xFF) | 3873 | if (bus->sprom.antenna_gain_bg == 0xFF) |
3874 | bus->sprom.r1.antenna_gain_bg = 2; | 3874 | bus->sprom.antenna_gain_bg = 2; |
3875 | 3875 | ||
3876 | /* Convert Antennagain values to Q5.2 */ | 3876 | /* Convert Antennagain values to Q5.2 */ |
3877 | bus->sprom.r1.antenna_gain_a <<= 2; | 3877 | bus->sprom.antenna_gain_a <<= 2; |
3878 | bus->sprom.r1.antenna_gain_bg <<= 2; | 3878 | bus->sprom.antenna_gain_bg <<= 2; |
3879 | } | 3879 | } |
3880 | 3880 | ||
3881 | static void b43_wireless_exit(struct ssb_device *dev, struct b43_wl *wl) | 3881 | static void b43_wireless_exit(struct ssb_device *dev, struct b43_wl *wl) |
@@ -3908,10 +3908,10 @@ static int b43_wireless_init(struct ssb_device *dev) | |||
3908 | hw->max_noise = -110; | 3908 | hw->max_noise = -110; |
3909 | hw->queues = 1; /* FIXME: hardware has more queues */ | 3909 | hw->queues = 1; /* FIXME: hardware has more queues */ |
3910 | SET_IEEE80211_DEV(hw, dev->dev); | 3910 | SET_IEEE80211_DEV(hw, dev->dev); |
3911 | if (is_valid_ether_addr(sprom->r1.et1mac)) | 3911 | if (is_valid_ether_addr(sprom->et1mac)) |
3912 | SET_IEEE80211_PERM_ADDR(hw, sprom->r1.et1mac); | 3912 | SET_IEEE80211_PERM_ADDR(hw, sprom->et1mac); |
3913 | else | 3913 | else |
3914 | SET_IEEE80211_PERM_ADDR(hw, sprom->r1.il0mac); | 3914 | SET_IEEE80211_PERM_ADDR(hw, sprom->il0mac); |
3915 | 3915 | ||
3916 | /* Get and initialize struct b43_wl */ | 3916 | /* Get and initialize struct b43_wl */ |
3917 | wl = hw_to_b43_wl(hw); | 3917 | wl = hw_to_b43_wl(hw); |
diff --git a/drivers/net/wireless/b43/phy.c b/drivers/net/wireless/b43/phy.c index 7eb71d73663c..facc01c25f90 100644 --- a/drivers/net/wireless/b43/phy.c +++ b/drivers/net/wireless/b43/phy.c | |||
@@ -903,7 +903,7 @@ static void b43_phy_inita(struct b43_wldev *dev) | |||
903 | } | 903 | } |
904 | 904 | ||
905 | if ((phy->type == B43_PHYTYPE_G) && | 905 | if ((phy->type == B43_PHYTYPE_G) && |
906 | (dev->dev->bus->sprom.r1.boardflags_lo & B43_BFL_PACTRL)) { | 906 | (dev->dev->bus->sprom.boardflags_lo & B43_BFL_PACTRL)) { |
907 | b43_phy_write(dev, B43_PHY_OFDM(0x6E), | 907 | b43_phy_write(dev, B43_PHY_OFDM(0x6E), |
908 | (b43_phy_read(dev, B43_PHY_OFDM(0x6E)) | 908 | (b43_phy_read(dev, B43_PHY_OFDM(0x6E)) |
909 | & 0xE000) | 0x3CF); | 909 | & 0xE000) | 0x3CF); |
@@ -1006,7 +1006,7 @@ static void b43_phy_initb4(struct b43_wldev *dev) | |||
1006 | if (phy->radio_ver == 0x2050) | 1006 | if (phy->radio_ver == 0x2050) |
1007 | b43_phy_write(dev, 0x002A, 0x88C2); | 1007 | b43_phy_write(dev, 0x002A, 0x88C2); |
1008 | b43_set_txpower_g(dev, &phy->bbatt, &phy->rfatt, phy->tx_control); | 1008 | b43_set_txpower_g(dev, &phy->bbatt, &phy->rfatt, phy->tx_control); |
1009 | if (dev->dev->bus->sprom.r1.boardflags_lo & B43_BFL_RSSI) { | 1009 | if (dev->dev->bus->sprom.boardflags_lo & B43_BFL_RSSI) { |
1010 | b43_calc_nrssi_slope(dev); | 1010 | b43_calc_nrssi_slope(dev); |
1011 | b43_calc_nrssi_threshold(dev); | 1011 | b43_calc_nrssi_threshold(dev); |
1012 | } | 1012 | } |
@@ -1153,7 +1153,7 @@ static void b43_phy_initb6(struct b43_wldev *dev) | |||
1153 | b43_radio_write16(dev, 0x5A, 0x88); | 1153 | b43_radio_write16(dev, 0x5A, 0x88); |
1154 | b43_radio_write16(dev, 0x5B, 0x6B); | 1154 | b43_radio_write16(dev, 0x5B, 0x6B); |
1155 | b43_radio_write16(dev, 0x5C, 0x0F); | 1155 | b43_radio_write16(dev, 0x5C, 0x0F); |
1156 | if (dev->dev->bus->sprom.r1.boardflags_lo & B43_BFL_ALTIQ) { | 1156 | if (dev->dev->bus->sprom.boardflags_lo & B43_BFL_ALTIQ) { |
1157 | b43_radio_write16(dev, 0x5D, 0xFA); | 1157 | b43_radio_write16(dev, 0x5D, 0xFA); |
1158 | b43_radio_write16(dev, 0x5E, 0xD8); | 1158 | b43_radio_write16(dev, 0x5E, 0xD8); |
1159 | } else { | 1159 | } else { |
@@ -1245,7 +1245,7 @@ static void b43_phy_initb6(struct b43_wldev *dev) | |||
1245 | b43_phy_write(dev, 0x0062, 0x0007); | 1245 | b43_phy_write(dev, 0x0062, 0x0007); |
1246 | b43_radio_init2050(dev); | 1246 | b43_radio_init2050(dev); |
1247 | b43_lo_g_measure(dev); | 1247 | b43_lo_g_measure(dev); |
1248 | if (dev->dev->bus->sprom.r1.boardflags_lo & B43_BFL_RSSI) { | 1248 | if (dev->dev->bus->sprom.boardflags_lo & B43_BFL_RSSI) { |
1249 | b43_calc_nrssi_slope(dev); | 1249 | b43_calc_nrssi_slope(dev); |
1250 | b43_calc_nrssi_threshold(dev); | 1250 | b43_calc_nrssi_threshold(dev); |
1251 | } | 1251 | } |
@@ -1365,7 +1365,7 @@ static void b43_calc_loopback_gain(struct b43_wldev *dev) | |||
1365 | b43_phy_write(dev, B43_PHY_RFOVERVAL, | 1365 | b43_phy_write(dev, B43_PHY_RFOVERVAL, |
1366 | b43_phy_read(dev, B43_PHY_RFOVERVAL) & 0xCFFF); | 1366 | b43_phy_read(dev, B43_PHY_RFOVERVAL) & 0xCFFF); |
1367 | 1367 | ||
1368 | if (dev->dev->bus->sprom.r1.boardflags_lo & B43_BFL_EXTLNA) { | 1368 | if (dev->dev->bus->sprom.boardflags_lo & B43_BFL_EXTLNA) { |
1369 | if (phy->rev >= 7) { | 1369 | if (phy->rev >= 7) { |
1370 | b43_phy_write(dev, B43_PHY_RFOVER, | 1370 | b43_phy_write(dev, B43_PHY_RFOVER, |
1371 | b43_phy_read(dev, B43_PHY_RFOVER) | 1371 | b43_phy_read(dev, B43_PHY_RFOVER) |
@@ -1532,7 +1532,7 @@ static void b43_phy_initg(struct b43_wldev *dev) | |||
1532 | & 0x0FFF) | (phy->lo_control-> | 1532 | & 0x0FFF) | (phy->lo_control-> |
1533 | tx_bias << 12)); | 1533 | tx_bias << 12)); |
1534 | } | 1534 | } |
1535 | if (dev->dev->bus->sprom.r1.boardflags_lo & B43_BFL_PACTRL) | 1535 | if (dev->dev->bus->sprom.boardflags_lo & B43_BFL_PACTRL) |
1536 | b43_phy_write(dev, B43_PHY_BASE(0x2E), 0x8075); | 1536 | b43_phy_write(dev, B43_PHY_BASE(0x2E), 0x8075); |
1537 | else | 1537 | else |
1538 | b43_phy_write(dev, B43_PHY_BASE(0x2E), 0x807F); | 1538 | b43_phy_write(dev, B43_PHY_BASE(0x2E), 0x807F); |
@@ -1546,7 +1546,7 @@ static void b43_phy_initg(struct b43_wldev *dev) | |||
1546 | b43_phy_write(dev, B43_PHY_LO_MASK, 0x8078); | 1546 | b43_phy_write(dev, B43_PHY_LO_MASK, 0x8078); |
1547 | } | 1547 | } |
1548 | 1548 | ||
1549 | if (!(dev->dev->bus->sprom.r1.boardflags_lo & B43_BFL_RSSI)) { | 1549 | if (!(dev->dev->bus->sprom.boardflags_lo & B43_BFL_RSSI)) { |
1550 | /* The specs state to update the NRSSI LT with | 1550 | /* The specs state to update the NRSSI LT with |
1551 | * the value 0x7FFFFFFF here. I think that is some weird | 1551 | * the value 0x7FFFFFFF here. I think that is some weird |
1552 | * compiler optimization in the original driver. | 1552 | * compiler optimization in the original driver. |
@@ -1756,16 +1756,15 @@ void b43_phy_xmitpower(struct b43_wldev *dev) | |||
1756 | estimated_pwr = | 1756 | estimated_pwr = |
1757 | b43_phy_estimate_power_out(dev, average); | 1757 | b43_phy_estimate_power_out(dev, average); |
1758 | 1758 | ||
1759 | max_pwr = dev->dev->bus->sprom.r1.maxpwr_bg; | 1759 | max_pwr = dev->dev->bus->sprom.maxpwr_bg; |
1760 | if ((dev->dev->bus->sprom.r1. | 1760 | if ((dev->dev->bus->sprom.boardflags_lo |
1761 | boardflags_lo & B43_BFL_PACTRL) | 1761 | & B43_BFL_PACTRL) && (phy->type == B43_PHYTYPE_G)) |
1762 | && (phy->type == B43_PHYTYPE_G)) | ||
1763 | max_pwr -= 0x3; | 1762 | max_pwr -= 0x3; |
1764 | if (unlikely(max_pwr <= 0)) { | 1763 | if (unlikely(max_pwr <= 0)) { |
1765 | b43warn(dev->wl, | 1764 | b43warn(dev->wl, |
1766 | "Invalid max-TX-power value in SPROM.\n"); | 1765 | "Invalid max-TX-power value in SPROM.\n"); |
1767 | max_pwr = 60; /* fake it */ | 1766 | max_pwr = 60; /* fake it */ |
1768 | dev->dev->bus->sprom.r1.maxpwr_bg = max_pwr; | 1767 | dev->dev->bus->sprom.maxpwr_bg = max_pwr; |
1769 | } | 1768 | } |
1770 | 1769 | ||
1771 | /*TODO: | 1770 | /*TODO: |
@@ -1823,7 +1822,7 @@ void b43_phy_xmitpower(struct b43_wldev *dev) | |||
1823 | B43_TXCTL_TXMIX; | 1822 | B43_TXCTL_TXMIX; |
1824 | rfatt += 2; | 1823 | rfatt += 2; |
1825 | bbatt += 2; | 1824 | bbatt += 2; |
1826 | } else if (dev->dev->bus->sprom.r1. | 1825 | } else if (dev->dev->bus->sprom. |
1827 | boardflags_lo & | 1826 | boardflags_lo & |
1828 | B43_BFL_PACTRL) { | 1827 | B43_BFL_PACTRL) { |
1829 | bbatt += 4 * (rfatt - 2); | 1828 | bbatt += 4 * (rfatt - 2); |
@@ -1899,13 +1898,13 @@ int b43_phy_init_tssi2dbm_table(struct b43_wldev *dev) | |||
1899 | s8 *dyn_tssi2dbm; | 1898 | s8 *dyn_tssi2dbm; |
1900 | 1899 | ||
1901 | if (phy->type == B43_PHYTYPE_A) { | 1900 | if (phy->type == B43_PHYTYPE_A) { |
1902 | pab0 = (s16) (dev->dev->bus->sprom.r1.pa1b0); | 1901 | pab0 = (s16) (dev->dev->bus->sprom.pa1b0); |
1903 | pab1 = (s16) (dev->dev->bus->sprom.r1.pa1b1); | 1902 | pab1 = (s16) (dev->dev->bus->sprom.pa1b1); |
1904 | pab2 = (s16) (dev->dev->bus->sprom.r1.pa1b2); | 1903 | pab2 = (s16) (dev->dev->bus->sprom.pa1b2); |
1905 | } else { | 1904 | } else { |
1906 | pab0 = (s16) (dev->dev->bus->sprom.r1.pa0b0); | 1905 | pab0 = (s16) (dev->dev->bus->sprom.pa0b0); |
1907 | pab1 = (s16) (dev->dev->bus->sprom.r1.pa0b1); | 1906 | pab1 = (s16) (dev->dev->bus->sprom.pa0b1); |
1908 | pab2 = (s16) (dev->dev->bus->sprom.r1.pa0b2); | 1907 | pab2 = (s16) (dev->dev->bus->sprom.pa0b2); |
1909 | } | 1908 | } |
1910 | 1909 | ||
1911 | if ((dev->dev->bus->chip_id == 0x4301) && (phy->radio_ver != 0x2050)) { | 1910 | if ((dev->dev->bus->chip_id == 0x4301) && (phy->radio_ver != 0x2050)) { |
@@ -1918,17 +1917,17 @@ int b43_phy_init_tssi2dbm_table(struct b43_wldev *dev) | |||
1918 | pab0 != -1 && pab1 != -1 && pab2 != -1) { | 1917 | pab0 != -1 && pab1 != -1 && pab2 != -1) { |
1919 | /* The pabX values are set in SPROM. Use them. */ | 1918 | /* The pabX values are set in SPROM. Use them. */ |
1920 | if (phy->type == B43_PHYTYPE_A) { | 1919 | if (phy->type == B43_PHYTYPE_A) { |
1921 | if ((s8) dev->dev->bus->sprom.r1.itssi_a != 0 && | 1920 | if ((s8) dev->dev->bus->sprom.itssi_a != 0 && |
1922 | (s8) dev->dev->bus->sprom.r1.itssi_a != -1) | 1921 | (s8) dev->dev->bus->sprom.itssi_a != -1) |
1923 | phy->tgt_idle_tssi = | 1922 | phy->tgt_idle_tssi = |
1924 | (s8) (dev->dev->bus->sprom.r1.itssi_a); | 1923 | (s8) (dev->dev->bus->sprom.itssi_a); |
1925 | else | 1924 | else |
1926 | phy->tgt_idle_tssi = 62; | 1925 | phy->tgt_idle_tssi = 62; |
1927 | } else { | 1926 | } else { |
1928 | if ((s8) dev->dev->bus->sprom.r1.itssi_bg != 0 && | 1927 | if ((s8) dev->dev->bus->sprom.itssi_bg != 0 && |
1929 | (s8) dev->dev->bus->sprom.r1.itssi_bg != -1) | 1928 | (s8) dev->dev->bus->sprom.itssi_bg != -1) |
1930 | phy->tgt_idle_tssi = | 1929 | phy->tgt_idle_tssi = |
1931 | (s8) (dev->dev->bus->sprom.r1.itssi_bg); | 1930 | (s8) (dev->dev->bus->sprom.itssi_bg); |
1932 | else | 1931 | else |
1933 | phy->tgt_idle_tssi = 62; | 1932 | phy->tgt_idle_tssi = 62; |
1934 | } | 1933 | } |
@@ -2834,7 +2833,7 @@ void b43_calc_nrssi_threshold(struct b43_wldev *dev) | |||
2834 | if (phy->radio_ver != 0x2050) | 2833 | if (phy->radio_ver != 0x2050) |
2835 | return; | 2834 | return; |
2836 | if (! | 2835 | if (! |
2837 | (dev->dev->bus->sprom.r1. | 2836 | (dev->dev->bus->sprom. |
2838 | boardflags_lo & B43_BFL_RSSI)) | 2837 | boardflags_lo & B43_BFL_RSSI)) |
2839 | return; | 2838 | return; |
2840 | 2839 | ||
@@ -2865,7 +2864,7 @@ void b43_calc_nrssi_threshold(struct b43_wldev *dev) | |||
2865 | } | 2864 | } |
2866 | case B43_PHYTYPE_G: | 2865 | case B43_PHYTYPE_G: |
2867 | if (!phy->gmode || | 2866 | if (!phy->gmode || |
2868 | !(dev->dev->bus->sprom.r1.boardflags_lo & B43_BFL_RSSI)) { | 2867 | !(dev->dev->bus->sprom.boardflags_lo & B43_BFL_RSSI)) { |
2869 | tmp16 = b43_nrssi_hw_read(dev, 0x20); | 2868 | tmp16 = b43_nrssi_hw_read(dev, 0x20); |
2870 | if (tmp16 >= 0x20) | 2869 | if (tmp16 >= 0x20) |
2871 | tmp16 -= 0x40; | 2870 | tmp16 -= 0x40; |
@@ -3387,7 +3386,7 @@ static u16 radio2050_rfover_val(struct b43_wldev *dev, | |||
3387 | } | 3386 | } |
3388 | 3387 | ||
3389 | if ((phy->rev < 7) || | 3388 | if ((phy->rev < 7) || |
3390 | !(sprom->r1.boardflags_lo & B43_BFL_EXTLNA)) { | 3389 | !(sprom->boardflags_lo & B43_BFL_EXTLNA)) { |
3391 | if (phy_register == B43_PHY_RFOVER) { | 3390 | if (phy_register == B43_PHY_RFOVER) { |
3392 | return 0x1B3; | 3391 | return 0x1B3; |
3393 | } else if (phy_register == B43_PHY_RFOVERVAL) { | 3392 | } else if (phy_register == B43_PHY_RFOVERVAL) { |
@@ -3427,7 +3426,7 @@ static u16 radio2050_rfover_val(struct b43_wldev *dev, | |||
3427 | } | 3426 | } |
3428 | } else { | 3427 | } else { |
3429 | if ((phy->rev < 7) || | 3428 | if ((phy->rev < 7) || |
3430 | !(sprom->r1.boardflags_lo & B43_BFL_EXTLNA)) { | 3429 | !(sprom->boardflags_lo & B43_BFL_EXTLNA)) { |
3431 | if (phy_register == B43_PHY_RFOVER) { | 3430 | if (phy_register == B43_PHY_RFOVER) { |
3432 | return 0x1B3; | 3431 | return 0x1B3; |
3433 | } else if (phy_register == B43_PHY_RFOVERVAL) { | 3432 | } else if (phy_register == B43_PHY_RFOVERVAL) { |
@@ -3906,7 +3905,7 @@ int b43_radio_selectchannel(struct b43_wldev *dev, | |||
3906 | b43_write16(dev, B43_MMIO_CHANNEL, channel2freq_bg(channel)); | 3905 | b43_write16(dev, B43_MMIO_CHANNEL, channel2freq_bg(channel)); |
3907 | 3906 | ||
3908 | if (channel == 14) { | 3907 | if (channel == 14) { |
3909 | if (dev->dev->bus->sprom.r1.country_code == | 3908 | if (dev->dev->bus->sprom.country_code == |
3910 | SSB_SPROM1CCODE_JAPAN) | 3909 | SSB_SPROM1CCODE_JAPAN) |
3911 | b43_hf_write(dev, | 3910 | b43_hf_write(dev, |
3912 | b43_hf_read(dev) & ~B43_HF_ACPR); | 3911 | b43_hf_read(dev) & ~B43_HF_ACPR); |
diff --git a/drivers/net/wireless/b43/wa.c b/drivers/net/wireless/b43/wa.c index b70992aa66bc..b3df1ba0e544 100644 --- a/drivers/net/wireless/b43/wa.c +++ b/drivers/net/wireless/b43/wa.c | |||
@@ -527,7 +527,7 @@ static void b43_wa_boards_g(struct b43_wldev *dev) | |||
527 | } else { | 527 | } else { |
528 | b43_ofdmtab_write16(dev, B43_OFDMTAB_GAINX, 1, 0x0002); | 528 | b43_ofdmtab_write16(dev, B43_OFDMTAB_GAINX, 1, 0x0002); |
529 | b43_ofdmtab_write16(dev, B43_OFDMTAB_GAINX, 2, 0x0001); | 529 | b43_ofdmtab_write16(dev, B43_OFDMTAB_GAINX, 2, 0x0001); |
530 | if ((bus->sprom.r1.boardflags_lo & B43_BFL_EXTLNA) && | 530 | if ((bus->sprom.boardflags_lo & B43_BFL_EXTLNA) && |
531 | (phy->rev >= 7)) { | 531 | (phy->rev >= 7)) { |
532 | b43_phy_write(dev, B43_PHY_EXTG(0x11), | 532 | b43_phy_write(dev, B43_PHY_EXTG(0x11), |
533 | b43_phy_read(dev, B43_PHY_EXTG(0x11)) & 0xF7FF); | 533 | b43_phy_read(dev, B43_PHY_EXTG(0x11)) & 0xF7FF); |
@@ -540,7 +540,7 @@ static void b43_wa_boards_g(struct b43_wldev *dev) | |||
540 | } | 540 | } |
541 | } | 541 | } |
542 | } | 542 | } |
543 | if (bus->sprom.r1.boardflags_lo & B43_BFL_FEM) { | 543 | if (bus->sprom.boardflags_lo & B43_BFL_FEM) { |
544 | b43_phy_write(dev, B43_PHY_GTABCTL, 0x3120); | 544 | b43_phy_write(dev, B43_PHY_GTABCTL, 0x3120); |
545 | b43_phy_write(dev, B43_PHY_GTABDATA, 0xC480); | 545 | b43_phy_write(dev, B43_PHY_GTABDATA, 0xC480); |
546 | } | 546 | } |
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c index d36603d499fb..557abe1f1a05 100644 --- a/drivers/net/wireless/b43/xmit.c +++ b/drivers/net/wireless/b43/xmit.c | |||
@@ -385,7 +385,7 @@ static s8 b43_rssi_postprocess(struct b43_wldev *dev, | |||
385 | else | 385 | else |
386 | tmp -= 3; | 386 | tmp -= 3; |
387 | } else { | 387 | } else { |
388 | if (dev->dev->bus->sprom.r1. | 388 | if (dev->dev->bus->sprom. |
389 | boardflags_lo & B43_BFL_RSSI) { | 389 | boardflags_lo & B43_BFL_RSSI) { |
390 | if (in_rssi > 63) | 390 | if (in_rssi > 63) |
391 | in_rssi = 63; | 391 | in_rssi = 63; |