]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/net/ieee80211_radiotap.h
[SUNRPC]: Make xprtsock.c:xs_setup_{udp,tcp}() static
[linux-2.6-omap-h63xx.git] / include / net / ieee80211_radiotap.h
index f3bc00ee628b14f0bb0d0794988104c9433774fb..dfd8bf66ce274f99e486cf80794980f255b398ae 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"
@@ -186,9 +187,6 @@ struct ieee80211_radiotap_header {
  *
  *     Number of unicast retries a transmitted frame used.
  *
- * IEEE80211_RADIOTAP_FCS              __le32       data
- *
- *     FCS from frame in network byte order.
  */
 enum ieee80211_radiotap_type {
        IEEE80211_RADIOTAP_TSFT = 0,
@@ -258,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 le16_to_cpu(get_unaligned(&hdr->it_len));
+}
+
 #endif                         /* IEEE80211_RADIOTAP_H */