aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/mac80211/rx.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index bb4d71efb6fb..c97018dd17fe 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -5,7 +5,7 @@
5 * Copyright 2007-2010 Johannes Berg <johannes@sipsolutions.net> 5 * Copyright 2007-2010 Johannes Berg <johannes@sipsolutions.net>
6 * Copyright 2013-2014 Intel Mobile Communications GmbH 6 * Copyright 2013-2014 Intel Mobile Communications GmbH
7 * Copyright(c) 2015 - 2017 Intel Deutschland GmbH 7 * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
8 * Copyright (C) 2018 Intel Corporation 8 * Copyright (C) 2018-2019 Intel Corporation
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as 11 * it under the terms of the GNU General Public License version 2 as
@@ -208,7 +208,24 @@ ieee80211_rx_radiotap_hdrlen(struct ieee80211_local *local,
208 } 208 }
209 209
210 if (status->flag & RX_FLAG_RADIOTAP_VENDOR_DATA) { 210 if (status->flag & RX_FLAG_RADIOTAP_VENDOR_DATA) {
211 struct ieee80211_vendor_radiotap *rtap = (void *)skb->data; 211 struct ieee80211_vendor_radiotap *rtap;
212 int vendor_data_offset = 0;
213
214 /*
215 * The position to look at depends on the existence (or non-
216 * existence) of other elements, so take that into account...
217 */
218 if (status->flag & RX_FLAG_RADIOTAP_HE)
219 vendor_data_offset +=
220 sizeof(struct ieee80211_radiotap_he);
221 if (status->flag & RX_FLAG_RADIOTAP_HE_MU)
222 vendor_data_offset +=
223 sizeof(struct ieee80211_radiotap_he_mu);
224 if (status->flag & RX_FLAG_RADIOTAP_LSIG)
225 vendor_data_offset +=
226 sizeof(struct ieee80211_radiotap_lsig);
227
228 rtap = (void *)&skb->data[vendor_data_offset];
212 229
213 /* alignment for fixed 6-byte vendor data header */ 230 /* alignment for fixed 6-byte vendor data header */
214 len = ALIGN(len, 2); 231 len = ALIGN(len, 2);