summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/phy_a.c
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2009-02-20 19:22:36 +0100
committerJohn W. Linville <linville@tuxdriver.com>2009-02-27 14:52:52 -0500
commite59be0b5299ce327d67cfca737b839ef98e0da0e (patch)
treec85dc5b69d3bdeb1641ebfc7c6cd2ca67d8c143d /drivers/net/wireless/b43/phy_a.c
parent9b02f419a7dbd956b2c293e5cb1790b6b687f367 (diff)
downloadblackbird-op-linux-e59be0b5299ce327d67cfca737b839ef98e0da0e.tar.gz
blackbird-op-linux-e59be0b5299ce327d67cfca737b839ef98e0da0e.zip
b43: Convert usage of b43_phy_set()
This patch converts code to use the new b43_phy_set() API. The semantic patch that makes this change is as follows: // <smpl> @@ expression dev, addr, set; @@ -b43_phy_write(dev, addr, b43_phy_read(dev, addr) | set); +b43_phy_set(dev, addr, set); // </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.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/net/wireless/b43/phy_a.c b/drivers/net/wireless/b43/phy_a.c
index 7fe9d1701624..9dfba14c8988 100644
--- a/drivers/net/wireless/b43/phy_a.c
+++ b/drivers/net/wireless/b43/phy_a.c
@@ -226,8 +226,7 @@ static void b43_phy_ww(struct b43_wldev *dev)
b43_phy_write(dev, B43_PHY_CRS0,
b43_phy_read(dev, B43_PHY_CRS0) & ~B43_PHY_CRS0_EN);
- b43_phy_write(dev, B43_PHY_OFDM(0x1B),
- b43_phy_read(dev, B43_PHY_OFDM(0x1B)) | 0x1000);
+ 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);
b43_radio_write16(dev, 0x0009,
@@ -276,8 +275,7 @@ static void b43_phy_ww(struct b43_wldev *dev)
b43_ofdmtab_write16(dev, B43_OFDMTAB_AGC1, 0x0E, 0x0011);
b43_ofdmtab_write16(dev, B43_OFDMTAB_AGC1, 0x0F, 0x0013);
b43_phy_write(dev, B43_PHY_OFDM(0x33), 0x5030);
- b43_phy_write(dev, B43_PHY_CRS0,
- b43_phy_read(dev, B43_PHY_CRS0) | B43_PHY_CRS0_EN);
+ b43_phy_set(dev, B43_PHY_CRS0, B43_PHY_CRS0_EN);
}
static void hardware_pctl_init_aphy(struct b43_wldev *dev)
@@ -303,8 +301,7 @@ void b43_phy_inita(struct b43_wldev *dev)
b43_phy_write(dev, B43_PHY_OFDM(0x1B),
b43_phy_read(dev, B43_PHY_OFDM(0x1B)) & ~0x1000);
if (b43_phy_read(dev, B43_PHY_ENCORE) & B43_PHY_ENCORE_EN)
- b43_phy_write(dev, B43_PHY_ENCORE,
- b43_phy_read(dev, B43_PHY_ENCORE) | 0x0010);
+ b43_phy_set(dev, B43_PHY_ENCORE, 0x0010);
else
b43_phy_write(dev, B43_PHY_ENCORE,
b43_phy_read(dev, B43_PHY_ENCORE) & ~0x1010);
@@ -314,12 +311,10 @@ void b43_phy_inita(struct b43_wldev *dev)
if (phy->type == B43_PHYTYPE_A) {
if (phy->gmode && (phy->rev < 3))
- b43_phy_write(dev, 0x0034,
- b43_phy_read(dev, 0x0034) | 0x0001);
+ b43_phy_set(dev, 0x0034, 0x0001);
b43_phy_rssiagc(dev, 0);
- b43_phy_write(dev, B43_PHY_CRS0,
- b43_phy_read(dev, B43_PHY_CRS0) | B43_PHY_CRS0_EN);
+ b43_phy_set(dev, B43_PHY_CRS0, B43_PHY_CRS0_EN);
b43_radio_init2060(dev);
@@ -526,8 +521,8 @@ static void b43_aphy_op_software_rfkill(struct b43_wldev *dev,
} else {
b43_radio_write16(dev, 0x0004, 0x00FF);
b43_radio_write16(dev, 0x0005, 0x00FB);
- b43_phy_write(dev, 0x0010, b43_phy_read(dev, 0x0010) | 0x0008);
- b43_phy_write(dev, 0x0011, b43_phy_read(dev, 0x0011) | 0x0008);
+ b43_phy_set(dev, 0x0010, 0x0008);
+ b43_phy_set(dev, 0x0011, 0x0008);
}
}
OpenPOWER on IntegriCloud