xref: /titanic_41/usr/src/uts/common/io/ipw/ipw2100.h (revision 49d3bc91e27cd871b950d56c01398fa2f2e12ab4)
1 /*
2  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 
6 #ifndef _SYS_IPW2100_H
7 #define	_SYS_IPW2100_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /*
14  * Intel Wireless PRO/2100 mini-PCI adapter driver
15  * ipw2100.h: common definitions and interface to user land application
16  */
17 #include <sys/types.h>
18 #include <sys/ddi.h>
19 #include <sys/sunddi.h>
20 
21 #define	IPW2100_DRV_NAME  "ipw"
22 #define	IPW2100_DRV_DESC  "Intel Wireless 2100"
23 
24 /*
25  * Debug functionalities
26  */
27 #define	IPW2100_DBG_INIT	(0x00000001)  /* initialization */
28 #define	IPW2100_DBG_GLD		(0x00000002)  /* GLD */
29 #define	IPW2100_DBG_WIFI	(0x00000004)  /* WiFi */
30 #define	IPW2100_DBG_DMA		(0x00000008)  /* DMA */
31 #define	IPW2100_DBG_CSR		(0x00000010)  /* low-level CSR access */
32 #define	IPW2100_DBG_FW		(0x00000020)  /* uc & fw */
33 #define	IPW2100_DBG_RING	(0x00000040)  /* ring operations */
34 #define	IPW2100_DBG_IOCTL	(0x00000080)  /* ioctl */
35 #define	IPW2100_DBG_INT		(0x00000100)  /* interrupt */
36 #define	IPW2100_DBG_TABLE	(0x00000200)  /* ipw2100 tables */
37 #define	IPW2100_DBG_HWCAP	(0x00001000)  /* hardware capabilities */
38 #define	IPW2100_DBG_SOFTINT	(0x00008000)  /* softinterrupt */
39 #define	IPW2100_DBG_STATISTIC	(0x00010000)  /* statistic */
40 #define	IPW2100_DBG_FATAL	(0x00020000)  /* interrup report error */
41 #define	IPW2100_DBG_BRUSSELS	(0x00040000)  /* brussels support */
42 
43 extern uint32_t ipw2100_debug;
44 extern void	ipw2100_dbg(dev_info_t *dip, int level, const char *fmt, ...);
45 
46 #ifdef	DEBUG
47 #define	IPW2100_DBG(l, x)	do {				\
48 	_NOTE(CONSTANTCONDITION)				\
49 	if ((l) & ipw2100_debug) 				\
50 	    ipw2100_dbg x;		 			\
51 	_NOTE(CONSTANTCONDITION)				\
52 } while (0)
53 #else
54 #define	IPW2100_DBG(l, x)
55 #endif
56 
57 #define	IPW2100_WARN(x)   ipw2100_dbg x
58 #define	IPW2100_REPORT(x) ipw2100_dbg x
59 
60 #ifdef __cplusplus
61 }
62 #endif
63 
64 #endif /* _SYS_IPW2100_H */
65