Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328235
b: refs/heads/master
c: 8c6728b
h: refs/heads/master
i:
  328233: 9ef670b
  328231: e67e0e7
v: v3
  • Loading branch information
Gertjan van Wingerde authored and John W. Linville committed Sep 24, 2012
1 parent 26564c2 commit f436629
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 06236e53ce83d9f770a25a5305b8651544ff8b67
refs/heads/master: 8c6728b08ee589ae3c7a75f0d1aa5d73a9c042f1
16 changes: 10 additions & 6 deletions trunk/drivers/net/wireless/rt2x00/rt2800lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -2896,6 +2896,8 @@ EXPORT_SYMBOL_GPL(rt2800_link_stats);

static u8 rt2800_get_default_vgc(struct rt2x00_dev *rt2x00dev)
{
u8 vgc;

if (rt2x00dev->curr_band == IEEE80211_BAND_2GHZ) {
if (rt2x00_rt(rt2x00dev, RT3070) ||
rt2x00_rt(rt2x00dev, RT3071) ||
Expand All @@ -2904,15 +2906,17 @@ static u8 rt2800_get_default_vgc(struct rt2x00_dev *rt2x00dev)
rt2x00_rt(rt2x00dev, RT3390) ||
rt2x00_rt(rt2x00dev, RT5390) ||
rt2x00_rt(rt2x00dev, RT5392))
return 0x1c + (2 * rt2x00dev->lna_gain);
vgc = 0x1c + (2 * rt2x00dev->lna_gain);
else
vgc = 0x2e + rt2x00dev->lna_gain;
} else { /* 5GHZ band */
if (!test_bit(CONFIG_CHANNEL_HT40, &rt2x00dev->flags))
vgc = 0x32 + (rt2x00dev->lna_gain * 5) / 3;
else
return 0x2e + rt2x00dev->lna_gain;
vgc = 0x3a + (rt2x00dev->lna_gain * 5) / 3;
}

if (!test_bit(CONFIG_CHANNEL_HT40, &rt2x00dev->flags))
return 0x32 + (rt2x00dev->lna_gain * 5) / 3;
else
return 0x3a + (rt2x00dev->lna_gain * 5) / 3;
return vgc;
}

static inline void rt2800_set_vgc(struct rt2x00_dev *rt2x00dev,
Expand Down

0 comments on commit f436629

Please sign in to comment.