ea121f9b7fb0888864b8bb81174f40aead9ed590
1 #ifndef LINUX_WLAN_COMMON_H
2 #define LINUX_WLAN_COMMON_H
15 /*Added by amr - BugID_4720*/
25 #define GENERIC_DBG (1 << Generic_debug)
26 #define HOSTAPD_DBG (1 << Hostapd_debug)
27 #define HOSTINF_DBG (1 << Hostinf_debug)
28 #define CORECONFIG_DBG (1 << Coreconfig_debug)
29 #define CFG80211_DBG (1 << CFG80211_debug)
30 #define INT_DBG (1 << Interrupt_debug)
31 #define TX_DBG (1 << TX_debug)
32 #define RX_DBG (1 << RX_debug)
33 #define LOCK_DBG (1 << Lock_debug)
34 #define TCP_ENH (1 << Tcp_enhance)
35 #define SPIN_DEBUG (1 << Spin_debug)
36 #define INIT_DBG (1 << Init_debug)
37 #define BUS_DBG (1 << Bus_debug)
38 #define MEM_DBG (1 << Mem_debug)
39 #define FIRM_DBG (1 << Firmware_debug)
41 #if defined (WILC_DEBUGFS)
42 int wilc_debugfs_init(void);
43 void wilc_debugfs_remove(void);
45 extern atomic_t REGION
;
46 extern atomic_t DEBUG_LEVEL
;
48 #define DEBUG (1 << 0)
53 #define PRINT_D(region, ...) \
55 if ((atomic_read(&DEBUG_LEVEL) & DEBUG) && \
56 ((atomic_read(®ION)) & (region))) { \
57 printk("DBG [%s: %d]", __func__, __LINE__); \
58 printk(__VA_ARGS__); \
62 #define PRINT_INFO(region, ...) \
64 if ((atomic_read(&DEBUG_LEVEL) & INFO) && \
65 ((atomic_read(®ION)) & (region))) { \
66 printk("INFO [%s]", __func__); \
67 printk(__VA_ARGS__); \
71 #define PRINT_WRN(region, ...) \
73 if ((atomic_read(&DEBUG_LEVEL) & WRN) && \
74 ((atomic_read(®ION)) & (region))) { \
75 printk("WRN [%s: %d]", __func__, __LINE__); \
76 printk(__VA_ARGS__); \
80 #define PRINT_ER(...) \
82 if ((atomic_read(&DEBUG_LEVEL) & ERR)) { \
83 printk("ERR [%s: %d]", __func__, __LINE__); \
84 printk(__VA_ARGS__); \
90 #define REGION (INIT_DBG | GENERIC_DBG | CFG80211_DBG | FIRM_DBG | HOSTAPD_DBG)
96 #define PRINT_D(region, ...) \
98 if (DEBUG == 1 && ((REGION)&(region))) { \
99 printk("DBG [%s: %d]", __func__, __LINE__); \
100 printk(__VA_ARGS__); \
104 #define PRINT_INFO(region, ...) \
106 if (INFO == 1 && ((REGION)&(region))) { \
107 printk("INFO [%s]", __func__); \
108 printk(__VA_ARGS__); \
112 #define PRINT_WRN(region, ...) \
114 if (WRN == 1 && ((REGION)&(region))) { \
115 printk("WRN [%s: %d]", __func__, __LINE__); \
116 printk(__VA_ARGS__); \
120 #define PRINT_ER(...) \
122 printk("ERR [%s: %d]", __func__, __LINE__); \
123 printk(__VA_ARGS__); \
127 #define FN_IN /* PRINT_D(">>> \n") */
128 #define FN_OUT /* PRINT_D("<<<\n") */
131 #define LINUX_RX_SIZE (96 * 1024)
133 #define LINUX_TX_SIZE (64 * 1024)
136 #define WILC_MULTICAST_TABLE_SIZE 8
138 #if defined (BEAGLE_BOARD)
139 #define SPI_CHANNEL 4
142 #define MODALIAS "wilc_spi4"
145 #define MODALIAS "wilc_spi3"
148 #elif defined(PANDA_BOARD)
149 #define MODALIAS "WILC_SPI"
151 #elif defined(PLAT_WMS8304) /* rachel */
152 #define MODALIAS "wilc_spi"
154 #elif defined (PLAT_RKXXXX)
155 #define MODALIAS "WILC_IRQ"
156 #define GPIO_NUM RK30_PIN3_PD2 /* RK30_PIN3_PA1 */
158 /* RK2928_PIN1_PA7 */
160 #elif defined(CUSTOMER_PLATFORM)
162 TODO : specify MODALIAS name and GPIO number. This is certainly necessary for SPI interface.
165 * #define MODALIAS "WILC_SPI"
166 * #define GPIO_NUM 139
170 /* base on SAMA5D3_Xplained Board */
171 #define MODALIAS "WILC_SPI"
172 #define GPIO_NUM 0x44
176 void linux_wlan_enable_irq(void);
This page took 0.035386 seconds and 4 git commands to generate.