Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] mac80211: update last_tx_rate only for data frame
@ 2014-04-02  4:05 Chun-Yeow Yeoh
  2014-04-08  8:52 ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Chun-Yeow Yeoh @ 2014-04-02  4:05 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes, linville, Chun-Yeow Yeoh

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>
---
 net/mac80211/status.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index e6e574a..00ba90b 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -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];
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-08  8:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-02  4:05 [PATCH] mac80211: update last_tx_rate only for data frame Chun-Yeow Yeoh
2014-04-08  8:52 ` Johannes Berg
2014-04-08  8:59   ` Yeoh Chun-Yeow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox