rtl8187: use different ANAPARAM*_OFF values for 8187B

For RTL8187B it seems we need special values too for ANAPARAM*_OFF
values (and not use RTL8187 ones). The ANAPARAM*_OFF values used are the
stock ones read from the hardware after a cold boot.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Herton Ronaldo Krzesinski
2008-07-10 18:55:23 -03:00
committed by John W. Linville
parent 9c0c7a429a
commit 4ece16a1cf
3 changed files with 42 additions and 15 deletions

View File

@ -430,8 +430,10 @@ static int rtl8187_init_hw(struct ieee80211_hw *dev)
reg = rtl818x_ioread8(priv, &priv->map->CONFIG3);
rtl818x_iowrite8(priv, &priv->map->CONFIG3, reg |
RTL818X_CONFIG3_ANAPARAM_WRITE);
rtl818x_iowrite32(priv, &priv->map->ANAPARAM, RTL8225_ANAPARAM_ON);
rtl818x_iowrite32(priv, &priv->map->ANAPARAM2, RTL8225_ANAPARAM2_ON);
rtl818x_iowrite32(priv, &priv->map->ANAPARAM,
RTL8187_RTL8225_ANAPARAM_ON);
rtl818x_iowrite32(priv, &priv->map->ANAPARAM2,
RTL8187_RTL8225_ANAPARAM2_ON);
rtl818x_iowrite8(priv, &priv->map->CONFIG3, reg &
~RTL818X_CONFIG3_ANAPARAM_WRITE);
rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD,
@ -453,8 +455,10 @@ static int rtl8187_init_hw(struct ieee80211_hw *dev)
reg = rtl818x_ioread8(priv, &priv->map->CONFIG3);
rtl818x_iowrite8(priv, &priv->map->CONFIG3,
reg | RTL818X_CONFIG3_ANAPARAM_WRITE);
rtl818x_iowrite32(priv, &priv->map->ANAPARAM, RTL8225_ANAPARAM_ON);
rtl818x_iowrite32(priv, &priv->map->ANAPARAM2, RTL8225_ANAPARAM2_ON);
rtl818x_iowrite32(priv, &priv->map->ANAPARAM,
RTL8187_RTL8225_ANAPARAM_ON);
rtl818x_iowrite32(priv, &priv->map->ANAPARAM2,
RTL8187_RTL8225_ANAPARAM2_ON);
rtl818x_iowrite8(priv, &priv->map->CONFIG3,
reg & ~RTL818X_CONFIG3_ANAPARAM_WRITE);
rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL);
@ -566,9 +570,12 @@ static int rtl8187b_init_hw(struct ieee80211_hw *dev)
reg = rtl818x_ioread8(priv, &priv->map->CONFIG3);
reg |= RTL818X_CONFIG3_ANAPARAM_WRITE | RTL818X_CONFIG3_GNT_SELECT;
rtl818x_iowrite8(priv, &priv->map->CONFIG3, reg);
rtl818x_iowrite32(priv, &priv->map->ANAPARAM2, 0x727f3f52);
rtl818x_iowrite32(priv, &priv->map->ANAPARAM, 0x45090658);
rtl818x_iowrite8(priv, &priv->map->ANAPARAM3, 0);
rtl818x_iowrite32(priv, &priv->map->ANAPARAM2,
RTL8187B_RTL8225_ANAPARAM2_ON);
rtl818x_iowrite32(priv, &priv->map->ANAPARAM,
RTL8187B_RTL8225_ANAPARAM_ON);
rtl818x_iowrite8(priv, &priv->map->ANAPARAM3,
RTL8187B_RTL8225_ANAPARAM3_ON);
rtl818x_iowrite8(priv, (u8 *)0xFF61, 0x10);
reg = rtl818x_ioread8(priv, (u8 *)0xFF62);