tracing: Ftrace dynamic ftrace_event_call support
[safe/jmp/linux-2.6] / include / net / ieee80211_radiotap.h
index 22e0477..23c3f3d 100644 (file)
@@ -1,7 +1,4 @@
-/* $FreeBSD: src/sys/net80211/ieee80211_radiotap.h,v 1.5 2005/01/22 20:12:05 sam Exp $ */
-/* $NetBSD: ieee80211_radiotap.h,v 1.11 2005/06/22 06:16:02 dyoung Exp $ */
-
-/*-
+/*
  * Copyright (c) 2003, 2004 David Young.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -40,9 +37,8 @@
 
 #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"
 /* Base version of the radiotap packet header data */
 #define PKTHDR_RADIOTAP_VERSION                0
 
  * readers.
  */
 
-/* XXX tcpdump/libpcap do not tolerate variable-length headers,
- * yet, so we pad every radiotap header to 64 bytes. Ugh.
- */
-#define IEEE80211_RADIOTAP_HDRLEN      64
-
-/* The radio capture header precedes the 802.11 header.
+/*
+ * The radio capture header precedes the 802.11 header.
  * All data in the header is little endian on all platforms.
  */
 struct ieee80211_radiotap_header {
@@ -238,8 +230,10 @@ enum ieee80211_radiotap_type {
                                                 * 802.11 header and payload
                                                 * (to 32-bit boundary)
                                                 */
+#define IEEE80211_RADIOTAP_F_BADFCS    0x40    /* bad FCS */
+
 /* For IEEE80211_RADIOTAP_RX_FLAGS */
-#define IEEE80211_RADIOTAP_F_RX_BADFCS 0x0001  /* frame failed crc check */
+#define IEEE80211_RADIOTAP_F_RX_BADPLCP        0x0002  /* frame has bad PLCP */
 
 /* For IEEE80211_RADIOTAP_TX_FLAGS */
 #define IEEE80211_RADIOTAP_F_TX_FAIL   0x0001  /* failed due to excessive
@@ -261,7 +255,7 @@ static inline int ieee80211_get_radiotap_len(unsigned char *data)
        struct ieee80211_radiotap_header *hdr =
                (struct ieee80211_radiotap_header *)data;
 
-       return le16_to_cpu(hdr->it_len);
+       return get_unaligned_le16(&hdr->it_len);
 }
 
 #endif                         /* IEEE80211_RADIOTAP_H */