aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtl818x/rtl8180/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rtl818x/rtl8180/dev.c')
-rw-r--r--drivers/net/wireless/rtl818x/rtl8180/dev.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/net/wireless/rtl818x/rtl8180/dev.c b/drivers/net/wireless/rtl818x/rtl8180/dev.c
index 740a58308a90..a3b67e656e59 100644
--- a/drivers/net/wireless/rtl818x/rtl8180/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c
@@ -523,6 +523,46 @@ static void rtl8180_tx(struct ieee80211_hw *dev,
523 } 523 }
524} 524}
525 525
526static void rtl8180_set_anaparam3(struct rtl8180_priv *priv, u16 anaparam3)
527{
528 u8 reg;
529
530 rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD,
531 RTL818X_EEPROM_CMD_CONFIG);
532
533 reg = rtl818x_ioread8(priv, &priv->map->CONFIG3);
534 rtl818x_iowrite8(priv, &priv->map->CONFIG3,
535 reg | RTL818X_CONFIG3_ANAPARAM_WRITE);
536
537 rtl818x_iowrite16(priv, &priv->map->ANAPARAM3, anaparam3);
538
539 rtl818x_iowrite8(priv, &priv->map->CONFIG3,
540 reg & ~RTL818X_CONFIG3_ANAPARAM_WRITE);
541
542 rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD,
543 RTL818X_EEPROM_CMD_NORMAL);
544}
545
546void rtl8180_set_anaparam2(struct rtl8180_priv *priv, u32 anaparam2)
547{
548 u8 reg;
549
550 rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD,
551 RTL818X_EEPROM_CMD_CONFIG);
552
553 reg = rtl818x_ioread8(priv, &priv->map->CONFIG3);
554 rtl818x_iowrite8(priv, &priv->map->CONFIG3,
555 reg | RTL818X_CONFIG3_ANAPARAM_WRITE);
556
557 rtl818x_iowrite32(priv, &priv->map->ANAPARAM2, anaparam2);
558
559 rtl818x_iowrite8(priv, &priv->map->CONFIG3,
560 reg & ~RTL818X_CONFIG3_ANAPARAM_WRITE);
561
562 rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD,
563 RTL818X_EEPROM_CMD_NORMAL);
564}
565
526void rtl8180_set_anaparam(struct rtl8180_priv *priv, u32 anaparam) 566void rtl8180_set_anaparam(struct rtl8180_priv *priv, u32 anaparam)
527{ 567{
528 u8 reg; 568 u8 reg;