diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2012-01-02 13:31:21 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-01-24 14:06:05 -0500 |
commit | 5056635c10151970d87ae256b7f52f056291799e (patch) | |
tree | ce2c794604507112e2da0202d755f9f85a097451 /drivers/net/wireless/b43/phy_n.c | |
parent | 507f9a71846a3d25d0e5322754da6b65adceda80 (diff) |
b43: add maskset helpers
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/phy_n.c')
-rw-r--r-- | drivers/net/wireless/b43/phy_n.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index bf5a43855358..9530f12c0282 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c | |||
@@ -3968,13 +3968,10 @@ static void b43_nphy_superswitch_init(struct b43_wldev *dev, bool init) | |||
3968 | #endif | 3968 | #endif |
3969 | } | 3969 | } |
3970 | 3970 | ||
3971 | b43_write32(dev, B43_MMIO_MACCTL, | 3971 | b43_maskset32(dev, B43_MMIO_MACCTL, ~B43_MACCTL_GPOUTSMSK, 0); |
3972 | b43_read32(dev, B43_MMIO_MACCTL) & | 3972 | b43_maskset16(dev, B43_MMIO_GPIO_MASK, ~0, 0xFC00); |
3973 | ~B43_MACCTL_GPOUTSMSK); | 3973 | b43_maskset16(dev, B43_MMIO_GPIO_CONTROL, (~0xFC00 & 0xFFFF), |
3974 | b43_write16(dev, B43_MMIO_GPIO_MASK, | 3974 | 0); |
3975 | b43_read16(dev, B43_MMIO_GPIO_MASK) | 0xFC00); | ||
3976 | b43_write16(dev, B43_MMIO_GPIO_CONTROL, | ||
3977 | b43_read16(dev, B43_MMIO_GPIO_CONTROL) & ~0xFC00); | ||
3978 | 3975 | ||
3979 | if (init) { | 3976 | if (init) { |
3980 | b43_phy_write(dev, B43_NPHY_RFCTL_LUT_TRSW_LO1, 0x2D8); | 3977 | b43_phy_write(dev, B43_NPHY_RFCTL_LUT_TRSW_LO1, 0x2D8); |
@@ -4530,8 +4527,7 @@ static void b43_nphy_op_maskset(struct b43_wldev *dev, u16 reg, u16 mask, | |||
4530 | { | 4527 | { |
4531 | check_phyreg(dev, reg); | 4528 | check_phyreg(dev, reg); |
4532 | b43_write16(dev, B43_MMIO_PHY_CONTROL, reg); | 4529 | b43_write16(dev, B43_MMIO_PHY_CONTROL, reg); |
4533 | b43_write16(dev, B43_MMIO_PHY_DATA, | 4530 | b43_maskset16(dev, B43_MMIO_PHY_DATA, mask, set); |
4534 | (b43_read16(dev, B43_MMIO_PHY_DATA) & mask) | set); | ||
4535 | } | 4531 | } |
4536 | 4532 | ||
4537 | static u16 b43_nphy_op_radio_read(struct b43_wldev *dev, u16 reg) | 4533 | static u16 b43_nphy_op_radio_read(struct b43_wldev *dev, u16 reg) |