patch-2.1.31 linux/drivers/net/atari_bionet.c

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

diff -u --recursive --new-file v2.1.30/linux/drivers/net/atari_bionet.c linux/drivers/net/atari_bionet.c
@@ -436,13 +436,6 @@
 	struct net_local *lp = (struct net_local *)dev->priv;
 	unsigned long flags;
 
-	/* If some higher layer thinks we've missed an tx-done interrupt we
-	 * are passed NULL. Caution: dev_tint() handles the cli()/sti() itself.
-	 */
-	if (skb == NULL) {
-		dev_tint(dev);
-		return 0;
-	}
 	/* Block a timer-based transmit from overlapping.  This could better be
 	 * done with atomic_swap(1, dev->tbusy), but set_bit() works as well.
 	 */
@@ -473,12 +466,11 @@
 
 		dev->trans_start = jiffies;
 		dev->tbusy	 = 0;
+		lp->stats.tx_packets++;
+		lp->stats.tx_bytes+=length;
 	}
 	dev_kfree_skb(skb, FREE_WRITE);
 
-	/* You might need to clean up and record Tx statistics here.
-	 */
-	lp->stats.tx_packets++;
 	return 0;
 }
 
@@ -539,6 +531,7 @@
 			memcpy(skb->data, nic_packet->buffer, pkt_len);
 			netif_rx(skb);
 			lp->stats.rx_packets++;
+			lp->stats.rx_bytes+=pkt_len;
 		}
 	}
 
@@ -612,9 +605,10 @@
 #undef	NEXT_DEV
 #define NEXT_DEV	(&bio_dev)
 
+static char bio_name[16];
 static struct device bio_dev =
 	{
-		"        ",	/* filled in by register_netdev() */
+		bio_name,	/* filled in by register_netdev() */
 		0, 0, 0, 0,	/* memory */
 		0, 0,		/* base, irq */
 		0, 0, 0, NEXT_DEV, bionet_probe,

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov