aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index be68b0485833..a114cab413e9 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -4471,19 +4471,34 @@ void rt2800_link_tuner(struct rt2x00_dev *rt2x00dev, struct link_qual *qual,
4471 4471
4472 if (rt2x00_rt_rev(rt2x00dev, RT2860, REV_RT2860C)) 4472 if (rt2x00_rt_rev(rt2x00dev, RT2860, REV_RT2860C))
4473 return; 4473 return;
4474 /* 4474
4475 * When RSSI is better then -80 increase VGC level with 0x10, except 4475 /* When RSSI is better than a certain threshold, increase VGC
4476 * for rt5592 chip. 4476 * with a chip specific value in order to improve the balance
4477 * between sensibility and noise isolation.
4477 */ 4478 */
4478 4479
4479 vgc = rt2800_get_default_vgc(rt2x00dev); 4480 vgc = rt2800_get_default_vgc(rt2x00dev);
4480 4481
4481 if (rt2x00_rt(rt2x00dev, RT5592)) { 4482 switch (rt2x00dev->chip.rt) {
4483 case RT3572:
4484 case RT3593:
4485 if (qual->rssi > -65) {
4486 if (rt2x00dev->curr_band == IEEE80211_BAND_2GHZ)
4487 vgc += 0x20;
4488 else
4489 vgc += 0x10;
4490 }
4491 break;
4492
4493 case RT5592:
4482 if (qual->rssi > -65) 4494 if (qual->rssi > -65)
4483 vgc += 0x20; 4495 vgc += 0x20;
4484 } else { 4496 break;
4497
4498 default:
4485 if (qual->rssi > -80) 4499 if (qual->rssi > -80)
4486 vgc += 0x10; 4500 vgc += 0x10;
4501 break;
4487 } 4502 }
4488 4503
4489 rt2800_set_vgc(rt2x00dev, qual, vgc); 4504 rt2800_set_vgc(rt2x00dev, qual, vgc);