aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sis/sis900.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/sis/sis900.c')
-rw-r--r--drivers/net/ethernet/sis/sis900.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/ethernet/sis/sis900.c b/drivers/net/ethernet/sis/sis900.c
index c8efc708c792..5ccf02e7e3ad 100644
--- a/drivers/net/ethernet/sis/sis900.c
+++ b/drivers/net/ethernet/sis/sis900.c
@@ -527,7 +527,7 @@ static int __devinit sis900_probe(struct pci_dev *pci_dev,
527 ret = sis900_get_mac_addr(pci_dev, net_dev); 527 ret = sis900_get_mac_addr(pci_dev, net_dev);
528 528
529 if (!ret || !is_valid_ether_addr(net_dev->dev_addr)) { 529 if (!ret || !is_valid_ether_addr(net_dev->dev_addr)) {
530 random_ether_addr(net_dev->dev_addr); 530 eth_hw_addr_random(net_dev);
531 printk(KERN_WARNING "%s: Unreadable or invalid MAC address," 531 printk(KERN_WARNING "%s: Unreadable or invalid MAC address,"
532 "using random generated one\n", dev_name); 532 "using random generated one\n", dev_name);
533 } 533 }
@@ -619,7 +619,6 @@ static int __devinit sis900_mii_probe(struct net_device * net_dev)
619 } 619 }
620 620
621 if ((mii_phy = kmalloc(sizeof(struct mii_phy), GFP_KERNEL)) == NULL) { 621 if ((mii_phy = kmalloc(sizeof(struct mii_phy), GFP_KERNEL)) == NULL) {
622 printk(KERN_WARNING "Cannot allocate mem for struct mii_phy\n");
623 mii_phy = sis_priv->first_mii; 622 mii_phy = sis_priv->first_mii;
624 while (mii_phy) { 623 while (mii_phy) {
625 struct mii_phy *phy; 624 struct mii_phy *phy;
@@ -1167,7 +1166,7 @@ sis900_init_rx_ring(struct net_device *net_dev)
1167 for (i = 0; i < NUM_RX_DESC; i++) { 1166 for (i = 0; i < NUM_RX_DESC; i++) {
1168 struct sk_buff *skb; 1167 struct sk_buff *skb;
1169 1168
1170 if ((skb = dev_alloc_skb(RX_BUF_SIZE)) == NULL) { 1169 if ((skb = netdev_alloc_skb(net_dev, RX_BUF_SIZE)) == NULL) {
1171 /* not enough memory for skbuff, this makes a "hole" 1170 /* not enough memory for skbuff, this makes a "hole"
1172 on the buffer ring, it is not clear how the 1171 on the buffer ring, it is not clear how the
1173 hardware will react to this kind of degenerated 1172 hardware will react to this kind of degenerated
@@ -1770,7 +1769,7 @@ static int sis900_rx(struct net_device *net_dev)
1770 1769
1771 /* refill the Rx buffer, what if there is not enough 1770 /* refill the Rx buffer, what if there is not enough
1772 * memory for new socket buffer ?? */ 1771 * memory for new socket buffer ?? */
1773 if ((skb = dev_alloc_skb(RX_BUF_SIZE)) == NULL) { 1772 if ((skb = netdev_alloc_skb(net_dev, RX_BUF_SIZE)) == NULL) {
1774 /* 1773 /*
1775 * Not enough memory to refill the buffer 1774 * Not enough memory to refill the buffer
1776 * so we need to recycle the old one so 1775 * so we need to recycle the old one so
@@ -1828,7 +1827,7 @@ refill_rx_ring:
1828 entry = sis_priv->dirty_rx % NUM_RX_DESC; 1827 entry = sis_priv->dirty_rx % NUM_RX_DESC;
1829 1828
1830 if (sis_priv->rx_skbuff[entry] == NULL) { 1829 if (sis_priv->rx_skbuff[entry] == NULL) {
1831 if ((skb = dev_alloc_skb(RX_BUF_SIZE)) == NULL) { 1830 if ((skb = netdev_alloc_skb(net_dev, RX_BUF_SIZE)) == NULL) {
1832 /* not enough memory for skbuff, this makes a 1831 /* not enough memory for skbuff, this makes a
1833 * "hole" on the buffer ring, it is not clear 1832 * "hole" on the buffer ring, it is not clear
1834 * how the hardware will react to this kind 1833 * how the hardware will react to this kind