Go to the documentation of this file.
17 #ifndef __UNIFI_OS_LINUX_H__
18 #define __UNIFI_OS_LINUX_H__ 1
20 #include <linux/kernel.h>
21 #include <linux/time.h>
22 #include <linux/list.h>
24 #include <linux/string.h>
38 #define CSR_WIFI_ALIGN_BYTES 4
46 #define unifi2host_16(n) (__le16_to_cpu((n)))
47 #define unifi2host_32(n) (__le32_to_cpu((n)))
48 #define host2unifi_16(n) (__cpu_to_le16((n)))
49 #define host2unifi_32(n) (__cpu_to_le32((n)))
64 #define func_enter() \
66 if (unifi_debug >= 5) { \
67 printk("unifi: => %s\n", __FUNCTION__); \
72 if (unifi_debug >= 5) { \
73 printk("unifi: <= %s\n", __FUNCTION__); \
76 #define func_exit_r(_rc) \
78 if (unifi_debug >= 5) { \
79 printk("unifi: <= %s %d\n", __FUNCTION__, (int)(_rc)); \
84 #define ASSERT(cond) \
87 printk("Assertion failed in %s at %s:%d: %s\n", \
88 __FUNCTION__, __FILE__, __LINE__, #cond); \
93 void unifi_dump(
void *ospriv,
int lvl,
const char *
msg,
void *
mem,
u16 len);
96 #ifdef CSR_WIFI_HIP_DEBUG_OFFLINE
97 void dump_str(
void *
mem,
u16 len);
112 #define func_exit_r(_rc)
116 static inline void unifi_dump(
void *ospriv,
int lvl,
const char *
msg,
void *
mem,
u16 len) {}
117 static inline void dump(
void *
mem,
u16 len) {}
119 #ifdef CSR_WIFI_HIP_DEBUG_OFFLINE
120 static inline void dump_str(
void *
mem,
u16 len) {}
125 #define unifi_error if(1);else unifi_error_nop
126 #define unifi_warning if(1);else unifi_error_nop
127 #define unifi_notice if(1);else unifi_error_nop
128 #define unifi_info if(1);else unifi_error_nop
129 #define unifi_trace if(1);else unifi_trace_nop