diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-03-09 17:49:04 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-13 19:32:31 -0400 |
commit | 89993890aeb8fe58b2d49b2661965524802ab73c (patch) | |
tree | d541a26a8a370401ef2c4d0cafdd8868853ed127 /drivers/net/wireless/rt2x00/rt2400pci.c | |
parent | dac37d720860bbbc535adc90249184308501c1f0 (diff) |
rt2x00: Fix rt2400pci signal
After sampling hundreds of RX frame descriptors,
the results were conclusive:
- The Ralink documentation regarding the SIGNAL and RSSI are wrong.
It turns out that of the 5 BBR registers, we should not use BBR0 and BBR1
for SIGNAL and RSSI respectively, but actually BBR1 and BBR2.
BBR0 does show values, but the exact meaning remains unclear,
but they cannot be translated into a SIGNAL or RSSI field.
BBR3, BBR4 and BBR5 are always 0, so their meaning is unknown.
As it turns out, the reported SIGNAL is the PLCP value, this
in contradiction to what was expected looking at rt2500pci which
only reported the PLCP values for OFDM rates and bitrate values
for CCK rates.
This means we should let the driver raise the flag about the contents
of the SIGNAL field so rt2x00lib can always do the right thing based
on what the driver reports.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2400pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2400pci.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index a92626bc536a..4cd284209d16 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -1058,9 +1058,11 @@ static void rt2400pci_fill_rxdone(struct queue_entry *entry, | |||
1058 | struct queue_entry_priv_pci_rx *priv_rx = entry->priv_data; | 1058 | struct queue_entry_priv_pci_rx *priv_rx = entry->priv_data; |
1059 | u32 word0; | 1059 | u32 word0; |
1060 | u32 word2; | 1060 | u32 word2; |
1061 | u32 word3; | ||
1061 | 1062 | ||
1062 | rt2x00_desc_read(priv_rx->desc, 0, &word0); | 1063 | rt2x00_desc_read(priv_rx->desc, 0, &word0); |
1063 | rt2x00_desc_read(priv_rx->desc, 2, &word2); | 1064 | rt2x00_desc_read(priv_rx->desc, 2, &word2); |
1065 | rt2x00_desc_read(priv_rx->desc, 3, &word3); | ||
1064 | 1066 | ||
1065 | rxdesc->flags = 0; | 1067 | rxdesc->flags = 0; |
1066 | if (rt2x00_get_field32(word0, RXD_W0_CRC_ERROR)) | 1068 | if (rt2x00_get_field32(word0, RXD_W0_CRC_ERROR)) |
@@ -1070,9 +1072,11 @@ static void rt2400pci_fill_rxdone(struct queue_entry *entry, | |||
1070 | 1072 | ||
1071 | /* | 1073 | /* |
1072 | * Obtain the status about this packet. | 1074 | * Obtain the status about this packet. |
1075 | * The signal is the PLCP value. | ||
1073 | */ | 1076 | */ |
1074 | rxdesc->signal = rt2x00_get_field32(word2, RXD_W2_SIGNAL); | 1077 | rxdesc->signal = rt2x00_get_field32(word2, RXD_W2_SIGNAL); |
1075 | rxdesc->rssi = rt2x00_get_field32(word2, RXD_W2_RSSI) - | 1078 | rxdesc->signal_plcp = 1; |
1079 | rxdesc->rssi = rt2x00_get_field32(word2, RXD_W3_RSSI) - | ||
1076 | entry->queue->rt2x00dev->rssi_offset; | 1080 | entry->queue->rt2x00dev->rssi_offset; |
1077 | rxdesc->ofdm = 0; | 1081 | rxdesc->ofdm = 0; |
1078 | rxdesc->size = rt2x00_get_field32(word0, RXD_W0_DATABYTE_COUNT); | 1082 | rxdesc->size = rt2x00_get_field32(word0, RXD_W0_DATABYTE_COUNT); |