]> err.no Git - linux-2.6/commitdiff
[PATCH] Sync bcm43xx_phy_initb6() with specs
authorDanny van Dyk <kugelfang@gentoo.org>
Tue, 31 Jan 2006 23:43:05 +0000 (00:43 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 27 Mar 2006 16:18:29 +0000 (11:18 -0500)
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/bcm43xx/bcm43xx_phy.c
drivers/net/wireless/bcm43xx/bcm43xx_radio.c
drivers/net/wireless/bcm43xx/bcm43xx_radio.h

index f5e7a6ab93cb4f3f62df0ce9bc29b42450019f20..d90f207b24735324237f5530e352b16cd56912cf 100644 (file)
@@ -947,7 +947,7 @@ static void bcm43xx_phy_initb6(struct bcm43xx_private *bcm)
        bcm43xx_radio_write16(bcm, 0x0050, 0x0020);
        if ((bcm->current_core->radio->manufact == 0x17F) &&
            (bcm->current_core->radio->version == 0x2050) &&
-           (bcm->current_core->radio->revision == 2)) {
+           (bcm->current_core->radio->revision <= 2)) {
                bcm43xx_radio_write16(bcm, 0x0050, 0x0020);
                bcm43xx_radio_write16(bcm, 0x005A, 0x0070);
                bcm43xx_radio_write16(bcm, 0x005B, 0x007B);
@@ -984,10 +984,15 @@ static void bcm43xx_phy_initb6(struct bcm43xx_private *bcm)
                bcm43xx_write16(bcm, 0x03E4, 0x0009);
        if (phy->type == BCM43xx_PHYTYPE_B) {
                bcm43xx_write16(bcm, 0x03E6, 0x8140);
-               bcm43xx_phy_write(bcm, 0x0016, 0x5410);
-               bcm43xx_phy_write(bcm, 0x0017, 0xA820);
-               bcm43xx_phy_write(bcm, 0x0007, 0x0062);
-               TODO();//TODO: calibrate stuff.
+               bcm43xx_phy_write(bcm, 0x0016, 0x0410);
+               bcm43xx_phy_write(bcm, 0x0017, 0x0820);
+               bcm43xx_phy_write(bcm, 0x0062, 0x0007);
+               (void) bcm43xx_radio_calibrationvalue(bcm);
+               bcm43xx_phy_lo_b_measure(bcm);
+               if (bcm->sprom.boardflags & BCM43xx_BFL_RSSI) {
+                       bcm43xx_calc_nrssi_slope(bcm);
+                       bcm43xx_calc_nrssi_threshold(bcm);
+               }
                bcm43xx_phy_init_pctl(bcm);
        } else
                bcm43xx_write16(bcm, 0x03E6, 0x0);
index 5ce6acef2c4a4de42ea0ed5bfc7477ef6f17f229..3901aa99466615580a3aba2e88bb13188f44c76c 100644 (file)
@@ -1184,7 +1184,7 @@ int bcm43xx_radio_set_interference_mitigation(struct bcm43xx_private *bcm,
        return 0;
 }
 
-static u16 bcm43xx_radio_calibrationvalue(struct bcm43xx_private *bcm)
+u16 bcm43xx_radio_calibrationvalue(struct bcm43xx_private *bcm)
 {
        u16 reg, index, ret;
 
index 89fe29282140ed58bf6b58ae7b2e14f15c356fd1..a5d2e10d5d98a7d23cd977b2ba604d7f94497db8 100644 (file)
@@ -89,5 +89,6 @@ void bcm43xx_nrssi_hw_update(struct bcm43xx_private *bcm, u16 val);
 void bcm43xx_nrssi_mem_update(struct bcm43xx_private *bcm);
 
 void bcm43xx_radio_set_tx_iq(struct bcm43xx_private *bcm);
+u16 bcm43xx_radio_calibrationvalue(struct bcm43xx_private *bcm);
 
 #endif /* BCM43xx_RADIO_H_ */