1139749Simp/*- 2113584Ssimokawa * Copyright (c) 2002-2003 3103285Sikob * Hidetoshi Shimokawa. All rights reserved. 4103285Sikob * 5103285Sikob * Redistribution and use in source and binary forms, with or without 6103285Sikob * modification, are permitted provided that the following conditions 7103285Sikob * are met: 8103285Sikob * 1. Redistributions of source code must retain the above copyright 9103285Sikob * notice, this list of conditions and the following disclaimer. 10103285Sikob * 2. Redistributions in binary form must reproduce the above copyright 11103285Sikob * notice, this list of conditions and the following disclaimer in the 12103285Sikob * documentation and/or other materials provided with the distribution. 13103285Sikob * 3. All advertising materials mentioning features or use of this software 14103285Sikob * must display the following acknowledgement: 15103285Sikob * 16103285Sikob * This product includes software developed by Hidetoshi Shimokawa. 17103285Sikob * 18103285Sikob * 4. Neither the name of the author nor the names of its contributors 19103285Sikob * may be used to endorse or promote products derived from this software 20103285Sikob * without specific prior written permission. 21103285Sikob * 22103285Sikob * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23103285Sikob * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24103285Sikob * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25103285Sikob * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26103285Sikob * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27103285Sikob * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28103285Sikob * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29103285Sikob * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30103285Sikob * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31103285Sikob * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32103285Sikob * SUCH DAMAGE. 33103285Sikob * 34103285Sikob * $FreeBSD$ 35103285Sikob */ 36103285Sikob 37103285Sikob#ifndef _NET_IF_FWEVAR_H_ 38103285Sikob#define _NET_IF_FWEVAR_H_ 39103285Sikob 40103285Sikobstruct fwe_softc { 41170374Ssimokawa /* XXX this must be the first for fd.post_explore() */ 42103285Sikob struct firewire_dev_comm fd; 43103285Sikob short stream_ch; 44103285Sikob short dma_ch; 45103285Sikob struct fw_pkt pkt_hdr; 46111942Ssimokawa STAILQ_HEAD(, fw_xfer) xferlist; 47103285Sikob struct fwe_eth_softc { 48147256Sbrooks struct ifnet *ifp; 49103285Sikob struct fwe_softc *fwe; 50103285Sikob } eth_softc; 51170374Ssimokawa struct mtx mtx; 52103285Sikob}; 53170374Ssimokawa#define FWE_LOCK(fwe) mtx_lock(&(fwe)->mtx) 54170374Ssimokawa#define FWE_UNLOCK(fwe) mtx_unlock(&(fwe)->mtx) 55103285Sikob#endif /* !_NET_IF_FWEVAR_H_ */ 56