提交 be10d386 编写于 作者: L Larry Finger 提交者: John W. Linville

[PATCH] bcm43xx: Fix code for confusion between PHY revision and PHY version

There are several places where the PHY version and revision were interchanged.
These are changed in the specifications on 2/13/07 and now use "analog" instead
instead of "version" to help reduce confusion.
Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 e0f2e3a0
...@@ -458,7 +458,7 @@ static void bcm43xx_calc_nrssi_offset(struct bcm43xx_private *bcm) ...@@ -458,7 +458,7 @@ static void bcm43xx_calc_nrssi_offset(struct bcm43xx_private *bcm)
bcm43xx_phy_write(bcm, 0x005A, 0x0480); bcm43xx_phy_write(bcm, 0x005A, 0x0480);
bcm43xx_phy_write(bcm, 0x0059, 0x0810); bcm43xx_phy_write(bcm, 0x0059, 0x0810);
bcm43xx_phy_write(bcm, 0x0058, 0x000D); bcm43xx_phy_write(bcm, 0x0058, 0x000D);
if (phy->rev == 0) { if (phy->analog == 0) {
bcm43xx_phy_write(bcm, 0x0003, 0x0122); bcm43xx_phy_write(bcm, 0x0003, 0x0122);
} else { } else {
bcm43xx_phy_write(bcm, 0x000A, bcm43xx_phy_write(bcm, 0x000A,
...@@ -570,9 +570,9 @@ void bcm43xx_calc_nrssi_slope(struct bcm43xx_private *bcm) ...@@ -570,9 +570,9 @@ void bcm43xx_calc_nrssi_slope(struct bcm43xx_private *bcm)
nrssi0 = (s16)bcm43xx_phy_read(bcm, 0x0027); nrssi0 = (s16)bcm43xx_phy_read(bcm, 0x0027);
bcm43xx_radio_write16(bcm, 0x007A, bcm43xx_radio_write16(bcm, 0x007A,
bcm43xx_radio_read16(bcm, 0x007A) & 0x007F); bcm43xx_radio_read16(bcm, 0x007A) & 0x007F);
if (phy->rev >= 2) { if (phy->analog >= 2) {
bcm43xx_write16(bcm, 0x03E6, 0x0040); bcm43xx_write16(bcm, 0x03E6, 0x0040);
} else if (phy->rev == 0) { } else if (phy->analog == 0) {
bcm43xx_write16(bcm, 0x03E6, 0x0122); bcm43xx_write16(bcm, 0x03E6, 0x0122);
} else { } else {
bcm43xx_write16(bcm, BCM43xx_MMIO_CHANNEL_EXT, bcm43xx_write16(bcm, BCM43xx_MMIO_CHANNEL_EXT,
...@@ -596,7 +596,7 @@ void bcm43xx_calc_nrssi_slope(struct bcm43xx_private *bcm) ...@@ -596,7 +596,7 @@ void bcm43xx_calc_nrssi_slope(struct bcm43xx_private *bcm)
bcm43xx_phy_write(bcm, 0x0015, backup[5]); bcm43xx_phy_write(bcm, 0x0015, backup[5]);
bcm43xx_phy_write(bcm, 0x002A, backup[6]); bcm43xx_phy_write(bcm, 0x002A, backup[6]);
bcm43xx_synth_pu_workaround(bcm, radio->channel); bcm43xx_synth_pu_workaround(bcm, radio->channel);
if (phy->rev != 0) if (phy->analog != 0)
bcm43xx_write16(bcm, 0x03F4, backup[13]); bcm43xx_write16(bcm, 0x03F4, backup[13]);
bcm43xx_phy_write(bcm, 0x0020, backup[7]); bcm43xx_phy_write(bcm, 0x0020, backup[7]);
...@@ -692,7 +692,7 @@ void bcm43xx_calc_nrssi_slope(struct bcm43xx_private *bcm) ...@@ -692,7 +692,7 @@ void bcm43xx_calc_nrssi_slope(struct bcm43xx_private *bcm)
bcm43xx_radio_write16(bcm, 0x007A, bcm43xx_radio_write16(bcm, 0x007A,
bcm43xx_radio_read16(bcm, 0x007A) & 0x007F); bcm43xx_radio_read16(bcm, 0x007A) & 0x007F);
if (phy->rev >= 2) { if (phy->analog >= 2) {
bcm43xx_phy_write(bcm, 0x0003, bcm43xx_phy_write(bcm, 0x0003,
(bcm43xx_phy_read(bcm, 0x0003) (bcm43xx_phy_read(bcm, 0x0003)
& 0xFF9F) | 0x0040); & 0xFF9F) | 0x0040);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册