13847Seh146360 /* 27194Seh146360 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 33847Seh146360 * Use is subject to license terms. 43847Seh146360 */ 53847Seh146360 63847Seh146360 /* 73847Seh146360 * Copyright(c) 2004 83847Seh146360 * Damien Bergamini <damien.bergamini@free.fr>. All rights reserved. 93847Seh146360 * 103847Seh146360 * Redistribution and use in source and binary forms, with or without 113847Seh146360 * modification, are permitted provided that the following conditions 123847Seh146360 * are met: 133847Seh146360 * 1. Redistributions of source code must retain the above copyright 143847Seh146360 * notice unmodified, this list of conditions, and the following 153847Seh146360 * disclaimer. 163847Seh146360 * 2. Redistributions in binary form must reproduce the above copyright 173847Seh146360 * notice, this list of conditions and the following disclaimer in the 183847Seh146360 * documentation and/or other materials provided with the distribution. 193847Seh146360 * 203847Seh146360 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 213847Seh146360 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 223847Seh146360 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 233847Seh146360 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 243847Seh146360 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 253847Seh146360 * DAMAGES(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 263847Seh146360 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 273847Seh146360 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 283847Seh146360 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 293847Seh146360 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 303847Seh146360 * SUCH DAMAGE. 313847Seh146360 */ 323847Seh146360 333847Seh146360 #ifndef _SYS_IPW2200_H 343847Seh146360 #define _SYS_IPW2200_H 353847Seh146360 363847Seh146360 #ifdef __cplusplus 373847Seh146360 extern "C" { 383847Seh146360 #endif 393847Seh146360 403847Seh146360 /* 413847Seh146360 * Intel Wireless PRO/2200 mini-pci adpater drier 423847Seh146360 * ipw2200.h: common definitions and interface to user land application 433847Seh146360 */ 443847Seh146360 #include <sys/types.h> 453847Seh146360 #include <sys/ddi.h> 463847Seh146360 #include <sys/sunddi.h> 473847Seh146360 483847Seh146360 #define IPW2200_DRV_NAME "iwi" 493847Seh146360 #define IPW2200_DRV_DESC "Intel Wireless 2200/2915" 503847Seh146360 513847Seh146360 /* 523847Seh146360 * Debug functionalities 533847Seh146360 */ 543847Seh146360 #define IPW2200_DBG_INIT (0x00000001) /* initialization */ 553847Seh146360 #define IPW2200_DBG_GLD (0x00000002) /* GLD */ 563847Seh146360 #define IPW2200_DBG_WIFI (0x00000004) /* WiFi */ 573847Seh146360 #define IPW2200_DBG_DMA (0x00000008) /* DMA */ 583847Seh146360 #define IPW2200_DBG_CSR (0x00000010) /* low-level CSR access */ 593847Seh146360 #define IPW2200_DBG_FW (0x00000020) /* uc & fw */ 603847Seh146360 #define IPW2200_DBG_RING (0x00000040) /* ring operations */ 613847Seh146360 #define IPW2200_DBG_IOCTL (0x00000080) /* ioctl */ 623847Seh146360 #define IPW2200_DBG_INT (0x00000100) /* interrupt */ 633847Seh146360 #define IPW2200_DBG_TABLE (0x00000200) /* ipw2200 tables */ 643847Seh146360 #define IPW2200_DBG_RX (0x00000400) /* rx */ 653847Seh146360 #define IPW2200_DBG_TX (0x00000800) /* tx */ 663847Seh146360 #define IPW2200_DBG_HWCAP (0x00001000) /* hardware capabilities */ 673847Seh146360 #define IPW2200_DBG_NOTIF (0x00002000) /* ipw2200 notification */ 683847Seh146360 #define IPW2200_DBG_SCAN (0x00004000) /* scan results */ 693847Seh146360 #define IPW2200_DBG_SOFTINT (0x00008000) /* soft interrupt */ 703847Seh146360 #define IPW2200_DBG_FATAL (0x00010000) /* interrupt report error */ 717194Seh146360 #define IPW2200_DBG_SUSPEND (0x00020000) /* suspend resume */ 72*8367SFei.Feng@Sun.COM #define IPW2200_DBG_BRUSSELS (0x00040000) /* brussels support */ 733847Seh146360 743847Seh146360 extern uint32_t ipw2200_debug; 753847Seh146360 extern void ipw2200_dbg(dev_info_t *dip, int level, const char *fmt, ...); 763847Seh146360 773847Seh146360 #ifdef DEBUG 783847Seh146360 #define IPW2200_DBG(l, x) do { \ 793847Seh146360 _NOTE(CONSTANTCONDITION) \ 803847Seh146360 if ((l) & ipw2200_debug) \ 813847Seh146360 ipw2200_dbg x; \ 823847Seh146360 _NOTE(CONSTANTCONDITION) \ 833847Seh146360 } while (0) 843847Seh146360 #else 853847Seh146360 #define IPW2200_DBG(l, x) 863847Seh146360 #endif 873847Seh146360 883847Seh146360 #define IPW2200_WARN(x) ipw2200_dbg x 893847Seh146360 #define IPW2200_REPORT(x) ipw2200_dbg x 903847Seh146360 913847Seh146360 #ifdef __cplusplus 923847Seh146360 } 933847Seh146360 #endif 943847Seh146360 953847Seh146360 #endif /* _SYS_IPW2200_H */ 96