Skip to content

Commit 549fdd3

Browse files
booojmberg-intel
authored andcommitted
mac80211: add STBC encoding to ieee80211_parse_tx_radiotap
This patch adds support for STBC encoding to the radiotap tx parse function. Prior to this change adding the STBC flag to the radiotap header did not encode frames with STBC. Signed-off-by: Philipp Borgers <[email protected]> Link: https://lore.kernel.org/r/[email protected] [use u8_get_bits/u32_encode_bits instead of manually shifting] Signed-off-by: Johannes Berg <[email protected]>
1 parent c0eb09a commit 549fdd3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

net/mac80211/tx.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2122,6 +2122,15 @@ bool ieee80211_parse_tx_radiotap(struct sk_buff *skb,
21222122
if (mcs_known & IEEE80211_RADIOTAP_MCS_HAVE_FEC &&
21232123
mcs_flags & IEEE80211_RADIOTAP_MCS_FEC_LDPC)
21242124
info->flags |= IEEE80211_TX_CTL_LDPC;
2125+
2126+
if (mcs_known & IEEE80211_RADIOTAP_MCS_HAVE_STBC) {
2127+
u8 stbc = u8_get_bits(mcs_flags,
2128+
IEEE80211_RADIOTAP_MCS_STBC_MASK);
2129+
2130+
info->flags |=
2131+
u32_encode_bits(stbc,
2132+
IEEE80211_TX_CTL_STBC);
2133+
}
21252134
break;
21262135

21272136
case IEEE80211_RADIOTAP_VHT:

0 commit comments

Comments
 (0)