diff options
author | Michael Buesch <mb@bu3sch.de> | 2009-02-20 19:25:05 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-27 14:52:52 -0500 |
commit | ac1ea3959f4c6694e92fe18a2ec72cfbed0c71fa (patch) | |
tree | 83467238eea281bcbacad41791e877167e6df8fc /drivers/net/wireless/b43/wa.c | |
parent | e59be0b5299ce327d67cfca737b839ef98e0da0e (diff) | |
download | linux-ac1ea3959f4c6694e92fe18a2ec72cfbed0c71fa.tar.gz linux-ac1ea3959f4c6694e92fe18a2ec72cfbed0c71fa.tar.bz2 linux-ac1ea3959f4c6694e92fe18a2ec72cfbed0c71fa.zip |
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/wa.c')
-rw-r--r-- | drivers/net/wireless/b43/wa.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/net/wireless/b43/wa.c b/drivers/net/wireless/b43/wa.c index fe7a7de046fe..701dff84e997 100644 --- a/drivers/net/wireless/b43/wa.c +++ b/drivers/net/wireless/b43/wa.c @@ -62,8 +62,7 @@ void b43_wa_initgains(struct b43_wldev *dev) struct b43_phy *phy = &dev->phy; b43_phy_write(dev, B43_PHY_LNAHPFCTL, 0x1FF9); - b43_phy_write(dev, B43_PHY_LPFGAINCTL, - b43_phy_read(dev, B43_PHY_LPFGAINCTL) & 0xFF0F); + b43_phy_mask(dev, B43_PHY_LPFGAINCTL, 0xFF0F); if (phy->rev <= 2) b43_ofdmtab_write16(dev, B43_OFDMTAB_LPFGAIN, 0, 0x1FBF); b43_radio_write16(dev, 0x0002, 0x1FBF); @@ -86,7 +85,7 @@ void b43_wa_initgains(struct b43_wldev *dev) static void b43_wa_divider(struct b43_wldev *dev) { - b43_phy_write(dev, 0x002B, b43_phy_read(dev, 0x002B) & ~0x0100); + b43_phy_mask(dev, 0x002B, ~0x0100); b43_phy_write(dev, 0x008E, 0x58C1); } @@ -433,8 +432,7 @@ static void b43_wa_altagc(struct b43_wldev *dev) b43_phy_write(dev, B43_PHY_OFDM(0x1B), (b43_phy_read(dev, B43_PHY_OFDM(0x1B)) & ~0x001E) | 0x0002); } else { - b43_phy_write(dev, B43_PHY_OFDM(0x1B), - b43_phy_read(dev, B43_PHY_OFDM(0x1B)) & ~0x001E); + b43_phy_mask(dev, B43_PHY_OFDM(0x1B), ~0x001E); b43_phy_write(dev, B43_PHY_OFDM(0x1F), 0x287A); b43_phy_write(dev, B43_PHY_LPFGAINCTL, (b43_phy_read(dev, B43_PHY_LPFGAINCTL) & ~0x000F) | 0x0004); @@ -465,10 +463,8 @@ static void b43_wa_altagc(struct b43_wldev *dev) b43_ofdmtab_write16(dev, B43_OFDMTAB_AGC3, 3, 28); } if (phy->rev >= 6) { - b43_phy_write(dev, B43_PHY_OFDM(0x26), - b43_phy_read(dev, B43_PHY_OFDM(0x26)) & ~0x0003); - b43_phy_write(dev, B43_PHY_OFDM(0x26), - b43_phy_read(dev, B43_PHY_OFDM(0x26)) & ~0x1000); + b43_phy_mask(dev, B43_PHY_OFDM(0x26), ~0x0003); + b43_phy_mask(dev, B43_PHY_OFDM(0x26), ~0x1000); } b43_phy_read(dev, B43_PHY_VERSION_OFDM); /* Dummy read */ } @@ -534,8 +530,7 @@ static void b43_wa_boards_g(struct b43_wldev *dev) b43_ofdmtab_write16(dev, B43_OFDMTAB_GAINX, 2, 0x0001); if ((bus->sprom.boardflags_lo & B43_BFL_EXTLNA) && (phy->rev >= 7)) { - b43_phy_write(dev, B43_PHY_EXTG(0x11), - b43_phy_read(dev, B43_PHY_EXTG(0x11)) & 0xF7FF); + b43_phy_mask(dev, B43_PHY_EXTG(0x11), 0xF7FF); b43_ofdmtab_write16(dev, B43_OFDMTAB_GAINX, 0x0020, 0x0001); b43_ofdmtab_write16(dev, B43_OFDMTAB_GAINX, 0x0021, 0x0001); b43_ofdmtab_write16(dev, B43_OFDMTAB_GAINX, 0x0022, 0x0001); |