net:wireless:Support eswin usb wifi ECR6600U
[platform/kernel/linux-starfive.git] / drivers / net / wireless / eswin / lmac_types.h
1 /**
2  ****************************************************************************************
3  *
4  * @file co_types.h
5  *
6  * @brief This file replaces the need to include stdint or stdbool typical headers,
7  *        which may not be available in all toolchains, and adds new types
8  *
9  * Copyright (C) ESWIN 2015-2020
10  *
11  * $Rev: $
12  *
13  ****************************************************************************************
14  */
15
16 #ifndef _LMAC_INT_H_
17 #define _LMAC_INT_H_
18
19
20 /**
21  ****************************************************************************************
22  * @addtogroup CO_INT
23  * @ingroup COMMON
24  * @brief Common integer standard types (removes use of stdint)
25  *
26  * @{
27  ****************************************************************************************
28  */
29
30
31 /*
32  * DEFINES
33  ****************************************************************************************
34  */
35
36 #include <linux/version.h>
37 #include <linux/types.h>
38 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
39 #include <linux/bits.h>
40 #else
41 #include <linux/bitops.h>
42 #endif
43
44 #ifdef CONFIG_ECRNX_TL4
45 typedef uint16_t u8_l;
46 typedef int16_t s8_l;
47 typedef uint16_t bool_l;
48 #else
49 typedef uint8_t u8_l;
50 typedef int8_t s8_l;
51 typedef bool bool_l;
52 #endif
53 typedef uint16_t u16_l;
54 typedef int16_t s16_l;
55 typedef uint32_t u32_l;
56 typedef int32_t s32_l;
57 typedef uint64_t u64_l;
58
59 #define ALIGNED(n)  __attribute__((aligned (n)))
60
61 #if (__SIZEOF_POINTER__ == 8)
62 #define  ptr_addr    u64_l
63 #else
64 #define  ptr_addr    u32_l
65 #endif
66
67
68 /// @} CO_INT
69 #endif // _LMAC_INT_H_