carl9170: use rx chainmask from eeprom
authorChristian Lamparter <chunkeey@googlemail.com>
Fri, 17 Sep 2010 20:07:59 +0000 (22:07 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 21 Sep 2010 15:05:19 +0000 (11:05 -0400)
The eeprom provides a mask for all present rx chains.
Why not use it instead of the generic initval default?

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/carl9170/phy.c

index 71dea9707e21463cb7e7e5958d0a1cae0a3e6e1a..fe265e3e6ac4846a4d422de0d2200372c0f6aa1e 100644 (file)
@@ -532,8 +532,11 @@ static int carl9170_init_phy_from_eeprom(struct ar9170 *ar,
        SET_VAL(AR9170_PHY_TPCRG1_PD_GAIN_2, val,
                xpd2pd[m->xpdGain & 0xf] >> 2);
        carl9170_regwrite(AR9170_PHY_REG_TPCRG1, val);
-       carl9170_regwrite_finish();
 
+       carl9170_regwrite(AR9170_PHY_REG_RX_CHAINMASK, ar->eeprom.rx_mask);
+       carl9170_regwrite(AR9170_PHY_REG_CAL_CHAINMASK, ar->eeprom.rx_mask);
+
+       carl9170_regwrite_finish();
        return carl9170_regwrite_result();
 }