aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2800lib.c
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-12-02 12:34:47 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-12-03 13:52:01 -0500
commitd6d82020d07711f0095f2925bc1b9a28f94bb9b5 (patch)
tree8d8eeb79fe557d98a91b7fd87739762942869b33 /drivers/net/wireless/rt2x00/rt2800lib.c
parentfc1b63d75d9551bbfaff178a3f191c3d05db8c6e (diff)
rt2x00: rt2800lib: introduce RFCSR3_VCOCAL_EN
On the RF3290,RF5360,RF5370,RF5372,RF5390,RF5392 radio frontends, the VCO calibration can be controlled via the RFCSR3 register. The current code uses the RFCSR30_RF_CALIBRATION constant to enable the calibration, however that belongs to the RFCSR30 register. Although the values of the constant is correct, but using that for another register is confusing. Add a new definition for the VCO calibration enable bit of the RFCSR3 register and use that in the relevant places in order to avoid confusions. The patch contains no functional changes. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800lib.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 1cc6599a8f66..d4d0c3664eb2 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -2243,7 +2243,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
2243 rt2800_rfcsr_write(rt2x00dev, 30, rfcsr); 2243 rt2800_rfcsr_write(rt2x00dev, 30, rfcsr);
2244 2244
2245 rt2800_rfcsr_read(rt2x00dev, 3, &rfcsr); 2245 rt2800_rfcsr_read(rt2x00dev, 3, &rfcsr);
2246 rt2x00_set_field8(&rfcsr, RFCSR30_RF_CALIBRATION, 1); 2246 rt2x00_set_field8(&rfcsr, RFCSR3_VCOCAL_EN, 1);
2247 rt2800_rfcsr_write(rt2x00dev, 3, rfcsr); 2247 rt2800_rfcsr_write(rt2x00dev, 3, rfcsr);
2248 } 2248 }
2249 2249
@@ -2804,7 +2804,7 @@ void rt2800_vco_calibration(struct rt2x00_dev *rt2x00dev)
2804 case RF5390: 2804 case RF5390:
2805 case RF5392: 2805 case RF5392:
2806 rt2800_rfcsr_read(rt2x00dev, 3, &rfcsr); 2806 rt2800_rfcsr_read(rt2x00dev, 3, &rfcsr);
2807 rt2x00_set_field8(&rfcsr, RFCSR30_RF_CALIBRATION, 1); 2807 rt2x00_set_field8(&rfcsr, RFCSR3_VCOCAL_EN, 1);
2808 rt2800_rfcsr_write(rt2x00dev, 3, rfcsr); 2808 rt2800_rfcsr_write(rt2x00dev, 3, rfcsr);
2809 break; 2809 break;
2810 default: 2810 default: