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 the last data frames. Cc: Johannes Berg <johannes@xxxxxxxxxxxxxxxx> Signed-off-by: Helmut Schaa <helmut.schaa@xxxxxxxxxxxxxx> --- Not sure if there are any reasons why somebody would like to see the "real" last tx rate including management frames? net/mac80211/tx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index e694836..f753081 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -669,7 +669,7 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx) if (txrc.reported_rate.idx < 0) txrc.reported_rate = info->control.rates[0]; - if (tx->sta) + if (tx->sta && ieee80211_is_data(hdr->frame_control)) tx->sta->last_tx_rate = txrc.reported_rate; if (unlikely(!info->control.rates[0].count)) -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html