patch-2.1.25 linux/drivers/net/3c509.c
Next file: linux/drivers/net/3c523.c
Previous file: linux/drivers/net/3c507.c
Back to the patch index
Back to the overall index
- Lines: 61
- Date:
Sun Feb 2 15:18:35 1997
- Orig file:
v2.1.24/linux/drivers/net/3c509.c
- Orig date:
Tue Dec 31 21:41:02 1996
diff -u --recursive --new-file v2.1.24/linux/drivers/net/3c509.c linux/drivers/net/3c509.c
@@ -110,7 +110,7 @@
#define SKB_QUEUE_SIZE 64
struct el3_private {
- struct enet_statistics stats;
+ struct net_device_stats stats;
/* skb send-queue */
int head, size;
struct sk_buff *queue[SKB_QUEUE_SIZE];
@@ -123,7 +123,7 @@
static int el3_start_xmit(struct sk_buff *skb, struct device *dev);
static void el3_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static void update_stats(int addr, struct device *dev);
-static struct enet_statistics *el3_get_stats(struct device *dev);
+static struct net_device_stats *el3_get_stats(struct device *dev);
static int el3_rx(struct device *dev);
static int el3_close(struct device *dev);
#ifdef HAVE_MULTICAST
@@ -421,8 +421,7 @@
return 0; /* Always succeed */
}
-static int
-el3_start_xmit(struct sk_buff *skb, struct device *dev)
+static int el3_start_xmit(struct sk_buff *skb, struct device *dev)
{
struct el3_private *lp = (struct el3_private *)dev->priv;
int ioaddr = dev->base_addr;
@@ -444,14 +443,6 @@
dev->tbusy = 0;
}
- if (skb == NULL) {
- dev_tint(dev);
- return 0;
- }
-
- if (skb->len <= 0)
- return 0;
-
if (el3_debug > 4) {
printk("%s: el3_start_xmit(length = %u) called, status %4.4x.\n",
dev->name, skb->len, inw(ioaddr + EL3_STATUS));
@@ -479,6 +470,7 @@
if (set_bit(0, (void*)&dev->tbusy) != 0)
printk("%s: Transmitter access conflict.\n", dev->name);
else {
+ lp->stats.tx_bytes+=skb->len;
/* Put out the doubleword header... */
outw(skb->len, ioaddr + TX_FIFO);
outw(0x00, ioaddr + TX_FIFO);
@@ -589,8 +581,7 @@
}
-static struct enet_statistics *
-el3_get_stats(struct device *dev)
+static struct net_device_stats *el3_get_stats(struct device *dev)
{
struct el3_private *lp = (struct el3_private *)dev->priv;
unsigned long flags;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov