aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/phy_common.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2010-12-07 03:42:07 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-08 15:38:44 -0500
commit155180803c95c7b14b355f60431bef45116c151e (patch)
tree5b02de749bb879e1ad488c2c6fd53884044b72f8 /drivers/net/wireless/b43/phy_common.c
parent755fd183b89bc8a302669b6f35cd98faee473f7a (diff)
b43: flush PHY writes when needed
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_common.c')
-rw-r--r--drivers/net/wireless/b43/phy_common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c
index fa7f83fc8db9..0a91fc3a2e03 100644
--- a/drivers/net/wireless/b43/phy_common.c
+++ b/drivers/net/wireless/b43/phy_common.c
@@ -231,6 +231,7 @@ void b43_radio_maskset(struct b43_wldev *dev, u16 offset, u16 mask, u16 set)
231u16 b43_phy_read(struct b43_wldev *dev, u16 reg) 231u16 b43_phy_read(struct b43_wldev *dev, u16 reg)
232{ 232{
233 assert_mac_suspended(dev); 233 assert_mac_suspended(dev);
234 dev->phy.writes_counter = 0;
234 return dev->phy.ops->phy_read(dev, reg); 235 return dev->phy.ops->phy_read(dev, reg);
235} 236}
236 237
@@ -238,6 +239,10 @@ void b43_phy_write(struct b43_wldev *dev, u16 reg, u16 value)
238{ 239{
239 assert_mac_suspended(dev); 240 assert_mac_suspended(dev);
240 dev->phy.ops->phy_write(dev, reg, value); 241 dev->phy.ops->phy_write(dev, reg, value);
242 if (++dev->phy.writes_counter == B43_MAX_WRITES_IN_ROW) {
243 b43_read16(dev, B43_MMIO_PHY_VER);
244 dev->phy.writes_counter = 0;
245 }
241} 246}
242 247
243void b43_phy_copy(struct b43_wldev *dev, u16 destreg, u16 srcreg) 248void b43_phy_copy(struct b43_wldev *dev, u16 destreg, u16 srcreg)