summaryrefslogtreecommitdiff
path: root/net/mac80211
diff options
context:
space:
mode:
authorP Praneesh <quic_ppranees@quicinc.com>2021-11-30 23:20:47 +0530
committerJohannes Berg <johannes.berg@intel.com>2021-12-20 10:25:00 +0100
commit57553c3a6cfe5a30c40c334e4f3b4ece06764b36 (patch)
tree65cba918af28dea850f9354ca0d30fcffc66e7fe /net/mac80211
parent6a789ba679d652587532cec2a0e0274fda172f3b (diff)
mac80211: fix FEC flag in radio tap header
In mac80211, while building radiotap header IEEE80211_RADIOTAP_MCS_HAVE_FEC flag is missing when LDPC enabled from driver, hence LDPC is not updated properly in radiotap header. Fix that by adding HAVE_FEC flag while building radiotap header. Signed-off-by: P Praneesh <quic_ppranees@quicinc.com> Link: https://lore.kernel.org/r/1638294648-844-2-git-send-email-quic_ppranees@quicinc.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/rx.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 9541a4c30aca..be12fa8f2633 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -465,7 +465,12 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
unsigned int stbc;
rthdr->it_present |= cpu_to_le32(BIT(IEEE80211_RADIOTAP_MCS));
- *pos++ = local->hw.radiotap_mcs_details;
+ *pos = local->hw.radiotap_mcs_details;
+ if (status->enc_flags & RX_ENC_FLAG_HT_GF)
+ *pos |= IEEE80211_RADIOTAP_MCS_HAVE_FMT;
+ if (status->enc_flags & RX_ENC_FLAG_LDPC)
+ *pos |= IEEE80211_RADIOTAP_MCS_HAVE_FEC;
+ pos++;
*pos = 0;
if (status->enc_flags & RX_ENC_FLAG_SHORT_GI)
*pos |= IEEE80211_RADIOTAP_MCS_SGI;