mac80211: add STBC flag for radiotap
Some chips can tell us if received frame was encoded with STBC or not. To make this information available in user space we can use updated radiotap specification: http://www.radiotap.org/defined-fields/MCS This patch will set number of STBC encoded spatial streams (Nss). The HAVE_STBC flag should be provided by driver. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:

committed by
Johannes Berg

parent
ce85788846
commit
786677d100
@@ -258,6 +258,8 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
|
||||
pos += 2;
|
||||
|
||||
if (status->flag & RX_FLAG_HT) {
|
||||
unsigned int stbc;
|
||||
|
||||
rthdr->it_present |= cpu_to_le32(1 << IEEE80211_RADIOTAP_MCS);
|
||||
*pos++ = local->hw.radiotap_mcs_details;
|
||||
*pos = 0;
|
||||
@@ -267,6 +269,8 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
|
||||
*pos |= IEEE80211_RADIOTAP_MCS_BW_40;
|
||||
if (status->flag & RX_FLAG_HT_GF)
|
||||
*pos |= IEEE80211_RADIOTAP_MCS_FMT_GF;
|
||||
stbc = (status->flag & RX_FLAG_STBC_MASK) >> RX_FLAG_STBC_SHIFT;
|
||||
*pos |= stbc << IEEE80211_RADIOTAP_MCS_STBC_SHIFT;
|
||||
pos++;
|
||||
*pos++ = status->rate_idx;
|
||||
}
|
||||
|
Reference in New Issue
Block a user