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