]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/net/ieee80211_radiotap.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
[linux-2.6-omap-h63xx.git] / include / net / ieee80211_radiotap.h
index a0c2b41a24d7d2174cd7ca9d7f8c98d8ca1ea56c..d364fd594ea4d7f2b3f088f460e2e2bc09ae6697 100644 (file)
@@ -40,6 +40,7 @@
 
 #include <linux/if_ether.h>
 #include <linux/kernel.h>
+#include <asm/unaligned.h>
 
 /* Radiotap header version (from official NetBSD feed) */
 #define IEEE80211RADIOTAP_VERSION      "1.5"
@@ -255,4 +256,13 @@ enum ieee80211_radiotap_type {
        (((x) == 14) ? 2484 : ((x) * 5) + 2407) : \
        ((x) + 1000) * 5)
 
+/* helpers */
+static inline int ieee80211_get_radiotap_len(unsigned char *data)
+{
+       struct ieee80211_radiotap_header *hdr =
+               (struct ieee80211_radiotap_header *)data;
+
+       return get_unaligned_le16(&hdr->it_len);
+}
+
 #endif                         /* IEEE80211_RADIOTAP_H */