提交 ba3b9e5e 编写于 作者: H Helmut Schaa 提交者: John W. Linville

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: NHelmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 78be49ec
...@@ -3188,12 +3188,13 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev) ...@@ -3188,12 +3188,13 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
* As rt2800 has a global fallback table we cannot specify * As rt2800 has a global fallback table we cannot specify
* more then one tx rate per frame but since the hw will * more then one tx rate per frame but since the hw will
* try several rates (based on the fallback table) we should * try several rates (based on the fallback table) we should
* still initialize max_rates to the maximum number of rates * initialize max_report_rates to the maximum number of rates
* we are going to try. Otherwise mac80211 will truncate our * we are going to try. Otherwise mac80211 will truncate our
* reported tx rates and the rc algortihm will end up with * reported tx rates and the rc algortihm will end up with
* incorrect data. * incorrect data.
*/ */
rt2x00dev->hw->max_rates = 7; rt2x00dev->hw->max_rates = 1;
rt2x00dev->hw->max_report_rates = 7;
rt2x00dev->hw->max_rate_tries = 1; rt2x00dev->hw->max_rate_tries = 1;
rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &eeprom); rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &eeprom);
......
...@@ -2630,12 +2630,13 @@ static int rt61pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev) ...@@ -2630,12 +2630,13 @@ static int rt61pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
* As rt61 has a global fallback table we cannot specify * As rt61 has a global fallback table we cannot specify
* more then one tx rate per frame but since the hw will * more then one tx rate per frame but since the hw will
* try several rates (based on the fallback table) we should * try several rates (based on the fallback table) we should
* still initialize max_rates to the maximum number of rates * initialize max_report_rates to the maximum number of rates
* we are going to try. Otherwise mac80211 will truncate our * we are going to try. Otherwise mac80211 will truncate our
* reported tx rates and the rc algortihm will end up with * reported tx rates and the rc algortihm will end up with
* incorrect data. * incorrect data.
*/ */
rt2x00dev->hw->max_rates = 7; rt2x00dev->hw->max_rates = 1;
rt2x00dev->hw->max_report_rates = 7;
rt2x00dev->hw->max_rate_tries = 1; rt2x00dev->hw->max_rate_tries = 1;
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册