1 /* -*- linux-c -*- */ 2 #ifndef _RING_H_ 3 #define _RING_H_ 4 5 /* 6 * Copyright (C) 2001 By Joachim Martillo, Telford Tools, Inc. 7 * 8 * This program is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU General Public License 10 * as published by the Free Software Foundation; either version 11 * 2 of the License, or (at your option) any later version. 12 * 13 */ 14 15 #include <linux/version.h> 16 #include <linux/pci.h> 17 #ifdef __KERNEL__ 18 #include <linux/netdevice.h> 19 20 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 0) 21 #define dev_kfree_skb_irq(s) dev_kfree_skb((s)) 22 #define dev_kfree_skb_any(s) dev_kfree_skb((s)) 23 #define net_device_stats enet_statistics 24 #define net_device device 25 #else 26 #define NETSTATS_VER2 27 #endif 28 #endif 29 30 #define OWNER ((unsigned short)0x8000) /* mask for ownership bit */ 31 #define OWN_DRIVER ((unsigned short)0x8000) /* value of owner bit == host */ 32 #define OWN_SAB ((unsigned short)0x0000) /* value of owner bit == sab or 33 * receive or send */ 34 #define LISTSIZE 32 35 #define RXSIZE (8192+3) 36 #define MAXNAMESIZE 11 37 #define MAXSAB8253XDEVICES 256 38 39 struct counters 40 { 41 unsigned int interruptcount; 42 unsigned int freecount; 43 unsigned int receivepacket; 44 unsigned int receivebytes; 45 unsigned int transmitpacket; 46 unsigned int transmitbytes; 47 unsigned int tx_drops; 48 unsigned int rx_drops; 49 }; 50 51 typedef struct ring_descriptor 52 { 53 unsigned short Count; 54 unsigned char sendcrc; 55 unsigned char crcindex; 56 unsigned int crc; 57 struct sk_buff* HostVaddr; 58 struct ring_descriptor* VNext; 59 } RING_DESCRIPTOR; 60 61 typedef struct dcontrol2 62 { 63 RING_DESCRIPTOR *receive; 64 RING_DESCRIPTOR *transmit; 65 } DCONTROL2; 66 67 #endif 68