* [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
* Re: [PATCH] mac80211: update last_tx_rate only for data frame
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
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2014-04-08 8:52 UTC (permalink / raw)
To: Chun-Yeow Yeoh; +Cc: linux-wireless, linville
On Wed, 2014-04-02 at 12:05 +0800, Chun-Yeow Yeoh wrote:
> 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.
I guess this makes some sense, although maybe the rate shouldn't be
reported then?
johannes
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mac80211: update last_tx_rate only for data frame
2014-04-08 8:52 ` Johannes Berg
@ 2014-04-08 8:59 ` Yeoh Chun-Yeow
0 siblings, 0 replies; 3+ messages in thread
From: Yeoh Chun-Yeow @ 2014-04-08 8:59 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless@vger.kernel.org, John Linville
On Tue, Apr 8, 2014 at 4:52 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Wed, 2014-04-02 at 12:05 +0800, Chun-Yeow Yeoh wrote:
>> 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.
>
> I guess this makes some sense, although maybe the rate shouldn't be
> reported then?
If you are referring to the last_tx_rate, we are using this to
calculate the Airtime Link Metric in the mesh mode.
----
Chun-Yeow
^ permalink raw reply [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