if_wl.h (97748) | if_wl.h (113571) |
---|---|
1/* 2 * Redistribution and use in source and binary forms, with or without 3 * modification, are permitted provided that the following conditions 4 * are met: 5 * 1. Redistributions of source code must retain all copyright 6 * notices, this list of conditions and the following disclaimer. 7 * 2. The names of the authors may not be used to endorse or promote products 8 * derived from this software without specific prior written permission --- 4 unchanged lines hidden (view full) --- 13 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, 14 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 15 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 16 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 17 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 19 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 20 * | 1/* 2 * Redistribution and use in source and binary forms, with or without 3 * modification, are permitted provided that the following conditions 4 * are met: 5 * 1. Redistributions of source code must retain all copyright 6 * notices, this list of conditions and the following disclaimer. 7 * 2. The names of the authors may not be used to endorse or promote products 8 * derived from this software without specific prior written permission --- 4 unchanged lines hidden (view full) --- 13 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, 14 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 15 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 16 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 17 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 19 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 20 * |
21 * $FreeBSD: head/sys/dev/wl/if_wl.h 97748 2002-06-02 20:05:59Z schweikh $ | 21 * $FreeBSD: head/sys/dev/wl/if_wl.h 113571 2003-04-16 17:29:00Z jhay $ |
22 */ 23/* Definitions for WaveLAN driver */ 24 25#ifndef _IF_WL_H 26#define _IF_WL_H 27 28#define STATUS_TRIES 15000 29 --- 61 unchanged lines hidden (view full) --- 91#define HACR_OUT1 0x0008 /* General purpose output pin */ 92#define HACR_OUT2 0x0010 /* General purpose output pin */ 93#define HACR_MASK_82586 0x0020 /* Mask 82586 interrupts, 1==unmask */ 94#define HACR_MASK_MMC 0x0040 /* Mask MMC interrupts, 1==unmask */ 95#define HACR_INTR_CLEN 0x0080 /* interrupt status clear enable */ 96 97#define HACR_DEFAULT (HACR_OUT1 | HACR_OUT2 | HACR_16BITS | PIOM(STATIC_PIO, 0) | PIOM(AUTOINCR_PIO, 1) | PIOM(PARAM_ACCESS_PIO, 2)) 98#define HACR_INTRON (HACR_MASK_82586 | HACR_MASK_MMC | HACR_INTR_CLEN) | 22 */ 23/* Definitions for WaveLAN driver */ 24 25#ifndef _IF_WL_H 26#define _IF_WL_H 27 28#define STATUS_TRIES 15000 29 --- 61 unchanged lines hidden (view full) --- 91#define HACR_OUT1 0x0008 /* General purpose output pin */ 92#define HACR_OUT2 0x0010 /* General purpose output pin */ 93#define HACR_MASK_82586 0x0020 /* Mask 82586 interrupts, 1==unmask */ 94#define HACR_MASK_MMC 0x0040 /* Mask MMC interrupts, 1==unmask */ 95#define HACR_INTR_CLEN 0x0080 /* interrupt status clear enable */ 96 97#define HACR_DEFAULT (HACR_OUT1 | HACR_OUT2 | HACR_16BITS | PIOM(STATIC_PIO, 0) | PIOM(AUTOINCR_PIO, 1) | PIOM(PARAM_ACCESS_PIO, 2)) 98#define HACR_INTRON (HACR_MASK_82586 | HACR_MASK_MMC | HACR_INTR_CLEN) |
99#define CMD(unit) \ | 99#define CMD(sc) \ |
100 { \ | 100 { \ |
101 outw(HACR(WLSOFTC(unit)->base),WLSOFTC(unit)->hacr); \ | 101 outw(HACR(sc->base),sc->hacr); \ |
102 /* delay for 50 us, might only be needed sometimes */ \ 103 DELAY(DELAYCONST); \ 104 } 105 106/* macro for setting the channel attention bit. No delays here since 107 * it is used in critical sections 108 */ | 102 /* delay for 50 us, might only be needed sometimes */ \ 103 DELAY(DELAYCONST); \ 104 } 105 106/* macro for setting the channel attention bit. No delays here since 107 * it is used in critical sections 108 */ |
109#define SET_CHAN_ATTN(unit) \ | 109#define SET_CHAN_ATTN(sc) \ |
110 { \ | 110 { \ |
111 outw(HACR(WLSOFTC(unit)->base),WLSOFTC(unit)->hacr | HACR_CA); \ | 111 outw(HACR(sc->base),sc->hacr | HACR_CA); \ |
112 } 113 114 115#define MMC_WRITE(cmd,val) \ | 112 } 113 114 115#define MMC_WRITE(cmd,val) \ |
116 while(inw(HASR(WLSOFTC(unit)->base)) & HASR_MMC_BUSY) ; \ 117 outw(MMCR(WLSOFTC(unit)->base), \ | 116 while(inw(HASR(sc->base)) & HASR_MMC_BUSY) ; \ 117 outw(MMCR(sc->base), \ |
118 (u_short)(((u_short)(val) << 8) | ((cmd) << 1) | 1)) 119 120#endif /* _IF_WL_H */ 121 | 118 (u_short)(((u_short)(val) << 8) | ((cmd) << 1) | 1)) 119 120#endif /* _IF_WL_H */ 121 |