* [PATCH 2/2]: mac80211: report correct MCS information in tx status info
@ 2011-05-19 23:13 Matteo Croce
2011-05-20 15:13 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Matteo Croce @ 2011-05-19 23:13 UTC (permalink / raw)
To: linux-wireless
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2]: mac80211: report correct MCS information in tx status info
2011-05-19 23:13 [PATCH 2/2]: mac80211: report correct MCS information in tx status info Matteo Croce
@ 2011-05-20 15:13 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2011-05-20 15:13 UTC (permalink / raw)
To: Matteo Croce; +Cc: linux-wireless
On Fri, 2011-05-20 at 01:13 +0200, Matteo Croce wrote:
> 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);
This means the part that I just commented on from the other patch is
wrong. Think about this again, about how radiotap works etc. You're
creating an invalid radiotap header that's too long if MCS rates aren't
used.
johannes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-20 15:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-19 23:13 [PATCH 2/2]: mac80211: report correct MCS information in tx status info Matteo Croce
2011-05-20 15:13 ` Johannes Berg
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).