From: Helmut Schaa <helmut.schaa@googlemail.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org,
Helmut Schaa <helmut.schaa@googlemail.com>,
Johannes Berg <johannes@sipsolutions.net>
Subject: [PATCH] mac80211: Update last_tx_rate only for data frames
Date: Wed, 1 Dec 2010 12:18:22 +0100 [thread overview]
Message-ID: <1291202302-9698-1-git-send-email-helmut.schaa@googlemail.com> (raw)
The last_tx_rate field was also updated for non-data frames that are
often sent with a lower rate (for example management frames at 1 Mbps).
This is confusing when the data rate is actually much higher.
Hence, only update the last_tx_rate field with tx rate information
gathered from the last data frames.
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
---
Not sure if there are any reasons why somebody would like to see the "real"
last tx rate including management frames?
net/mac80211/tx.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index e694836..f753081 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -669,7 +669,7 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx)
if (txrc.reported_rate.idx < 0)
txrc.reported_rate = info->control.rates[0];
- if (tx->sta)
+ if (tx->sta && ieee80211_is_data(hdr->frame_control))
tx->sta->last_tx_rate = txrc.reported_rate;
if (unlikely(!info->control.rates[0].count))
--
1.7.1
next reply other threads:[~2010-12-01 11:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-01 11:18 Helmut Schaa [this message]
2010-12-01 14:04 ` [PATCH] mac80211: Update last_tx_rate only for data frames Mohammed Shafi
2010-12-01 14:40 ` Helmut Schaa
2010-12-01 15:03 ` Mohammed Shafi
2010-12-01 15:14 ` Helmut Schaa
2010-12-01 15:21 ` Mohammed Shafi
2010-12-01 16:54 ` Larry Finger
2010-12-01 15:34 ` [PATCHv2] " Helmut Schaa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1291202302-9698-1-git-send-email-helmut.schaa@googlemail.com \
--to=helmut.schaa@googlemail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).