1bb5e3b2fSeh146360 /* 2922d2c76Seh146360 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 3bb5e3b2fSeh146360 * Use is subject to license terms. 4bb5e3b2fSeh146360 */ 5bb5e3b2fSeh146360 6bb5e3b2fSeh146360 /* 7bb5e3b2fSeh146360 * Copyright(c) 2004 8bb5e3b2fSeh146360 * Damien Bergamini <damien.bergamini@free.fr>. All rights reserved. 9bb5e3b2fSeh146360 * 10bb5e3b2fSeh146360 * Redistribution and use in source and binary forms, with or without 11bb5e3b2fSeh146360 * modification, are permitted provided that the following conditions 12bb5e3b2fSeh146360 * are met: 13bb5e3b2fSeh146360 * 1. Redistributions of source code must retain the above copyright 14bb5e3b2fSeh146360 * notice unmodified, this list of conditions, and the following 15bb5e3b2fSeh146360 * disclaimer. 16bb5e3b2fSeh146360 * 2. Redistributions in binary form must reproduce the above copyright 17bb5e3b2fSeh146360 * notice, this list of conditions and the following disclaimer in the 18bb5e3b2fSeh146360 * documentation and/or other materials provided with the distribution. 19bb5e3b2fSeh146360 * 20bb5e3b2fSeh146360 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 21bb5e3b2fSeh146360 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22bb5e3b2fSeh146360 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23bb5e3b2fSeh146360 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 24bb5e3b2fSeh146360 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25bb5e3b2fSeh146360 * DAMAGES(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26bb5e3b2fSeh146360 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27bb5e3b2fSeh146360 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28bb5e3b2fSeh146360 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29bb5e3b2fSeh146360 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30bb5e3b2fSeh146360 * SUCH DAMAGE. 31bb5e3b2fSeh146360 */ 32bb5e3b2fSeh146360 33bb5e3b2fSeh146360 #ifndef _SYS_IPW2200_H 34bb5e3b2fSeh146360 #define _SYS_IPW2200_H 35bb5e3b2fSeh146360 36bb5e3b2fSeh146360 #ifdef __cplusplus 37bb5e3b2fSeh146360 extern "C" { 38bb5e3b2fSeh146360 #endif 39bb5e3b2fSeh146360 40bb5e3b2fSeh146360 /* 41*0778188fSHengqing Hu * Intel Wireless PRO/2200 mini-pci adapter drier 42bb5e3b2fSeh146360 * ipw2200.h: common definitions and interface to user land application 43bb5e3b2fSeh146360 */ 44bb5e3b2fSeh146360 #include <sys/types.h> 45bb5e3b2fSeh146360 #include <sys/ddi.h> 46bb5e3b2fSeh146360 #include <sys/sunddi.h> 47bb5e3b2fSeh146360 48bb5e3b2fSeh146360 #define IPW2200_DRV_NAME "iwi" 49bb5e3b2fSeh146360 #define IPW2200_DRV_DESC "Intel Wireless 2200/2915" 50bb5e3b2fSeh146360 51bb5e3b2fSeh146360 /* 52bb5e3b2fSeh146360 * Debug functionalities 53bb5e3b2fSeh146360 */ 54bb5e3b2fSeh146360 #define IPW2200_DBG_INIT (0x00000001) /* initialization */ 55bb5e3b2fSeh146360 #define IPW2200_DBG_GLD (0x00000002) /* GLD */ 56bb5e3b2fSeh146360 #define IPW2200_DBG_WIFI (0x00000004) /* WiFi */ 57bb5e3b2fSeh146360 #define IPW2200_DBG_DMA (0x00000008) /* DMA */ 58bb5e3b2fSeh146360 #define IPW2200_DBG_CSR (0x00000010) /* low-level CSR access */ 59bb5e3b2fSeh146360 #define IPW2200_DBG_FW (0x00000020) /* uc & fw */ 60bb5e3b2fSeh146360 #define IPW2200_DBG_RING (0x00000040) /* ring operations */ 61bb5e3b2fSeh146360 #define IPW2200_DBG_IOCTL (0x00000080) /* ioctl */ 62bb5e3b2fSeh146360 #define IPW2200_DBG_INT (0x00000100) /* interrupt */ 63bb5e3b2fSeh146360 #define IPW2200_DBG_TABLE (0x00000200) /* ipw2200 tables */ 64bb5e3b2fSeh146360 #define IPW2200_DBG_RX (0x00000400) /* rx */ 65bb5e3b2fSeh146360 #define IPW2200_DBG_TX (0x00000800) /* tx */ 66bb5e3b2fSeh146360 #define IPW2200_DBG_HWCAP (0x00001000) /* hardware capabilities */ 67bb5e3b2fSeh146360 #define IPW2200_DBG_NOTIF (0x00002000) /* ipw2200 notification */ 68bb5e3b2fSeh146360 #define IPW2200_DBG_SCAN (0x00004000) /* scan results */ 69bb5e3b2fSeh146360 #define IPW2200_DBG_SOFTINT (0x00008000) /* soft interrupt */ 70bb5e3b2fSeh146360 #define IPW2200_DBG_FATAL (0x00010000) /* interrupt report error */ 71922d2c76Seh146360 #define IPW2200_DBG_SUSPEND (0x00020000) /* suspend resume */ 727efa17f5Sfei feng - Sun Microsystems - Beijing China #define IPW2200_DBG_BRUSSELS (0x00040000) /* brussels support */ 73bb5e3b2fSeh146360 74bb5e3b2fSeh146360 extern uint32_t ipw2200_debug; 75bb5e3b2fSeh146360 extern void ipw2200_dbg(dev_info_t *dip, int level, const char *fmt, ...); 76bb5e3b2fSeh146360 77bb5e3b2fSeh146360 #ifdef DEBUG 78bb5e3b2fSeh146360 #define IPW2200_DBG(l, x) do { \ 79bb5e3b2fSeh146360 _NOTE(CONSTANTCONDITION) \ 80bb5e3b2fSeh146360 if ((l) & ipw2200_debug) \ 81bb5e3b2fSeh146360 ipw2200_dbg x; \ 82bb5e3b2fSeh146360 _NOTE(CONSTANTCONDITION) \ 83bb5e3b2fSeh146360 } while (0) 84bb5e3b2fSeh146360 #else 85bb5e3b2fSeh146360 #define IPW2200_DBG(l, x) 86bb5e3b2fSeh146360 #endif 87bb5e3b2fSeh146360 88bb5e3b2fSeh146360 #define IPW2200_WARN(x) ipw2200_dbg x 89bb5e3b2fSeh146360 #define IPW2200_REPORT(x) ipw2200_dbg x 90bb5e3b2fSeh146360 91bb5e3b2fSeh146360 #ifdef __cplusplus 92bb5e3b2fSeh146360 } 93bb5e3b2fSeh146360 #endif 94bb5e3b2fSeh146360 95bb5e3b2fSeh146360 #endif /* _SYS_IPW2200_H */ 96