Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315345
b: refs/heads/master
c: db00348
h: refs/heads/master
i:
  315343: fd3161b
v: v3
  • Loading branch information
Hauke Mehrtens authored and John W. Linville committed Jul 10, 2012
1 parent c8af7a2 commit 2bf1d5b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ae0146f987cd4f4702ce9764a395d3aa1cff9777
refs/heads/master: db00348471b3858d74486e3fbb85922be5340ca6
10 changes: 8 additions & 2 deletions trunk/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ u16 read_radio_reg(struct brcms_phy *pi, u16 addr)

void write_radio_reg(struct brcms_phy *pi, u16 addr, u16 val)
{
struct si_info *sii = container_of(pi->sh->sih, struct si_info, pub);

if ((D11REV_GE(pi->sh->corerev, 24)) ||
(D11REV_IS(pi->sh->corerev, 22)
&& (pi->pubpi.phy_type != PHY_TYPE_SSN))) {
Expand All @@ -209,7 +211,8 @@ void write_radio_reg(struct brcms_phy *pi, u16 addr, u16 val)
bcma_write16(pi->d11core, D11REGOFFS(phy4wdatalo), val);
}

if (++pi->phy_wreg >= pi->phy_wreg_limit) {
if ((sii->icbus->hosttype == BCMA_HOSTTYPE_PCI) &&
(++pi->phy_wreg >= pi->phy_wreg_limit)) {
(void)bcma_read32(pi->d11core, D11REGOFFS(maccontrol));
pi->phy_wreg = 0;
}
Expand Down Expand Up @@ -294,8 +297,11 @@ void write_phy_reg(struct brcms_phy *pi, u16 addr, u16 val)
if (addr == 0x72)
(void)bcma_read16(pi->d11core, D11REGOFFS(phyregdata));
#else
struct si_info *sii = container_of(pi->sh->sih, struct si_info, pub);

bcma_write32(pi->d11core, D11REGOFFS(phyregaddr), addr | (val << 16));
if (++pi->phy_wreg >= pi->phy_wreg_limit) {
if ((sii->icbus->hosttype == BCMA_HOSTTYPE_PCI) &&
(++pi->phy_wreg >= pi->phy_wreg_limit)) {
pi->phy_wreg = 0;
(void)bcma_read16(pi->d11core, D11REGOFFS(phyversion));
}
Expand Down

0 comments on commit 2bf1d5b

Please sign in to comment.