diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-09-07 09:51:01 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-09-07 09:51:01 +0000 |
commit | b76dbdab2b88f47e9f42e9d413935bd43c6fdf0f (patch) | |
tree | 87856ddc988457226541fb7ff2657d170dfa3bc0 /src/transport/ieee80211_radiotap.h | |
parent | e235a13a6a660da6f4f89139824cc30f59c67e6e (diff) | |
download | gnunet-b76dbdab2b88f47e9f42e9d413935bd43c6fdf0f.tar.gz gnunet-b76dbdab2b88f47e9f42e9d413935bd43c6fdf0f.zip |
fix warnings
Diffstat (limited to 'src/transport/ieee80211_radiotap.h')
-rw-r--r-- | src/transport/ieee80211_radiotap.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/transport/ieee80211_radiotap.h b/src/transport/ieee80211_radiotap.h index bfcc2180c..91d197995 100644 --- a/src/transport/ieee80211_radiotap.h +++ b/src/transport/ieee80211_radiotap.h | |||
@@ -37,7 +37,7 @@ | |||
37 | 37 | ||
38 | #include <linux/if_ether.h> | 38 | #include <linux/if_ether.h> |
39 | #include <linux/kernel.h> | 39 | #include <linux/kernel.h> |
40 | //#include <asm/unaligned.h> | 40 | // #include <asm/unaligned.h> |
41 | 41 | ||
42 | /* Base version of the radiotap packet header data */ | 42 | /* Base version of the radiotap packet header data */ |
43 | #define PKTHDR_RADIOTAP_VERSION 0 | 43 | #define PKTHDR_RADIOTAP_VERSION 0 |
@@ -254,12 +254,18 @@ enum ieee80211_radiotap_type { | |||
254 | ((x) + 1000) * 5) | 254 | ((x) + 1000) * 5) |
255 | 255 | ||
256 | /* helpers */ | 256 | /* helpers */ |
257 | static inline u16 get_unaligned_le16(const u8 *p) | ||
258 | { | ||
259 | return p[0] | p[1] << 8; | ||
260 | } | ||
261 | |||
262 | |||
257 | static inline int ieee80211_get_radiotap_len(unsigned char *data) | 263 | static inline int ieee80211_get_radiotap_len(unsigned char *data) |
258 | { | 264 | { |
259 | struct ieee80211_radiotap_header *hdr = | 265 | struct ieee80211_radiotap_header *hdr = |
260 | (struct ieee80211_radiotap_header *)data; | 266 | (struct ieee80211_radiotap_header *)data; |
261 | 267 | ||
262 | return get_unaligned_le16(&hdr->it_len); | 268 | return get_unaligned_le16( (const u8 *) &hdr->it_len); |
263 | } | 269 | } |
264 | 270 | ||
265 | #endif /* IEEE80211_RADIOTAP_H */ | 271 | #endif /* IEEE80211_RADIOTAP_H */ |