]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: Fix sta->last_tx_rate setting with no-op rate control devices
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>
Thu, 22 Apr 2010 07:27:48 +0000 (10:27 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 26 Apr 2010 18:11:40 +0000 (14:11 -0400)
commit1fc30deb353a0fba7f513a0f14ac41e6292b7e13
tree945d0486a2bb79e37ee7bde7ea9de510362f5c0d
parent04ec85aeca01ec0b49a309bdd9d0ad0cddbfed47
mac80211: Fix sta->last_tx_rate setting with no-op rate control devices

The sta->last_tx_rate is traditionally updated just before transmitting a
frame based on information from the rate control algorithm. However, for
hardware drivers with IEEE80211_HW_HAS_RATE_CONTROL this is not performed,
as the rate control algorithm is not executed, and because the used rate is
not known before the frame has actually been transmitted.

This causes atleast a fixed 1Mb/s to be reported to user space. A few other
instances of code also rely on this information.

Fix this by setting the sta->last_tx_rate in tx_status handling. There, look
for last rates entry set by the driver, and use that as value for
sta->last_tx_rate.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/status.c