diff options
Diffstat (limited to 'include/net/ieee80211_radiotap.h')
-rw-r--r-- | include/net/ieee80211_radiotap.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h index a0c2b41a24d7..dfd8bf66ce27 100644 --- a/include/net/ieee80211_radiotap.h +++ b/include/net/ieee80211_radiotap.h | |||
@@ -40,6 +40,7 @@ | |||
40 | 40 | ||
41 | #include <linux/if_ether.h> | 41 | #include <linux/if_ether.h> |
42 | #include <linux/kernel.h> | 42 | #include <linux/kernel.h> |
43 | #include <asm/unaligned.h> | ||
43 | 44 | ||
44 | /* Radiotap header version (from official NetBSD feed) */ | 45 | /* Radiotap header version (from official NetBSD feed) */ |
45 | #define IEEE80211RADIOTAP_VERSION "1.5" | 46 | #define IEEE80211RADIOTAP_VERSION "1.5" |
@@ -255,4 +256,13 @@ enum ieee80211_radiotap_type { | |||
255 | (((x) == 14) ? 2484 : ((x) * 5) + 2407) : \ | 256 | (((x) == 14) ? 2484 : ((x) * 5) + 2407) : \ |
256 | ((x) + 1000) * 5) | 257 | ((x) + 1000) * 5) |
257 | 258 | ||
259 | /* helpers */ | ||
260 | static inline int ieee80211_get_radiotap_len(unsigned char *data) | ||
261 | { | ||
262 | struct ieee80211_radiotap_header *hdr = | ||
263 | (struct ieee80211_radiotap_header *)data; | ||
264 | |||
265 | return le16_to_cpu(get_unaligned(&hdr->it_len)); | ||
266 | } | ||
267 | |||
258 | #endif /* IEEE80211_RADIOTAP_H */ | 268 | #endif /* IEEE80211_RADIOTAP_H */ |