patch-2.4.2 linux/drivers/net/sb1000.c
Next file: linux/drivers/net/seeq8005.c
Previous file: linux/drivers/net/rrunner.c
Back to the patch index
Back to the overall index
- Lines: 45
- Date:
Tue Feb 13 13:15:05 2001
- Orig file:
v2.4.1/linux/drivers/net/sb1000.c
- Orig date:
Mon Dec 11 13:38:29 2000
diff -u --recursive --new-file v2.4.1/linux/drivers/net/sb1000.c linux/drivers/net/sb1000.c
@@ -44,7 +44,7 @@
#include <linux/ptrace.h>
#include <linux/errno.h>
#include <linux/in.h>
-#include <linux/malloc.h>
+#include <linux/slab.h>
#include <linux/ioport.h>
#include <linux/netdevice.h>
#include <linux/if_arp.h>
@@ -76,7 +76,6 @@
struct sb1000_private {
struct sk_buff *rx_skb[NPIDS];
short rx_dlen[NPIDS];
- unsigned int rx_bytes;
unsigned int rx_frames;
short rx_error_count;
short rx_error_dpc_count;
@@ -887,9 +886,9 @@
/* datagram completed: send to upper level */
skb_trim(skb, dlen);
netif_rx(skb);
+ dev->last_rx = jiffies;
stats->rx_bytes+=dlen;
stats->rx_packets++;
- lp->rx_bytes += dlen;
lp->rx_skb[ns] = 0;
lp->rx_session_id[ns] |= 0x40;
return 0;
@@ -974,7 +973,6 @@
lp->rx_dlen[1] = 0;
lp->rx_dlen[2] = 0;
lp->rx_dlen[3] = 0;
- lp->rx_bytes = 0;
lp->rx_frames = 0;
lp->rx_error_count = 0;
lp->rx_error_dpc_count = 0;
@@ -1029,7 +1027,7 @@
switch (cmd) {
case SIOCGCMSTATS: /* get statistics */
- stats[0] = lp->rx_bytes;
+ stats[0] = lp->stats.rx_bytes;
stats[1] = lp->rx_frames;
stats[2] = lp->stats.rx_packets;
stats[3] = lp->stats.rx_errors;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)