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