patch-2.2.0-pre8 linux/drivers/net/eepro100.c
Next file: linux/drivers/net/eexpress.c
Previous file: linux/drivers/net/acenic.c
Back to the patch index
Back to the overall index
- Lines: 16
- Date:
Fri Jan 15 14:36:21 1999
- Orig file:
v2.2.0-pre7/linux/drivers/net/eepro100.c
- Orig date:
Sun Nov 8 14:03:00 1998
diff -u --recursive --new-file v2.2.0-pre7/linux/drivers/net/eepro100.c linux/drivers/net/eepro100.c
@@ -1110,6 +1110,7 @@
/* Free the original skb. */
if (sp->tx_skbuff[entry]) {
sp->stats.tx_packets++; /* Count only user packets. */
+ sp->stats.tx_bytes += sp->tx_skbuff[entry]->len; /* Count transmitted bytes */
dev_free_skb(sp->tx_skbuff[entry]);
sp->tx_skbuff[entry] = 0;
} else if ((sp->tx_ring[entry].status&0x70000) == CmdNOp << 16)
@@ -1228,6 +1229,7 @@
skb->protocol = eth_type_trans(skb, dev);
netif_rx(skb);
sp->stats.rx_packets++;
+ sp->stats.rx_bytes += pkt_len; /* Count received bytes */
}
entry = (++sp->cur_rx) % RX_RING_SIZE;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov