patch-2.1.33 linux/drivers/net/3c505.c

Next file: linux/drivers/net/Config.in
Previous file: linux/drivers/char/vt.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.32/linux/drivers/net/3c505.c linux/drivers/net/3c505.c
@@ -621,6 +621,7 @@
 	if (set_bit(0, (void *) &adapter->dmaing))
 		printk("%s: rx blocked, DMA in progress, dir %d\n", dev->name, adapter->current_dma.direction);
 
+	skb->dev = dev;
 	adapter->current_dma.direction = 0;
 	adapter->current_dma.length = rlen;
 	adapter->current_dma.skb = skb;
@@ -698,12 +699,12 @@
 			} else {
 				struct sk_buff *skb = adapter->current_dma.skb;
 				if (skb) {
-				  skb->dev = dev;
 				  if (adapter->current_dma.target) {
 				    /* have already done the skb_put() */
 				    memcpy(adapter->current_dma.target, adapter->dma_buffer, adapter->current_dma.length);
 				  }
 				  skb->protocol = eth_type_trans(skb,dev);
+				  adapter->stats.rx_bytes += skb->len;
 				  netif_rx(skb);
 				}
 			}
@@ -1032,10 +1033,8 @@
 			printk("%s: transmit blocked\n", dev->name);
 		return FALSE;
 	}
-	adapter = dev->priv;
-
 
-	adapter->stats.tx_bytes+=nlen;
+	adapter->stats.tx_bytes += nlen;
 	
 	/*
 	 * send the adapter a transmit packet command. Ignore segment and offset

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