提交 725d99d4 编写于 作者: I Ivo van Doorn 提交者: David S. Miller

[PATCH] rt2x00: Correct error in calculating rssi for link tuner

The call to rt2x00lib_precalculate_link_signal resets link.rx_success
which is needed when calculating the average rssi for the link
tuner. Change the call order so the link tuner runs first as it
doesn't need the result of the precalculate.
Signed-off-by: NAdam Baker <linux@baker-net.org.uk>
Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 79010420
......@@ -242,8 +242,6 @@ static void rt2x00lib_link_tuner(struct work_struct *work)
rt2x00dev->low_level_stats.dot11FCSErrorCount +=
rt2x00dev->link.rx_failed;
rt2x00lib_precalculate_link_signal(&rt2x00dev->link);
/*
* Only perform the link tuning when Link tuning
* has been enabled (This could have been disabled from the EEPROM).
......@@ -251,6 +249,12 @@ static void rt2x00lib_link_tuner(struct work_struct *work)
if (!test_bit(CONFIG_DISABLE_LINK_TUNING, &rt2x00dev->flags))
rt2x00dev->ops->lib->link_tuner(rt2x00dev);
/*
* Precalculate a portion of the link signal which is
* in based on the tx/rx success/failure counters.
*/
rt2x00lib_precalculate_link_signal(&rt2x00dev->link);
/*
* Increase tuner counter, and reschedule the next link tuner run.
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册