2 * Copyright (c) 2014 Bjoern A. Zeeb
5 * This software was developed by SRI International and the University of
6 * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-11-C-0249
7 * ("MRC2"), as part of the DARPA MRC research programme.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 #ifndef _DEV_IF_NF10BMACREG_H
34 #define _DEV_IF_NF10BMACREG_H
36 struct nf10bmac_softc {
37 struct ifnet *nf10bmac_ifp;
38 struct resource *nf10bmac_ctrl_res;
39 struct resource *nf10bmac_tx_mem_res;
40 struct resource *nf10bmac_rx_mem_res;
41 struct resource *nf10bmac_intr_res;
42 struct resource *nf10bmac_rx_irq_res;
43 void *nf10bmac_rx_intrhand;
44 uint8_t *nf10bmac_tx_buf;
45 device_t nf10bmac_dev;
47 int nf10bmac_ctrl_rid;
48 int nf10bmac_tx_mem_rid;
49 int nf10bmac_rx_mem_rid;
50 int nf10bmac_intr_rid;
51 int nf10bmac_rx_irq_rid;
52 int nf10bmac_if_flags;
53 uint32_t nf10bmac_flags;
54 #define NF10BMAC_FLAGS_LINK 0x00000001
55 uint8_t nf10bmac_eth_addr[ETHER_ADDR_LEN];
56 #ifdef ENABLE_WATCHDOG
57 uint16_t nf10bmac_watchdog_timer;
58 struct callout nf10bmac_tick;
60 struct ifmedia nf10bmac_media; /* to fake it. */
61 struct mtx nf10bmac_mtx;
64 int nf10bmac_attach(device_t);
65 int nf10bmac_detach_dev(device_t);
66 void nf10bmac_detach_resources(device_t);
68 extern devclass_t nf10bmac_devclass;
70 #endif /* _DEV_IF_NF10BMACREG_H */