patch-2.4.19 linux-2.4.19/drivers/net/wan/8253x/ring.h
Next file: linux-2.4.19/drivers/net/wan/8253x/sab8253xds.txt
Previous file: linux-2.4.19/drivers/net/wan/8253x/readme.txt
Back to the patch index
Back to the overall index
- Lines: 68
- Date:
Fri Aug 2 17:39:44 2002
- Orig file:
linux-2.4.18/drivers/net/wan/8253x/ring.h
- Orig date:
Wed Dec 31 16:00:00 1969
diff -urN linux-2.4.18/drivers/net/wan/8253x/ring.h linux-2.4.19/drivers/net/wan/8253x/ring.h
@@ -0,0 +1,67 @@
+/* -*- linux-c -*- */
+#ifndef _RING_H_
+#define _RING_H_
+
+/*
+ * Copyright (C) 2001 By Joachim Martillo, Telford Tools, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ */
+
+#include <linux/version.h>
+#include <linux/pci.h>
+#ifdef __KERNEL__
+#include <linux/netdevice.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 0)
+#define dev_kfree_skb_irq(s) dev_kfree_skb((s))
+#define dev_kfree_skb_any(s) dev_kfree_skb((s))
+#define net_device_stats enet_statistics
+#define net_device device
+#else
+#define NETSTATS_VER2
+#endif
+#endif
+
+#define OWNER ((unsigned short)0x8000) /* mask for ownership bit */
+#define OWN_DRIVER ((unsigned short)0x8000) /* value of owner bit == host */
+#define OWN_SAB ((unsigned short)0x0000) /* value of owner bit == sab or
+ * receive or send */
+#define LISTSIZE 32
+#define RXSIZE (8192+3)
+#define MAXNAMESIZE 11
+#define MAXSAB8253XDEVICES 256
+
+struct counters
+{
+ unsigned int interruptcount;
+ unsigned int freecount;
+ unsigned int receivepacket;
+ unsigned int receivebytes;
+ unsigned int transmitpacket;
+ unsigned int transmitbytes;
+ unsigned int tx_drops;
+ unsigned int rx_drops;
+};
+
+typedef struct ring_descriptor
+{
+ unsigned short Count;
+ unsigned char sendcrc;
+ unsigned char crcindex;
+ unsigned int crc;
+ struct sk_buff* HostVaddr;
+ struct ring_descriptor* VNext;
+} RING_DESCRIPTOR;
+
+typedef struct dcontrol2
+{
+ RING_DESCRIPTOR *receive;
+ RING_DESCRIPTOR *transmit;
+} DCONTROL2;
+
+#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)