aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/mac80211.h2
-rw-r--r--net/mac80211/status.c23
2 files changed, 24 insertions, 1 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 021317367d55..dc1123aa8181 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -2522,7 +2522,7 @@ static inline int ieee80211_sta_ps_transition_ni(struct ieee80211_sta *sta,
2522 * The TX headroom reserved by mac80211 for its own tx_status functions. 2522 * The TX headroom reserved by mac80211 for its own tx_status functions.
2523 * This is enough for the radiotap header. 2523 * This is enough for the radiotap header.
2524 */ 2524 */
2525#define IEEE80211_TX_STATUS_HEADROOM 13 2525#define IEEE80211_TX_STATUS_HEADROOM 14
2526 2526
2527/** 2527/**
2528 * ieee80211_sta_set_buffered - inform mac80211 about driver-buffered frames 2528 * ieee80211_sta_set_buffered - inform mac80211 about driver-buffered frames
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/*