Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225136
b: refs/heads/master
c: 1551808
h: refs/heads/master
v: v3
  • Loading branch information
Rafał Miłecki authored and John W. Linville committed Dec 8, 2010
1 parent 7243018 commit 834bf15
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 755fd183b89bc8a302669b6f35cd98faee473f7a
refs/heads/master: 155180803c95c7b14b355f60431bef45116c151e
5 changes: 5 additions & 0 deletions trunk/drivers/net/wireless/b43/phy_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,18 @@ void b43_radio_maskset(struct b43_wldev *dev, u16 offset, u16 mask, u16 set)
u16 b43_phy_read(struct b43_wldev *dev, u16 reg)
{
assert_mac_suspended(dev);
dev->phy.writes_counter = 0;
return dev->phy.ops->phy_read(dev, reg);
}

void b43_phy_write(struct b43_wldev *dev, u16 reg, u16 value)
{
assert_mac_suspended(dev);
dev->phy.ops->phy_write(dev, reg, value);
if (++dev->phy.writes_counter == B43_MAX_WRITES_IN_ROW) {
b43_read16(dev, B43_MMIO_PHY_VER);
dev->phy.writes_counter = 0;
}
}

void b43_phy_copy(struct b43_wldev *dev, u16 destreg, u16 srcreg)
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/net/wireless/b43/phy_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ struct b43_c32 { s32 i, q; };
#define B43_PHYVER_TYPE_SHIFT 8
#define B43_PHYVER_VERSION 0x00FF

/* PHY writes need to be flushed if we reach limit */
#define B43_MAX_WRITES_IN_ROW 24

/**
* enum b43_interference_mitigation - Interference Mitigation mode
*
Expand Down Expand Up @@ -232,6 +235,9 @@ struct b43_phy {
/* PHY revision number. */
u8 rev;

/* Count writes since last read */
u8 writes_counter;

/* Radio versioning */
u16 radio_manuf; /* Radio manufacturer */
u16 radio_ver; /* Radio version */
Expand Down

0 comments on commit 834bf15

Please sign in to comment.