summaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
authorIlan Peer <ilan.peer@intel.com>2018-12-15 04:03:25 -0500
committerJohannes Berg <johannes.berg@intel.com>2018-12-19 03:41:10 -0500
commitd359bbce0601c6a19203a4b813a7e3910fcba282 (patch)
treef2fd4c1eb80b2164e3d8b5b976fd49032009b4b7 /net/mac80211/rx.c
parent93bc8ac49e82a329160604556b805b7fa614ff9e (diff)
mac80211: Properly access radiotap vendor data
The radiotap vendor data might be placed after some other radiotap elements, and thus when accessing it, need to access the correct offset in the skb data. Fix the code accordingly. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index c90904ce6e99..b33d37186576 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -762,8 +762,12 @@ ieee80211_rx_monitor(struct ieee80211_local *local, struct sk_buff *origskb,
762 if (status->flag & RX_FLAG_RADIOTAP_HE_MU) 762 if (status->flag & RX_FLAG_RADIOTAP_HE_MU)
763 rtap_space += sizeof(struct ieee80211_radiotap_he_mu); 763 rtap_space += sizeof(struct ieee80211_radiotap_he_mu);
764 764
765 if (status->flag & RX_FLAG_RADIOTAP_LSIG)
766 rtap_space += sizeof(struct ieee80211_radiotap_lsig);
767
765 if (unlikely(status->flag & RX_FLAG_RADIOTAP_VENDOR_DATA)) { 768 if (unlikely(status->flag & RX_FLAG_RADIOTAP_VENDOR_DATA)) {
766 struct ieee80211_vendor_radiotap *rtap = (void *)origskb->data; 769 struct ieee80211_vendor_radiotap *rtap =
770 (void *)(origskb->data + rtap_space);
767 771
768 rtap_space += sizeof(*rtap) + rtap->len + rtap->pad; 772 rtap_space += sizeof(*rtap) + rtap->len + rtap->pad;
769 } 773 }