diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-01-27 14:13:17 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-01-28 15:44:29 -0500 |
commit | 6d744bacee8195c915c514409a81d470ce7b1177 (patch) | |
tree | 5697c3b9211b2ebae666f42a35c174ad15ee73a5 /net | |
parent | ebefce3d13f8b5a871337ff7c3821ee140c1ea8a (diff) | |
download | talos-obmc-linux-6d744bacee8195c915c514409a81d470ce7b1177.tar.gz talos-obmc-linux-6d744bacee8195c915c514409a81d470ce7b1177.zip |
mac80211: add MCS information to radiotap
This adds the MCS information we currently get
from the drivers into radiotap.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/rx.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index f36d70f5b062..7185c9316be2 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -85,6 +85,9 @@ ieee80211_rx_radiotap_len(struct ieee80211_local *local, if (len & 1) /* padding for RX_FLAGS if necessary */ len++; + if (status->flag & RX_FLAG_HT) /* HT info */ + len += 3; + return len; } @@ -193,6 +196,20 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local, rx_flags |= IEEE80211_RADIOTAP_F_RX_BADPLCP; put_unaligned_le16(rx_flags, pos); pos += 2; + + if (status->flag & RX_FLAG_HT) { + rthdr->it_present |= cpu_to_le32(1 << IEEE80211_RADIOTAP_MCS); + *pos++ = IEEE80211_RADIOTAP_MCS_HAVE_MCS | + IEEE80211_RADIOTAP_MCS_HAVE_GI | + IEEE80211_RADIOTAP_MCS_HAVE_BW; + *pos = 0; + if (status->flag & RX_FLAG_SHORT_GI) + *pos |= IEEE80211_RADIOTAP_MCS_SGI; + if (status->flag & RX_FLAG_40MHZ) + *pos |= IEEE80211_RADIOTAP_MCS_BW_40; + pos++; + *pos++ = status->rate_idx; + } } /* |