aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2010-10-02 05:32:16 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-10-05 13:35:28 -0400
commitba3b9e5e8c7a12d8ea46cb4a8217c2e9b0720e9c (patch)
treee1cc048306b2c8adc5642c52f980594722bb2f6b
parent78be49ec2a0df34de9441930fdced20311fd709f (diff)
rt2x00: correctly set max_report_rates in rt61pci and rt2800
rt61pci and rt2800 devices can use up to 7 different rates per tx frame. However, the device uses a global fallback table. Hence, the rc algortihm cannot specify multiple rates to try but the device is able to report multiple rates (based on the retry table). Specify that behavior by correctly setting max_report_rates and max_rates. This makes rt2x00 and minstrel play nicer together. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.c5
-rw-r--r--drivers/net/wireless/rt2x00/rt61pci.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 99b505f8e717..403e2ed0f44f 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -3188,12 +3188,13 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
3188 * As rt2800 has a global fallback table we cannot specify 3188 * As rt2800 has a global fallback table we cannot specify
3189 * more then one tx rate per frame but since the hw will 3189 * more then one tx rate per frame but since the hw will
3190 * try several rates (based on the fallback table) we should 3190 * try several rates (based on the fallback table) we should
3191 * still initialize max_rates to the maximum number of rates 3191 * initialize max_report_rates to the maximum number of rates
3192 * we are going to try. Otherwise mac80211 will truncate our 3192 * we are going to try. Otherwise mac80211 will truncate our
3193 * reported tx rates and the rc algortihm will end up with 3193 * reported tx rates and the rc algortihm will end up with
3194 * incorrect data. 3194 * incorrect data.
3195 */ 3195 */
3196 rt2x00dev->hw->max_rates = 7; 3196 rt2x00dev->hw->max_rates = 1;
3197 rt2x00dev->hw->max_report_rates = 7;
3197 rt2x00dev->hw->max_rate_tries = 1; 3198 rt2x00dev->hw->max_rate_tries = 1;
3198 3199
3199 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &eeprom); 3200 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &eeprom);
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index 8940070fe2a2..ac370f11e74f 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -2630,12 +2630,13 @@ static int rt61pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
2630 * As rt61 has a global fallback table we cannot specify 2630 * As rt61 has a global fallback table we cannot specify
2631 * more then one tx rate per frame but since the hw will 2631 * more then one tx rate per frame but since the hw will
2632 * try several rates (based on the fallback table) we should 2632 * try several rates (based on the fallback table) we should
2633 * still initialize max_rates to the maximum number of rates 2633 * initialize max_report_rates to the maximum number of rates
2634 * we are going to try. Otherwise mac80211 will truncate our 2634 * we are going to try. Otherwise mac80211 will truncate our
2635 * reported tx rates and the rc algortihm will end up with 2635 * reported tx rates and the rc algortihm will end up with
2636 * incorrect data. 2636 * incorrect data.
2637 */ 2637 */
2638 rt2x00dev->hw->max_rates = 7; 2638 rt2x00dev->hw->max_rates = 1;
2639 rt2x00dev->hw->max_report_rates = 7;
2639 rt2x00dev->hw->max_rate_tries = 1; 2640 rt2x00dev->hw->max_rate_tries = 1;
2640 2641
2641 /* 2642 /*