Deleted Added
full compact
if_ndisvar.h (123535) if_ndisvar.h (123620)
1/*
2 * Copyright (c) 2003
3 * Bill Paul <wpaul@windriver.com>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by Bill Paul.
16 * 4. Neither the name of the author nor the names of any co-contributors
17 * may be used to endorse or promote products derived from this software
18 * without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 *
1/*
2 * Copyright (c) 2003
3 * Bill Paul <wpaul@windriver.com>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by Bill Paul.
16 * 4. Neither the name of the author nor the names of any co-contributors
17 * may be used to endorse or promote products derived from this software
18 * without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 * $FreeBSD: head/sys/dev/if_ndis/if_ndisvar.h 123535 2003-12-14 21:31:32Z wpaul $
32 * $FreeBSD: head/sys/dev/if_ndis/if_ndisvar.h 123620 2003-12-18 03:51:21Z wpaul $
33 */
34
35#define NDIS_PCI_LOIO 0x10
36#define NDIS_PCI_LOMEM 0x14
37
38
39struct ndis_chain_onefrag {
40 void *dummy;
41};
42
43struct ndis_chain {
44 void *dummy;
45};
46
47struct ndis_type {
48 uint16_t ndis_vid;
49 uint16_t ndis_did;
33 */
34
35#define NDIS_PCI_LOIO 0x10
36#define NDIS_PCI_LOMEM 0x14
37
38
39struct ndis_chain_onefrag {
40 void *dummy;
41};
42
43struct ndis_chain {
44 void *dummy;
45};
46
47struct ndis_type {
48 uint16_t ndis_vid;
49 uint16_t ndis_did;
50 uint32_t ndis_subsys;
50 char *ndis_name;
51};
52
53struct ndis_shmem {
54 bus_dma_tag_t ndis_stag;
55 bus_dmamap_t ndis_smap;
56 void *ndis_saddr;
57 struct ndis_shmem *ndis_next;
58};
59
60struct ndis_cfglist {
61 ndis_cfg ndis_cfg;
62 TAILQ_ENTRY(ndis_cfglist) link;
63};
64
65TAILQ_HEAD(nch, ndis_cfglist);
66
67#define NDIS_INC(x) \
68 (x)->ndis_txidx = ((x)->ndis_txidx + 1) % (x)->ndis_maxpkts
69
70struct ndis_softc {
71 struct arpcom arpcom; /* interface info */
72 struct ifmedia ifmedia; /* media info */
73 bus_space_handle_t ndis_bhandle;
74 bus_space_tag_t ndis_btag;
75 void *ndis_intrhand;
76 struct resource *ndis_irq;
77 struct resource *ndis_res;
78 struct resource *ndis_res_io;
79 int ndis_io_rid;
80 struct resource *ndis_res_mem;
81 int ndis_mem_rid;
82 struct resource *ndis_res_altmem;
83 int ndis_altmem_rid;
84 struct resource *ndis_res_am; /* attribute mem (pccard) */
85 struct resource *ndis_res_cm; /* common mem (pccard) */
86 int ndis_rescnt;
87 struct mtx ndis_mtx;
88 device_t ndis_dev;
89 int ndis_unit;
90 ndis_miniport_block ndis_block;
91 ndis_miniport_characteristics ndis_chars;
92 interface_type ndis_type;
93 struct callout_handle ndis_stat_ch;
94 int ndis_maxpkts;
95 ndis_oid *ndis_oids;
96 int ndis_oidcnt;
97 int ndis_txidx;
98 int ndis_txpending;
99 ndis_packet **ndis_txarray;
100 int ndis_sc;
101 ndis_cfg *ndis_regvals;
102 struct nch ndis_cfglist_head;
103
104 struct sysctl_ctx_list ndis_ctx;
105 struct sysctl_oid *ndis_tree;
51 char *ndis_name;
52};
53
54struct ndis_shmem {
55 bus_dma_tag_t ndis_stag;
56 bus_dmamap_t ndis_smap;
57 void *ndis_saddr;
58 struct ndis_shmem *ndis_next;
59};
60
61struct ndis_cfglist {
62 ndis_cfg ndis_cfg;
63 TAILQ_ENTRY(ndis_cfglist) link;
64};
65
66TAILQ_HEAD(nch, ndis_cfglist);
67
68#define NDIS_INC(x) \
69 (x)->ndis_txidx = ((x)->ndis_txidx + 1) % (x)->ndis_maxpkts
70
71struct ndis_softc {
72 struct arpcom arpcom; /* interface info */
73 struct ifmedia ifmedia; /* media info */
74 bus_space_handle_t ndis_bhandle;
75 bus_space_tag_t ndis_btag;
76 void *ndis_intrhand;
77 struct resource *ndis_irq;
78 struct resource *ndis_res;
79 struct resource *ndis_res_io;
80 int ndis_io_rid;
81 struct resource *ndis_res_mem;
82 int ndis_mem_rid;
83 struct resource *ndis_res_altmem;
84 int ndis_altmem_rid;
85 struct resource *ndis_res_am; /* attribute mem (pccard) */
86 struct resource *ndis_res_cm; /* common mem (pccard) */
87 int ndis_rescnt;
88 struct mtx ndis_mtx;
89 device_t ndis_dev;
90 int ndis_unit;
91 ndis_miniport_block ndis_block;
92 ndis_miniport_characteristics ndis_chars;
93 interface_type ndis_type;
94 struct callout_handle ndis_stat_ch;
95 int ndis_maxpkts;
96 ndis_oid *ndis_oids;
97 int ndis_oidcnt;
98 int ndis_txidx;
99 int ndis_txpending;
100 ndis_packet **ndis_txarray;
101 int ndis_sc;
102 ndis_cfg *ndis_regvals;
103 struct nch ndis_cfglist_head;
104
105 struct sysctl_ctx_list ndis_ctx;
106 struct sysctl_oid *ndis_tree;
107 int ndis_devidx;
106 interface_type ndis_iftype;
107
108 bus_dma_tag_t ndis_parent_tag;
109 struct ndis_shmem *ndis_shlist;
110 bus_dma_tag_t ndis_mtag;
111 bus_dma_tag_t ndis_ttag;
112 bus_dmamap_t *ndis_mmaps;
113 bus_dmamap_t *ndis_tmaps;
114 int ndis_mmapcnt;
108 interface_type ndis_iftype;
109
110 bus_dma_tag_t ndis_parent_tag;
111 struct ndis_shmem *ndis_shlist;
112 bus_dma_tag_t ndis_mtag;
113 bus_dma_tag_t ndis_ttag;
114 bus_dmamap_t *ndis_mmaps;
115 bus_dmamap_t *ndis_tmaps;
116 int ndis_mmapcnt;
115
116};
117
118#define NDIS_LOCK(_sc) mtx_lock(&(_sc)->ndis_mtx)
119#define NDIS_UNLOCK(_sc) mtx_unlock(&(_sc)->ndis_mtx)
120
117};
118
119#define NDIS_LOCK(_sc) mtx_lock(&(_sc)->ndis_mtx)
120#define NDIS_UNLOCK(_sc) mtx_unlock(&(_sc)->ndis_mtx)
121