patch-1.3.31 linux/drivers/net/8390.h

Next file: linux/drivers/net/CONFIG
Previous file: linux/drivers/net/8390.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.30/linux/drivers/net/8390.h linux/drivers/net/8390.h
@@ -9,6 +9,7 @@
 
 #include <linux/if_ether.h>
 #include <linux/ioport.h>
+#include <linux/skbuff.h>
 
 #define TX_2X_PAGES 12
 #define TX_1X_PAGES 6
@@ -16,6 +17,13 @@
 
 #define ETHER_ADDR_LEN 6
 
+/* The 8390 specific per-packet-header format. */
+struct e8390_pkt_hdr {
+  unsigned char status; /* status */
+  unsigned char next;   /* pointer to next packet. */
+  unsigned short count; /* header + packet length in bytes */
+};
+
 /* From 8390.c */
 extern int ei_debug;
 extern struct sigaction ei_sigaction;
@@ -39,8 +47,9 @@
 struct ei_device {
   const char *name;
   void (*reset_8390)(struct device *);
+  void (*get_8390_hdr)(struct device *, struct e8390_pkt_hdr *, int);
   void (*block_output)(struct device *, int, const unsigned char *, int);
-  int  (*block_input)(struct device *, int, char *, int);
+  void (*block_input)(struct device *, int, struct sk_buff *, int);
   unsigned open:1;
   unsigned word16:1;  /* We have the 16-bit (vs 8-bit) version of the card. */
   unsigned txing:1;		/* Transmit Active */
@@ -63,8 +72,8 @@
 /* The maximum number of 8390 interrupt service routines called per IRQ. */
 #define MAX_SERVICE 12
 
-/* The maximum number of jiffies waited before assuming a Tx failed. */
-#define TX_TIMEOUT 20 
+/* The maximum time waited (in jiffies) before assuming a Tx failed. (20ms) */
+#define TX_TIMEOUT (20*HZ/100)
 
 #define ei_status (*(struct ei_device *)(dev->priv))
 
@@ -155,10 +164,4 @@
 #define ENTSR_CDH 0x40	/* The collision detect "heartbeat" signal was lost. */
 #define ENTSR_OWC 0x80  /* There was an out-of-window collision. */
 
-/* The per-packet-header format. */
-struct e8390_pkt_hdr {
-  unsigned char status; /* status */
-  unsigned char next;   /* pointer to next packet. */
-  unsigned short count; /* header + packet length in bytes */
-};
 #endif /* _8390_h */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this