]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mac80211: update last_tx_rate only for data frame
authorChun-Yeow Yeoh <yeohchunyeow@gmail.com>
Wed, 2 Apr 2014 04:05:09 +0000 (12:05 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 9 Apr 2014 08:50:45 +0000 (10:50 +0200)
Rate controller in firmware may also return the Tx Rate
used for management frame that is usually sent as lowest
Tx Rate (1Mbps in 2.4GHz). So update the last_tx_rate only
if it is data frame.

This patch is tested with ath9k_htc.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/status.c

index e6e574a307c8f3fd552329379919aaf9d071245d..00ba90b02ab2ab79c01d58dc5ba25785993f8dd6 100644 (file)
@@ -618,6 +618,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
                                        sta, true, acked);
 
                if ((local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) &&
+                   (ieee80211_is_data(hdr->frame_control)) &&
                    (rates_idx != -1))
                        sta->last_tx_rate = info->status.rates[rates_idx];