diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2010-12-07 03:42:06 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-08 15:38:44 -0500 |
commit | 755fd183b89bc8a302669b6f35cd98faee473f7a (patch) | |
tree | cb40a6e2beb8d1e7bea583caf354ef9f2f985604 | |
parent | f00fe7f6d14ab7bbd4655f55eae71bbd73ef766d (diff) |
b43: N-PHY: implement own maskset
This let us avoid double addressing while still having reg check.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/b43/phy_n.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index 905f1d7bac20..f78f4e96defa 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c | |||
@@ -3705,6 +3705,15 @@ static void b43_nphy_op_write(struct b43_wldev *dev, u16 reg, u16 value) | |||
3705 | b43_write16(dev, B43_MMIO_PHY_DATA, value); | 3705 | b43_write16(dev, B43_MMIO_PHY_DATA, value); |
3706 | } | 3706 | } |
3707 | 3707 | ||
3708 | static void b43_nphy_op_maskset(struct b43_wldev *dev, u16 reg, u16 mask, | ||
3709 | u16 set) | ||
3710 | { | ||
3711 | check_phyreg(dev, reg); | ||
3712 | b43_write16(dev, B43_MMIO_PHY_CONTROL, reg); | ||
3713 | b43_write16(dev, B43_MMIO_PHY_DATA, | ||
3714 | (b43_read16(dev, B43_MMIO_PHY_DATA) & mask) | set); | ||
3715 | } | ||
3716 | |||
3708 | static u16 b43_nphy_op_radio_read(struct b43_wldev *dev, u16 reg) | 3717 | static u16 b43_nphy_op_radio_read(struct b43_wldev *dev, u16 reg) |
3709 | { | 3718 | { |
3710 | /* Register 1 is a 32-bit register. */ | 3719 | /* Register 1 is a 32-bit register. */ |
@@ -3799,6 +3808,7 @@ const struct b43_phy_operations b43_phyops_n = { | |||
3799 | .init = b43_nphy_op_init, | 3808 | .init = b43_nphy_op_init, |
3800 | .phy_read = b43_nphy_op_read, | 3809 | .phy_read = b43_nphy_op_read, |
3801 | .phy_write = b43_nphy_op_write, | 3810 | .phy_write = b43_nphy_op_write, |
3811 | .phy_maskset = b43_nphy_op_maskset, | ||
3802 | .radio_read = b43_nphy_op_radio_read, | 3812 | .radio_read = b43_nphy_op_radio_read, |
3803 | .radio_write = b43_nphy_op_radio_write, | 3813 | .radio_write = b43_nphy_op_radio_write, |
3804 | .software_rfkill = b43_nphy_op_software_rfkill, | 3814 | .software_rfkill = b43_nphy_op_software_rfkill, |