Skip to content

Commit

Permalink
mac80211: add STBC encoding to ieee80211_parse_tx_radiotap
Browse files Browse the repository at this point in the history
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 <borgers@mi.fu-berlin.de>
Link: https://lore.kernel.org/r/20210125150744.83065-1-borgers@mi.fu-berlin.de
[use u8_get_bits/u32_encode_bits instead of manually shifting]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Philipp Borgers authored and Johannes Berg committed Feb 12, 2021
1 parent c0eb09a commit 549fdd3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions net/mac80211/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2122,6 +2122,15 @@ bool ieee80211_parse_tx_radiotap(struct sk_buff *skb,
if (mcs_known & IEEE80211_RADIOTAP_MCS_HAVE_FEC &&
mcs_flags & IEEE80211_RADIOTAP_MCS_FEC_LDPC)
info->flags |= IEEE80211_TX_CTL_LDPC;

if (mcs_known & IEEE80211_RADIOTAP_MCS_HAVE_STBC) {
u8 stbc = u8_get_bits(mcs_flags,
IEEE80211_RADIOTAP_MCS_STBC_MASK);

info->flags |=
u32_encode_bits(stbc,
IEEE80211_TX_CTL_STBC);
}
break;

case IEEE80211_RADIOTAP_VHT:
Expand Down

0 comments on commit 549fdd3

Please sign in to comment.