xref: /onnv-gate/usr/src/uts/common/io/ipw/ipw2100.h (revision 8367:9b59e833a18f)
13847Seh146360 /*
2*8367SFei.Feng@Sun.COM  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
33847Seh146360  * Use is subject to license terms.
43847Seh146360  */
53847Seh146360 
63847Seh146360 #ifndef _SYS_IPW2100_H
73847Seh146360 #define	_SYS_IPW2100_H
83847Seh146360 
93847Seh146360 #ifdef __cplusplus
103847Seh146360 extern "C" {
113847Seh146360 #endif
123847Seh146360 
133847Seh146360 /*
143847Seh146360  * Intel Wireless PRO/2100 mini-PCI adapter driver
153847Seh146360  * ipw2100.h: common definitions and interface to user land application
163847Seh146360  */
173847Seh146360 #include <sys/types.h>
183847Seh146360 #include <sys/ddi.h>
193847Seh146360 #include <sys/sunddi.h>
203847Seh146360 
213847Seh146360 #define	IPW2100_DRV_NAME  "ipw"
223847Seh146360 #define	IPW2100_DRV_DESC  "Intel Wireless 2100"
233847Seh146360 
243847Seh146360 /*
253847Seh146360  * Debug functionalities
263847Seh146360  */
273847Seh146360 #define	IPW2100_DBG_INIT	(0x00000001)  /* initialization */
283847Seh146360 #define	IPW2100_DBG_GLD		(0x00000002)  /* GLD */
293847Seh146360 #define	IPW2100_DBG_WIFI	(0x00000004)  /* WiFi */
303847Seh146360 #define	IPW2100_DBG_DMA		(0x00000008)  /* DMA */
313847Seh146360 #define	IPW2100_DBG_CSR		(0x00000010)  /* low-level CSR access */
323847Seh146360 #define	IPW2100_DBG_FW		(0x00000020)  /* uc & fw */
333847Seh146360 #define	IPW2100_DBG_RING	(0x00000040)  /* ring operations */
343847Seh146360 #define	IPW2100_DBG_IOCTL	(0x00000080)  /* ioctl */
353847Seh146360 #define	IPW2100_DBG_INT		(0x00000100)  /* interrupt */
363847Seh146360 #define	IPW2100_DBG_TABLE	(0x00000200)  /* ipw2100 tables */
373847Seh146360 #define	IPW2100_DBG_HWCAP	(0x00001000)  /* hardware capabilities */
383847Seh146360 #define	IPW2100_DBG_SOFTINT	(0x00008000)  /* softinterrupt */
393847Seh146360 #define	IPW2100_DBG_STATISTIC	(0x00010000)  /* statistic */
403847Seh146360 #define	IPW2100_DBG_FATAL	(0x00020000)  /* interrup report error */
41*8367SFei.Feng@Sun.COM #define	IPW2100_DBG_BRUSSELS	(0x00040000)  /* brussels support */
423847Seh146360 
433847Seh146360 extern uint32_t ipw2100_debug;
443847Seh146360 extern void	ipw2100_dbg(dev_info_t *dip, int level, const char *fmt, ...);
453847Seh146360 
463847Seh146360 #ifdef	DEBUG
473847Seh146360 #define	IPW2100_DBG(l, x)	do {				\
483847Seh146360 	_NOTE(CONSTANTCONDITION)				\
493847Seh146360 	if ((l) & ipw2100_debug) 				\
503847Seh146360 	    ipw2100_dbg x;		 			\
513847Seh146360 	_NOTE(CONSTANTCONDITION)				\
523847Seh146360 } while (0)
533847Seh146360 #else
543847Seh146360 #define	IPW2100_DBG(l, x)
553847Seh146360 #endif
563847Seh146360 
573847Seh146360 #define	IPW2100_WARN(x)   ipw2100_dbg x
583847Seh146360 #define	IPW2100_REPORT(x) ipw2100_dbg x
593847Seh146360 
603847Seh146360 #ifdef __cplusplus
613847Seh146360 }
623847Seh146360 #endif
633847Seh146360 
643847Seh146360 #endif /* _SYS_IPW2100_H */
65