diff options
Diffstat (limited to 'net/mac80211/status.c')
-rw-r--r-- | net/mac80211/status.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index f97fa0a54cf6..df643cedf9b9 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
@@ -243,6 +243,11 @@ static int ieee80211_tx_radiotap_len(struct ieee80211_tx_info *info) | |||
243 | /* IEEE80211_RADIOTAP_DATA_RETRIES */ | 243 | /* IEEE80211_RADIOTAP_DATA_RETRIES */ |
244 | len += 1; | 244 | len += 1; |
245 | 245 | ||
246 | /* IEEE80211_TX_RC_MCS */ | ||
247 | if (info->status.rates[0].idx >= 0 && | ||
248 | info->status.rates[0].flags & IEEE80211_TX_RC_MCS) | ||
249 | len += 3; | ||
250 | |||
246 | return len; | 251 | return len; |
247 | } | 252 | } |
248 | 253 | ||
@@ -299,6 +304,24 @@ static void ieee80211_add_tx_radiotap_header(struct ieee80211_supported_band | |||
299 | /* for now report the total retry_count */ | 304 | /* for now report the total retry_count */ |
300 | *pos = retry_count; | 305 | *pos = retry_count; |
301 | pos++; | 306 | pos++; |
307 | |||
308 | /* IEEE80211_TX_RC_MCS */ | ||
309 | if (info->status.rates[0].idx >= 0 && | ||
310 | info->status.rates[0].flags & IEEE80211_TX_RC_MCS) { | ||
311 | rthdr->it_present |= cpu_to_le32(1 << IEEE80211_RADIOTAP_MCS); | ||
312 | pos[0] = IEEE80211_RADIOTAP_MCS_HAVE_MCS | | ||
313 | IEEE80211_RADIOTAP_MCS_HAVE_GI | | ||
314 | IEEE80211_RADIOTAP_MCS_HAVE_BW; | ||
315 | if (info->status.rates[0].flags & IEEE80211_TX_RC_SHORT_GI) | ||
316 | pos[1] |= IEEE80211_RADIOTAP_MCS_SGI; | ||
317 | if (info->status.rates[0].flags & IEEE80211_TX_RC_40_MHZ_WIDTH) | ||
318 | pos[1] |= IEEE80211_RADIOTAP_MCS_BW_40; | ||
319 | if (info->status.rates[0].flags & IEEE80211_TX_RC_GREEN_FIELD) | ||
320 | pos[1] |= IEEE80211_RADIOTAP_MCS_FMT_GF; | ||
321 | pos[2] = info->status.rates[0].idx; | ||
322 | pos += 3; | ||
323 | } | ||
324 | |||
302 | } | 325 | } |
303 | 326 | ||
304 | /* | 327 | /* |