diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-01-27 08:13:17 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-01-28 15:44:29 -0500 |
commit | 6d744bacee8195c915c514409a81d470ce7b1177 (patch) | |
tree | 5697c3b9211b2ebae666f42a35c174ad15ee73a5 /net/mac80211/rx.c | |
parent | ebefce3d13f8b5a871337ff7c3821ee140c1ea8a (diff) |
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/mac80211/rx.c')
-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, | |||
85 | if (len & 1) /* padding for RX_FLAGS if necessary */ | 85 | if (len & 1) /* padding for RX_FLAGS if necessary */ |
86 | len++; | 86 | len++; |
87 | 87 | ||
88 | if (status->flag & RX_FLAG_HT) /* HT info */ | ||
89 | len += 3; | ||
90 | |||
88 | return len; | 91 | return len; |
89 | } | 92 | } |
90 | 93 | ||
@@ -193,6 +196,20 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local, | |||
193 | rx_flags |= IEEE80211_RADIOTAP_F_RX_BADPLCP; | 196 | rx_flags |= IEEE80211_RADIOTAP_F_RX_BADPLCP; |
194 | put_unaligned_le16(rx_flags, pos); | 197 | put_unaligned_le16(rx_flags, pos); |
195 | pos += 2; | 198 | pos += 2; |
199 | |||
200 | if (status->flag & RX_FLAG_HT) { | ||
201 | rthdr->it_present |= cpu_to_le32(1 << IEEE80211_RADIOTAP_MCS); | ||
202 | *pos++ = IEEE80211_RADIOTAP_MCS_HAVE_MCS | | ||
203 | IEEE80211_RADIOTAP_MCS_HAVE_GI | | ||
204 | IEEE80211_RADIOTAP_MCS_HAVE_BW; | ||
205 | *pos = 0; | ||
206 | if (status->flag & RX_FLAG_SHORT_GI) | ||
207 | *pos |= IEEE80211_RADIOTAP_MCS_SGI; | ||
208 | if (status->flag & RX_FLAG_40MHZ) | ||
209 | *pos |= IEEE80211_RADIOTAP_MCS_BW_40; | ||
210 | pos++; | ||
211 | *pos++ = status->rate_idx; | ||
212 | } | ||
196 | } | 213 | } |
197 | 214 | ||
198 | /* | 215 | /* |