浏览代码

mac80211: update last_tx_rate only for data frame

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>
Chun-Yeow Yeoh 11 年之前
父节点
当前提交
00a9a6d1e2
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      net/mac80211/status.c

+ 1 - 0
net/mac80211/status.c

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