summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/phy_g.c
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2009-02-20 19:30:10 +0100
committerJohn W. Linville <linville@tuxdriver.com>2009-02-27 14:52:53 -0500
commit3718582a663e035af5d2634cd537a012e20cdb3f (patch)
treea0f8656edeecd293cfc454c03454e8a1ed46b678 /drivers/net/wireless/b43/phy_g.c
parent4cf507696ae41950cd430e7534180fddd624b3cd (diff)
downloadop-kernel-dev-3718582a663e035af5d2634cd537a012e20cdb3f.zip
op-kernel-dev-3718582a663e035af5d2634cd537a012e20cdb3f.tar.gz
b43: Convert usage of b43_radio_mask()
This patch converts code to use the new b43_radio_mask() API. The semantic patch that makes this change is as follows: // <smpl> @@ expression dev, addr, mask; @@ -b43_radio_write16(dev, addr, b43_radio_read16(dev, addr) & mask); +b43_radio_mask(dev, addr, mask); // </smpl> Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/phy_g.c')
-rw-r--r--drivers/net/wireless/b43/phy_g.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/net/wireless/b43/phy_g.c b/drivers/net/wireless/b43/phy_g.c
index c8e4342..8bad858 100644
--- a/drivers/net/wireless/b43/phy_g.c
+++ b/drivers/net/wireless/b43/phy_g.c
@@ -489,8 +489,7 @@ static void b43_calc_nrssi_offset(struct b43_wldev *dev)
if (saved == 0xFFFF)
saved = 4;
} else {
- b43_radio_write16(dev, 0x007A,
- b43_radio_read16(dev, 0x007A) & 0x007F);
+ b43_radio_mask(dev, 0x007A, 0x007F);
if (phy->rev != 1) { /* Not in specs, but needed to prevent PPC machine check */
b43_phy_set(dev, 0x0814, 0x0001);
b43_phy_mask(dev, 0x0815, 0xFFFE);
@@ -626,8 +625,7 @@ static void b43_calc_nrssi_slope(struct b43_wldev *dev)
}
b43_radio_set(dev, 0x007A, 0x0070);
b43_set_all_gains(dev, 0, 8, 0);
- b43_radio_write16(dev, 0x007A,
- b43_radio_read16(dev, 0x007A) & 0x00F7);
+ b43_radio_mask(dev, 0x007A, 0x00F7);
if (phy->rev >= 2) {
b43_phy_maskset(dev, 0x0811, 0xFFCF, 0x0030);
b43_phy_maskset(dev, 0x0812, 0xFFCF, 0x0010);
@@ -639,8 +637,7 @@ static void b43_calc_nrssi_slope(struct b43_wldev *dev)
if (nrssi0 >= 0x0020)
nrssi0 -= 0x0040;
- b43_radio_write16(dev, 0x007A,
- b43_radio_read16(dev, 0x007A) & 0x007F);
+ b43_radio_mask(dev, 0x007A, 0x007F);
if (phy->rev >= 2) {
b43_phy_maskset(dev, 0x0003, 0xFF9F, 0x0040);
}
@@ -1803,8 +1800,7 @@ static void b43_calc_loopback_gain(struct b43_wldev *dev)
b43_phy_set(dev, B43_PHY_RFOVERVAL, 0x8000);
}
}
- b43_radio_write16(dev, 0x7A, b43_radio_read16(dev, 0x7A)
- & 0x00F7);
+ b43_radio_mask(dev, 0x7A, 0x00F7);
j = 0;
loop_i_max = (phy->radio_rev == 8) ? 15 : 9;
@@ -1992,9 +1988,7 @@ static void b43_phy_init_pctl(struct b43_wldev *dev)
}
}
if (phy->radio_ver == 0x2050 && phy->analog == 0) {
- b43_radio_write16(dev, 0x0076,
- b43_radio_read16(dev, 0x0076)
- & 0xFF7B);
+ b43_radio_mask(dev, 0x0076, 0xFF7B);
} else {
b43_set_txpower_g(dev, &old_bbatt,
&old_rfatt, old_tx_control);
OpenPOWER on IntegriCloud