summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/b43/phy_a.c
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2009-02-20 21:25:05 +0300
committerJohn W. Linville <linville@tuxdriver.com>2009-02-27 22:52:52 +0300
commitac1ea3959f4c6694e92fe18a2ec72cfbed0c71fa (patch)
tree83467238eea281bcbacad41791e877167e6df8fc /drivers/net/wireless/b43/phy_a.c
parente59be0b5299ce327d67cfca737b839ef98e0da0e (diff)
downloadlinux-ac1ea3959f4c6694e92fe18a2ec72cfbed0c71fa.tar.xz
b43: Convert usage of b43_phy_mask()
This patch converts code to use the new b43_phy_mask() API. The semantic patch that makes this change is as follows: // <smpl> @@ expression dev, addr, mask; @@ -b43_phy_write(dev, addr, b43_phy_read(dev, addr) & mask); +b43_phy_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_a.c')
-rw-r--r--drivers/net/wireless/b43/phy_a.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/wireless/b43/phy_a.c b/drivers/net/wireless/b43/phy_a.c
index 9dfba14c8988..9bc1957cf37e 100644
--- a/drivers/net/wireless/b43/phy_a.c
+++ b/drivers/net/wireless/b43/phy_a.c
@@ -224,8 +224,7 @@ static void b43_phy_ww(struct b43_wldev *dev)
u16 b, curr_s, best_s = 0xFFFF;
int i;
- b43_phy_write(dev, B43_PHY_CRS0,
- b43_phy_read(dev, B43_PHY_CRS0) & ~B43_PHY_CRS0_EN);
+ b43_phy_mask(dev, B43_PHY_CRS0, ~B43_PHY_CRS0_EN);
b43_phy_set(dev, B43_PHY_OFDM(0x1B), 0x1000);
b43_phy_write(dev, B43_PHY_OFDM(0x82),
(b43_phy_read(dev, B43_PHY_OFDM(0x82)) & 0xF0FF) | 0x0300);
@@ -298,13 +297,11 @@ void b43_phy_inita(struct b43_wldev *dev)
if (phy->rev >= 6) {
if (phy->type == B43_PHYTYPE_A)
- b43_phy_write(dev, B43_PHY_OFDM(0x1B),
- b43_phy_read(dev, B43_PHY_OFDM(0x1B)) & ~0x1000);
+ b43_phy_mask(dev, B43_PHY_OFDM(0x1B), ~0x1000);
if (b43_phy_read(dev, B43_PHY_ENCORE) & B43_PHY_ENCORE_EN)
b43_phy_set(dev, B43_PHY_ENCORE, 0x0010);
else
- b43_phy_write(dev, B43_PHY_ENCORE,
- b43_phy_read(dev, B43_PHY_ENCORE) & ~0x1010);
+ b43_phy_mask(dev, B43_PHY_ENCORE, ~0x1010);
}
b43_wa_all(dev);
@@ -515,8 +512,8 @@ static void b43_aphy_op_software_rfkill(struct b43_wldev *dev,
return;
b43_radio_write16(dev, 0x0004, 0x00C0);
b43_radio_write16(dev, 0x0005, 0x0008);
- b43_phy_write(dev, 0x0010, b43_phy_read(dev, 0x0010) & 0xFFF7);
- b43_phy_write(dev, 0x0011, b43_phy_read(dev, 0x0011) & 0xFFF7);
+ b43_phy_mask(dev, 0x0010, 0xFFF7);
+ b43_phy_mask(dev, 0x0011, 0xFFF7);
b43_radio_init2060(dev);
} else {
b43_radio_write16(dev, 0x0004, 0x00FF);