Skip to content

Commit

Permalink
mac80211: update last_tx_rate only for data frame
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
chunyeow authored and jmberg-intel committed Apr 9, 2014
1 parent 9b4816f commit 00a9a6d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/mac80211/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down

0 comments on commit 00a9a6d

Please sign in to comment.