]> git.ipfire.org Git - thirdparty/hostap.git/blame - src/utils/platform.h
tests: HE AP parameters
[thirdparty/hostap.git] / src / utils / platform.h
CommitLineData
dcdce147
IP
1#ifndef PLATFORM_H
2#define PLATFORM_H
3
4#include "includes.h"
5#include "common.h"
6
7#define le16_to_cpu le_to_host16
8#define le32_to_cpu le_to_host32
bacb984b 9
bacb984b
JB
10#define get_unaligned(p) \
11({ \
12 struct packed_dummy_struct { \
13 typeof(*(p)) __val; \
14 } __attribute__((packed)) *__ptr = (void *) (p); \
15 \
16 __ptr->__val; \
17})
fad6485c
JM
18#define get_unaligned_le16(p) le16_to_cpu(get_unaligned((le16 *)(p)))
19#define get_unaligned_le32(p) le32_to_cpu(get_unaligned((le32 *)(p)))
dcdce147
IP
20
21#endif /* PLATFORM_H */