From: Matteo Croce <matteo@openwrt.org>
To: linux-wireless@vger.kernel.org
Subject: [PATCH 2/2]: mac80211: report correct MCS information in tx status info
Date: Fri, 20 May 2011 01:13:07 +0200 [thread overview]
Message-ID: <BANLkTikcBcobbXzjGv4UtD952kHtrSsvNw@mail.gmail.com> (raw)
Report correct MCS information in tx status info
Signed-off-by: Matteo Croce <matteo@openwrt.org>
--- a/net/mac80211/status.c 2011-05-20 00:22:56.220640264 +0200
+++ b/net/mac80211/status.c 2011-05-20 00:24:14.010640270 +0200
@@ -405,6 +405,20 @@
!(info->status.rates[0].flags & IEEE80211_TX_RC_MCS))
rthdr->rate = sband->bitrates[
info->status.rates[0].idx].bitrate / 5;
+ /* HT rates */
+ if (info->status.rates[0].flags & IEEE80211_TX_RC_MCS) {
+ rthdr->hdr.it_present |=
+ cpu_to_le32(1 << IEEE80211_RADIOTAP_MCS);
+ rthdr->rate = 0;
+ rthdr->ht_known = IEEE80211_RADIOTAP_MCS_HAVE_BW |
+ IEEE80211_RADIOTAP_MCS_HAVE_MCS |
+ IEEE80211_RADIOTAP_MCS_HAVE_GI;
+ rthdr->ht_mcs = info->status.rates[0].idx;
+ if (info->status.rates[0].flags & IEEE80211_TX_RC_40_MHZ_WIDTH)
+ rthdr->ht_flag |= IEEE80211_RADIOTAP_MCS_BW_40;
+ if (info->status.rates[0].flags & IEEE80211_TX_RC_SHORT_GI)
+ rthdr->ht_flag |= IEEE80211_RADIOTAP_MCS_SGI;
+ }
/* for now report the total retry_count */
rthdr->data_retries = retry_count;
next reply other threads:[~2011-05-19 23:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-19 23:13 Matteo Croce [this message]
2011-05-20 15:13 ` [PATCH 2/2]: mac80211: report correct MCS information in tx status info Johannes Berg
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=BANLkTikcBcobbXzjGv4UtD952kHtrSsvNw@mail.gmail.com \
--to=matteo@openwrt.org \
--cc=linux-wireless@vger.kernel.org \
/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).