patch-2.1.25 linux/drivers/net/znet.c
Next file: linux/drivers/scsi/Config.in
Previous file: linux/drivers/net/wic.c
Back to the patch index
Back to the overall index
- Lines: 56
- Date:
Sun Feb 2 15:18:43 1997
- Orig file:
v2.1.24/linux/drivers/net/znet.c
- Orig date:
Fri Mar 1 07:50:49 1996
diff -u --recursive --new-file v2.1.24/linux/drivers/net/znet.c linux/drivers/net/znet.c
@@ -121,7 +121,7 @@
#define net_local znet_private
struct znet_private {
int rx_dma, tx_dma;
- struct enet_statistics stats;
+ struct net_device_stats stats;
/* The starting, current, and end pointers for the packet buffers. */
ushort *rx_start, *rx_cur, *rx_end;
ushort *tx_start, *tx_cur, *tx_end;
@@ -185,7 +185,7 @@
static void znet_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static void znet_rx(struct device *dev);
static int znet_close(struct device *dev);
-static struct enet_statistics *net_get_stats(struct device *dev);
+static struct net_device_stats *net_get_stats(struct device *dev);
static void set_multicast_list(struct device *dev);
static void hardware_init(struct device *dev);
static void update_stop_hit(short ioaddr, unsigned short rx_stop_offset);
@@ -317,6 +317,7 @@
static int znet_send_packet(struct sk_buff *skb, struct device *dev)
{
int ioaddr = dev->base_addr;
+ struct net_local *lp = (struct net_local *)dev->priv;
if (znet_debug > 4)
printk(KERN_DEBUG "%s: ZNet_send_packet(%ld).\n", dev->name, dev->tbusy);
@@ -340,11 +341,6 @@
hardware_init(dev);
}
- if (skb == NULL) {
- dev_tint(dev);
- return 0;
- }
-
/* Check that the part hasn't reset itself, probably from suspend. */
outb(CMD0_STAT0, ioaddr);
if (inw(ioaddr) == 0x0010
@@ -361,6 +357,8 @@
unsigned char *buf = (void *)skb->data;
ushort *tx_link = zn.tx_cur - 1;
ushort rnd_len = (length + 1)>>1;
+
+ lp->stats.tx_bytes+=length;
{
short dma_port = ((zn.tx_dma&3)<<2) + IO_DMA2_BASE;
@@ -616,7 +614,7 @@
/* Get the current statistics. This may be called with the card open or
closed. */
-static struct enet_statistics *net_get_stats(struct device *dev)
+static struct net_device_stats *net_get_stats(struct device *dev)
{
struct net_local *lp = (struct net_local *)dev->priv;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov