patch-2.4.15 linux/drivers/net/tokenring/olympic.c

Next file: linux/drivers/net/tulip/21142.c
Previous file: linux/drivers/net/tokenring/lanstreamer.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.14/linux/drivers/net/tokenring/olympic.c linux/drivers/net/tokenring/olympic.c
@@ -737,7 +737,7 @@
 			} else {	
 			
 				if (buffer_cnt == 1) {
-					skb = dev_alloc_skb(olympic_priv->pkt_buf_sz) ; 
+					skb = dev_alloc_skb(max_t(int, olympic_priv->pkt_buf_sz,length)) ; 
 				} else {
 					skb = dev_alloc_skb(length) ; 
 				}
@@ -1684,7 +1684,7 @@
 
 static void __devexit olympic_remove_one(struct pci_dev *pdev) 
 {
-	struct net_device *dev = pdev->driver_data ; 
+	struct net_device *dev = pci_get_drvdata(pdev) ; 
 	struct olympic_private *olympic_priv=(struct olympic_private *)dev->priv;
 
 	if (olympic_priv->olympic_network_monitor) { 
@@ -1722,4 +1722,4 @@
 module_init(olympic_pci_init) ; 
 module_exit(olympic_pci_cleanup) ; 
 
-MODULE_LICENSE("GPL");
\ No newline at end of file
+MODULE_LICENSE("GPL");

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)