From f7397a271246d39df5ba470e8d1d5e7d76a940be Mon Sep 17 00:00:00 2001 From: Juuso Oikarinen Date: Thu, 22 Apr 2010 10:27:48 +0300 Subject: [PATCH] --- yaml --- r: 194659 b: refs/heads/master c: 0c86980817853e4166f66c7cd18bc5fe1adeb5f7 h: refs/heads/master i: 194657: 4f21d665ff05bae6de96927219b2d4a57fe93069 194655: 43bdffdd74713fbe9f26097907161081d7a93e90 v: v3 --- [refs] | 2 +- trunk/net/mac80211/status.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index d05a048d24d3..00c1ca51fa3b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5af55428858a45d94893fd6124d60988e89c0d59 +refs/heads/master: 0c86980817853e4166f66c7cd18bc5fe1adeb5f7 diff --git a/trunk/net/mac80211/status.c b/trunk/net/mac80211/status.c index 11805a3a626f..94613af009f3 100644 --- a/trunk/net/mac80211/status.c +++ b/trunk/net/mac80211/status.c @@ -171,6 +171,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) struct net_device *prev_dev = NULL; struct sta_info *sta, *tmp; int retry_count = -1, i; + int rates_idx = -1; bool send_to_cooked; for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { @@ -178,6 +179,8 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) if (i >= hw->max_rates) { info->status.rates[i].idx = -1; info->status.rates[i].count = 0; + } else if (info->status.rates[i].idx >= 0) { + rates_idx = i; } retry_count += info->status.rates[i].count; @@ -206,6 +209,10 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) return; } + if ((local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) && + (rates_idx != -1)) + sta->last_tx_rate = info->status.rates[rates_idx]; + if ((info->flags & IEEE80211_TX_STAT_AMPDU_NO_BACK) && (ieee80211_is_data_qos(fc))) { u16 tid, ssn;