if_aevar.h revision 1.2 1 1.2 scottr /* $NetBSD: if_aevar.h,v 1.2 1997/02/24 07:34:21 scottr Exp $ */
2 1.1 scottr
3 1.1 scottr /*
4 1.1 scottr * Device driver for National Semiconductor DS8390/WD83C690 based ethernet
5 1.1 scottr * adapters.
6 1.1 scottr *
7 1.1 scottr * Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
8 1.1 scottr *
9 1.1 scottr * Copyright (C) 1993, David Greenman. This software may be used, modified,
10 1.1 scottr * copied, distributed, and sold, in both source and binary form provided that
11 1.1 scottr * the above copyright and these terms are retained. Under no circumstances is
12 1.1 scottr * the author responsible for the proper functioning of this software, nor does
13 1.1 scottr * the author assume any responsibility for damages incurred with its use.
14 1.1 scottr *
15 1.1 scottr * Adapted for MacBSD by Brad Parker <brad (at) fcr.com>.
16 1.1 scottr */
17 1.1 scottr
18 1.1 scottr #define INTERFACE_NAME_LEN 32
19 1.1 scottr
20 1.1 scottr /*
21 1.1 scottr * ae_softc: per line info and status
22 1.1 scottr */
23 1.1 scottr struct ae_softc {
24 1.1 scottr struct device sc_dev;
25 1.1 scottr bus_space_tag_t sc_reg_tag; /* NIC register space tag */
26 1.1 scottr bus_space_handle_t sc_reg_handle; /* NIC register space handle */
27 1.1 scottr bus_space_tag_t sc_buf_tag; /* Buffer space tag */
28 1.1 scottr bus_space_handle_t sc_buf_handle; /* Buffer space handle */
29 1.1 scottr
30 1.1 scottr /* struct intrhand sc_ih; */
31 1.1 scottr
32 1.1 scottr struct arpcom sc_arpcom;/* ethernet common */
33 1.1 scottr
34 1.1 scottr char type_str[INTERFACE_NAME_LEN]; /* type string */
35 1.1 scottr u_short type; /* interface type code */
36 1.1 scottr u_char vendor; /* interface vendor */
37 1.1 scottr u_char regs_rev; /* registers are reversed */
38 1.2 scottr u_char use16bit; /* use word-width transfers */
39 1.1 scottr
40 1.1 scottr u_char cr_proto; /* values always set in CR */
41 1.1 scottr
42 1.1 scottr int mem_size; /* total shared memory size */
43 1.1 scottr int mem_ring; /* start of RX ring-buffer (in smem) */
44 1.1 scottr
45 1.1 scottr u_char txb_cnt; /* Number of transmit buffers */
46 1.1 scottr u_char txb_inuse; /* number of transmit buffers active */
47 1.1 scottr
48 1.1 scottr u_char txb_new; /* pointer to where new buffer will be added */
49 1.1 scottr u_char txb_next_tx; /* pointer to next buffer ready to xmit */
50 1.1 scottr u_short txb_len[8]; /* buffered xmit buffer lengths */
51 1.1 scottr u_char tx_page_start; /* first page of TX buffer area */
52 1.1 scottr u_char rec_page_start; /* first page of RX ring-buffer */
53 1.1 scottr u_char rec_page_stop; /* last page of RX ring-buffer */
54 1.1 scottr u_char next_packet; /* pointer to next unread RX packet */
55 1.1 scottr };
56 1.1 scottr
57 1.1 scottr int ae_size_card_memory __P((
58 1.1 scottr bus_space_tag_t, bus_space_handle_t, int));
59 1.1 scottr
60 1.1 scottr void aeintr __P((void *, int));
61 1.1 scottr int aeioctl __P((struct ifnet *, u_long, caddr_t));
62 1.1 scottr void aestart __P((struct ifnet *));
63 1.1 scottr void aewatchdog __P((struct ifnet *));
64 1.1 scottr void aereset __P((struct ae_softc *));
65 1.1 scottr void aeinit __P((struct ae_softc *));
66 1.1 scottr void aestop __P((struct ae_softc *));
67 1.1 scottr
68 1.1 scottr void aeread __P((struct ae_softc *, int, int));
69 1.1 scottr struct mbuf *aeget __P((struct ae_softc *, int, int));
70 1.1 scottr
71 1.1 scottr int ae_put __P((struct ae_softc *, struct mbuf *, int));
72 1.1 scottr void ae_getmcaf __P((struct arpcom *, u_char *));
73