diff options
author | Stanislaw Gruszka <stf_xl@wp.pl> | 2013-03-16 19:19:48 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-03-18 16:38:34 -0400 |
commit | 8ba0ebf330a27d3b390ed46866455cd122d636f1 (patch) | |
tree | 5715d4d58fe45e671b9c8710362ad604dc90d9ef | |
parent | 5bc2dd0646106181f3591fa18d9a6881c6fe6edf (diff) | |
download | linux-8ba0ebf330a27d3b390ed46866455cd122d636f1.tar.gz linux-8ba0ebf330a27d3b390ed46866455cd122d636f1.tar.bz2 linux-8ba0ebf330a27d3b390ed46866455cd122d636f1.zip |
rt2800: 5592: add AGC init
Based on:
RT5592_RTMPAGCInit()
from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rt5592.c
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800lib.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index 9fa10b035968..f2446ded2a04 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c @@ -2658,7 +2658,10 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev, rt2800_bbp_write(rt2x00dev, 195, 141); rt2800_bbp_write(rt2x00dev, 196, conf_is_ht40(conf) ? 0x10 : 0x1a); - /* TODO AGC adjust */ + /* AGC init */ + reg = (rf->channel <= 14 ? 0x1c : 0x24) + 2 * rt2x00dev->lna_gain; + rt2800_bbp_write_with_rx_chain(rt2x00dev, 66, reg); + rt2800_iq_calibrate(rt2x00dev, rf->channel); } |