diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2012-01-02 22:31:21 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-01-24 23:06:05 +0400 |
commit | 5056635c10151970d87ae256b7f52f056291799e (patch) | |
tree | ce2c794604507112e2da0202d755f9f85a097451 /drivers/net/wireless/b43/b43.h | |
parent | 507f9a71846a3d25d0e5322754da6b65adceda80 (diff) | |
download | linux-5056635c10151970d87ae256b7f52f056291799e.tar.xz |
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/b43.h')
-rw-r--r-- | drivers/net/wireless/b43/b43.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index 16e8f8058155..835462dc1206 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h @@ -999,6 +999,12 @@ static inline void b43_write16(struct b43_wldev *dev, u16 offset, u16 value) dev->dev->write16(dev->dev, offset, value); } +static inline void b43_maskset16(struct b43_wldev *dev, u16 offset, u16 mask, + u16 set) +{ + b43_write16(dev, offset, (b43_read16(dev, offset) & mask) | set); +} + static inline u32 b43_read32(struct b43_wldev *dev, u16 offset) { return dev->dev->read32(dev->dev, offset); @@ -1009,6 +1015,12 @@ static inline void b43_write32(struct b43_wldev *dev, u16 offset, u32 value) dev->dev->write32(dev->dev, offset, value); } +static inline void b43_maskset32(struct b43_wldev *dev, u16 offset, u32 mask, + u32 set) +{ + b43_write32(dev, offset, (b43_read32(dev, offset) & mask) | set); +} + static inline void b43_block_read(struct b43_wldev *dev, void *buffer, size_t count, u16 offset, u8 reg_width) { |