Search Linux Wireless

[PATCH] mac80211: add STBC encoding to ieee80211_parse_tx_radiotap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
---
 net/mac80211/tx.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index ebb3228ce971..cd53675d9955 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2038,6 +2038,7 @@ bool ieee80211_parse_tx_radiotap(struct sk_buff *skb,
 	u16 vht_known;
 	u8 vht_mcs = 0, vht_nss = 0;
 	int i;
+	int stbc;
 
 	/* check for not even having the fixed radiotap header part */
 	if (unlikely(skb->len < sizeof(struct ieee80211_radiotap_header)))
@@ -2133,6 +2134,12 @@ bool ieee80211_parse_tx_radiotap(struct sk_buff *skb,
 			if (mcs_known & IEEE80211_RADIOTAP_MCS_HAVE_BW &&
 			    mcs_bw == IEEE80211_RADIOTAP_MCS_BW_40)
 				rate_flags |= IEEE80211_TX_RC_40_MHZ_WIDTH;
+
+			if (mcs_known & IEEE80211_RADIOTAP_MCS_HAVE_STBC) {
+				stbc = mcs_flags & IEEE80211_RADIOTAP_MCS_STBC_MASK;
+				stbc = stbc >> IEEE80211_RADIOTAP_MCS_STBC_SHIFT;
+				info->flags |= stbc << IEEE80211_TX_CTL_STBC_SHIFT;
+			}
 			break;
 
 		case IEEE80211_RADIOTAP_VHT:
-- 
2.30.0




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux