Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290346
b: refs/heads/master
c: f1f12f9
h: refs/heads/master
v: v3
  • Loading branch information
Stanislaw Gruszka authored and John W. Linville committed Feb 6, 2012
1 parent 2737145 commit 516f363
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 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: 3e0c7643c561c7052430f5c033d5b1b1289c962e
refs/heads/master: f1f12f9894c48dc8284762bc71e4a3ed5caf546f
8 changes: 8 additions & 0 deletions trunk/drivers/net/wireless/rt2x00/rt2800.h
Original file line number Diff line number Diff line change
Expand Up @@ -1871,6 +1871,13 @@ struct mac_iveiv_entry {
*/
#define RFCSR23_FREQ_OFFSET FIELD8(0x7f)

/*
* RFCSR 24:
*/
#define RFCSR24_TX_AGC_FC FIELD8(0x1f)
#define RFCSR24_TX_H20M FIELD8(0x20)
#define RFCSR24_TX_CALIB FIELD8(0x7f)

/*
* RFCSR 27:
*/
Expand All @@ -1892,6 +1899,7 @@ struct mac_iveiv_entry {
*/
#define RFCSR31_RX_AGC_FC FIELD8(0x1f)
#define RFCSR31_RX_H20M FIELD8(0x20)
#define RFCSR31_RX_CALIB FIELD8(0x7f)

/*
* RFCSR 38:
Expand Down
19 changes: 16 additions & 3 deletions trunk/drivers/net/wireless/rt2x00/rt2800lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1645,7 +1645,7 @@ static void rt2800_config_channel_rf3xxx(struct rt2x00_dev *rt2x00dev,
struct rf_channel *rf,
struct channel_info *info)
{
u8 rfcsr;
u8 rfcsr, calib_tx, calib_rx;

rt2800_rfcsr_write(rt2x00dev, 2, rf->rf1);

Expand Down Expand Up @@ -1710,8 +1710,21 @@ static void rt2800_config_channel_rf3xxx(struct rt2x00_dev *rt2x00dev,
rt2x00_set_field8(&rfcsr, RFCSR23_FREQ_OFFSET, rt2x00dev->freq_offset);
rt2800_rfcsr_write(rt2x00dev, 23, rfcsr);

rt2800_rfcsr_write(rt2x00dev, 24,
rt2x00dev->calibration[conf_is_ht40(conf)]);
if (rt2x00_rt(rt2x00dev, RT3390)) {
calib_tx = conf_is_ht40(conf) ? 0x68 : 0x4f;
calib_rx = conf_is_ht40(conf) ? 0x6f : 0x4f;
} else {
calib_tx = rt2x00dev->calibration[conf_is_ht40(conf)];
calib_rx = rt2x00dev->calibration[conf_is_ht40(conf)];
}

rt2800_rfcsr_read(rt2x00dev, 24, &rfcsr);
rt2x00_set_field8(&rfcsr, RFCSR24_TX_CALIB, calib_tx);
rt2800_rfcsr_write(rt2x00dev, 24, rfcsr);

rt2800_rfcsr_read(rt2x00dev, 31, &rfcsr);
rt2x00_set_field8(&rfcsr, RFCSR31_RX_CALIB, calib_rx);
rt2800_rfcsr_write(rt2x00dev, 31, rfcsr);

rt2800_rfcsr_read(rt2x00dev, 7, &rfcsr);
rt2x00_set_field8(&rfcsr, RFCSR7_RF_TUNING, 1);
Expand Down

0 comments on commit 516f363

Please sign in to comment.