diff options
author | Helmut Schaa <helmut.schaa@googlemail.com> | 2010-12-01 10:34:45 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-06 15:58:43 -0500 |
commit | c1ce5a74d113f221d40625bd3ad83df2db2695b7 (patch) | |
tree | 29456d61473f3273d83420e3fa12f7476657adfd | |
parent | 5f79ed3b1aa7af260c82ba714b90907070aeca7a (diff) |
mac80211: Update last_tx_rate only for data frames
The last_tx_rate field was also updated for non-data frames that are
often sent with a lower rate (for example management frames at 1 Mbps).
This is confusing when the data rate is actually much higher.
Hence, only update the last_tx_rate field with tx rate information
gathered from last data frames.
If the rate control algorithm filled in txrc.reported_rate we don't need
to verify this information.
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | net/mac80211/tx.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 2ba742656825..5d6b0759d18c 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -666,10 +666,11 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx) | |||
666 | if (unlikely(info->control.rates[0].idx < 0)) | 666 | if (unlikely(info->control.rates[0].idx < 0)) |
667 | return TX_DROP; | 667 | return TX_DROP; |
668 | 668 | ||
669 | if (txrc.reported_rate.idx < 0) | 669 | if (txrc.reported_rate.idx < 0) { |
670 | txrc.reported_rate = info->control.rates[0]; | 670 | txrc.reported_rate = info->control.rates[0]; |
671 | 671 | if (tx->sta && ieee80211_is_data(hdr->frame_control)) | |
672 | if (tx->sta) | 672 | tx->sta->last_tx_rate = txrc.reported_rate; |
673 | } else if (tx->sta) | ||
673 | tx->sta->last_tx_rate = txrc.reported_rate; | 674 | tx->sta->last_tx_rate = txrc.reported_rate; |
674 | 675 | ||
675 | if (unlikely(!info->control.rates[0].count)) | 676 | if (unlikely(!info->control.rates[0].count)) |