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

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

diff -u --recursive --new-file v2.1.30/linux/drivers/net/atari_pamsnet.c linux/drivers/net/atari_pamsnet.c
@@ -699,13 +699,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.
 	 */
@@ -738,12 +731,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;
 }
 
@@ -806,6 +798,7 @@
 			memcpy(skb->data, nic_packet->buffer, pkt_len);
 			netif_rx(skb);
 			lp->stats.rx_packets++;
+			lp->stats.rx_bytes+=pkt_len;
 		}
 	}
 

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