if_fwevar.h revision 170374
1210311Sjmallett/*-
2210311Sjmallett * Copyright (c) 2002-2003
3210311Sjmallett * 	Hidetoshi Shimokawa. All rights reserved.
4210311Sjmallett *
5210311Sjmallett * Redistribution and use in source and binary forms, with or without
6210311Sjmallett * modification, are permitted provided that the following conditions
7210311Sjmallett * are met:
8210311Sjmallett * 1. Redistributions of source code must retain the above copyright
9210311Sjmallett *    notice, this list of conditions and the following disclaimer.
10210311Sjmallett * 2. Redistributions in binary form must reproduce the above copyright
11210311Sjmallett *    notice, this list of conditions and the following disclaimer in the
12210311Sjmallett *    documentation and/or other materials provided with the distribution.
13210311Sjmallett * 3. All advertising materials mentioning features or use of this software
14210311Sjmallett *    must display the following acknowledgement:
15210311Sjmallett *
16210311Sjmallett *	This product includes software developed by Hidetoshi Shimokawa.
17210311Sjmallett *
18210311Sjmallett * 4. Neither the name of the author nor the names of its contributors
19210311Sjmallett *    may be used to endorse or promote products derived from this software
20210311Sjmallett *    without specific prior written permission.
21210311Sjmallett *
22210311Sjmallett * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23210311Sjmallett * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24210311Sjmallett * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25210311Sjmallett * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26210311Sjmallett * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27210311Sjmallett * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28210311Sjmallett * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29210311Sjmallett * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30210311Sjmallett * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31210311Sjmallett * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32210311Sjmallett * SUCH DAMAGE.
33210311Sjmallett *
34210311Sjmallett * $FreeBSD: head/sys/dev/firewire/if_fwevar.h 170374 2007-06-06 14:31:36Z simokawa $
35210311Sjmallett */
36210311Sjmallett
37210311Sjmallett#ifndef _NET_IF_FWEVAR_H_
38210311Sjmallett#define _NET_IF_FWEVAR_H_
39210311Sjmallett
40210311Sjmallettstruct fwe_softc {
41210311Sjmallett	/* XXX this must be the first for fd.post_explore() */
42210311Sjmallett	struct firewire_dev_comm fd;
43213150Sjmallett	short stream_ch;
44210311Sjmallett	short dma_ch;
45210311Sjmallett	struct fw_pkt pkt_hdr;
46210311Sjmallett	STAILQ_HEAD(, fw_xfer) xferlist;
47210311Sjmallett	struct fwe_eth_softc {
48210311Sjmallett		struct ifnet *ifp;
49210311Sjmallett		struct fwe_softc *fwe;
50210311Sjmallett	} eth_softc;
51210311Sjmallett	struct mtx mtx;
52210311Sjmallett};
53210311Sjmallett#define FWE_LOCK(fwe)	mtx_lock(&(fwe)->mtx)
54210311Sjmallett#define FWE_UNLOCK(fwe)	mtx_unlock(&(fwe)->mtx)
55210311Sjmallett#endif /* !_NET_IF_FWEVAR_H_ */
56210311Sjmallett