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