aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtl8187_dev.c
diff options
context:
space:
mode:
authorHerton Ronaldo Krzesinski <herton@mandriva.com.br>2008-07-10 17:55:23 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-07-14 14:52:56 -0400
commit4ece16a1cf9d36fee6d3ccb2c933296cf660e44d (patch)
tree9cf5e1364abb33f75950077900fc1acb2125da07 /drivers/net/wireless/rtl8187_dev.c
parent9c0c7a429a0cf02c2ac1998d5cf4c26f6be5c989 (diff)
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>
Diffstat (limited to 'drivers/net/wireless/rtl8187_dev.c')
-rw-r--r--drivers/net/wireless/rtl8187_dev.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c
index bdea1d8ad8ef..d3067b1216ca 100644
--- a/drivers/net/wireless/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl8187_dev.c
@@ -430,8 +430,10 @@ static int rtl8187_init_hw(struct ieee80211_hw *dev)
430 reg = rtl818x_ioread8(priv, &priv->map->CONFIG3); 430 reg = rtl818x_ioread8(priv, &priv->map->CONFIG3);
431 rtl818x_iowrite8(priv, &priv->map->CONFIG3, reg | 431 rtl818x_iowrite8(priv, &priv->map->CONFIG3, reg |
432 RTL818X_CONFIG3_ANAPARAM_WRITE); 432 RTL818X_CONFIG3_ANAPARAM_WRITE);
433 rtl818x_iowrite32(priv, &priv->map->ANAPARAM, RTL8225_ANAPARAM_ON); 433 rtl818x_iowrite32(priv, &priv->map->ANAPARAM,
434 rtl818x_iowrite32(priv, &priv->map->ANAPARAM2, RTL8225_ANAPARAM2_ON); 434 RTL8187_RTL8225_ANAPARAM_ON);
435 rtl818x_iowrite32(priv, &priv->map->ANAPARAM2,
436 RTL8187_RTL8225_ANAPARAM2_ON);
435 rtl818x_iowrite8(priv, &priv->map->CONFIG3, reg & 437 rtl818x_iowrite8(priv, &priv->map->CONFIG3, reg &
436 ~RTL818X_CONFIG3_ANAPARAM_WRITE); 438 ~RTL818X_CONFIG3_ANAPARAM_WRITE);
437 rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, 439 rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD,
@@ -453,8 +455,10 @@ static int rtl8187_init_hw(struct ieee80211_hw *dev)
453 reg = rtl818x_ioread8(priv, &priv->map->CONFIG3); 455 reg = rtl818x_ioread8(priv, &priv->map->CONFIG3);
454 rtl818x_iowrite8(priv, &priv->map->CONFIG3, 456 rtl818x_iowrite8(priv, &priv->map->CONFIG3,
455 reg | RTL818X_CONFIG3_ANAPARAM_WRITE); 457 reg | RTL818X_CONFIG3_ANAPARAM_WRITE);
456 rtl818x_iowrite32(priv, &priv->map->ANAPARAM, RTL8225_ANAPARAM_ON); 458 rtl818x_iowrite32(priv, &priv->map->ANAPARAM,
457 rtl818x_iowrite32(priv, &priv->map->ANAPARAM2, RTL8225_ANAPARAM2_ON); 459 RTL8187_RTL8225_ANAPARAM_ON);
460 rtl818x_iowrite32(priv, &priv->map->ANAPARAM2,
461 RTL8187_RTL8225_ANAPARAM2_ON);
458 rtl818x_iowrite8(priv, &priv->map->CONFIG3, 462 rtl818x_iowrite8(priv, &priv->map->CONFIG3,
459 reg & ~RTL818X_CONFIG3_ANAPARAM_WRITE); 463 reg & ~RTL818X_CONFIG3_ANAPARAM_WRITE);
460 rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL); 464 rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL);
@@ -566,9 +570,12 @@ static int rtl8187b_init_hw(struct ieee80211_hw *dev)
566 reg = rtl818x_ioread8(priv, &priv->map->CONFIG3); 570 reg = rtl818x_ioread8(priv, &priv->map->CONFIG3);
567 reg |= RTL818X_CONFIG3_ANAPARAM_WRITE | RTL818X_CONFIG3_GNT_SELECT; 571 reg |= RTL818X_CONFIG3_ANAPARAM_WRITE | RTL818X_CONFIG3_GNT_SELECT;
568 rtl818x_iowrite8(priv, &priv->map->CONFIG3, reg); 572 rtl818x_iowrite8(priv, &priv->map->CONFIG3, reg);
569 rtl818x_iowrite32(priv, &priv->map->ANAPARAM2, 0x727f3f52); 573 rtl818x_iowrite32(priv, &priv->map->ANAPARAM2,
570 rtl818x_iowrite32(priv, &priv->map->ANAPARAM, 0x45090658); 574 RTL8187B_RTL8225_ANAPARAM2_ON);
571 rtl818x_iowrite8(priv, &priv->map->ANAPARAM3, 0); 575 rtl818x_iowrite32(priv, &priv->map->ANAPARAM,
576 RTL8187B_RTL8225_ANAPARAM_ON);
577 rtl818x_iowrite8(priv, &priv->map->ANAPARAM3,
578 RTL8187B_RTL8225_ANAPARAM3_ON);
572 579
573 rtl818x_iowrite8(priv, (u8 *)0xFF61, 0x10); 580 rtl818x_iowrite8(priv, (u8 *)0xFF61, 0x10);
574 reg = rtl818x_ioread8(priv, (u8 *)0xFF62); 581 reg = rtl818x_ioread8(priv, (u8 *)0xFF62);