]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/tsi108_eth.c
ath5k: Add support for AR2417 v2
[linux-2.6-omap-h63xx.git] / drivers / net / tsi108_eth.c
index 6017d5267d08f4c80939834385cc7d3c591ca8be..eb1da6f0b0863cbd827224ddebbc3d5e19275e35 100644 (file)
@@ -263,7 +263,7 @@ static inline void tsi108_write_tbi(struct tsi108_prv_data *data,
                        return;
                udelay(10);
        }
-       printk(KERN_ERR "%s function time out \n", __FUNCTION__);
+       printk(KERN_ERR "%s function time out \n", __func__);
 }
 
 static int mii_speed(struct mii_if_info *mii)
@@ -803,7 +803,8 @@ static int tsi108_refill_rx(struct net_device *dev, int budget)
                int rx = data->rxhead;
                struct sk_buff *skb;
 
-               data->rxskbs[rx] = skb = dev_alloc_skb(TSI108_RXBUF_SIZE + 2);
+               data->rxskbs[rx] = skb = netdev_alloc_skb(dev,
+                                                         TSI108_RXBUF_SIZE + 2);
                if (!skb)
                        break;
 
@@ -1058,7 +1059,7 @@ static void tsi108_stop_ethernet(struct net_device *dev)
                        return;
                udelay(10);
        }
-       printk(KERN_ERR "%s function time out \n", __FUNCTION__);
+       printk(KERN_ERR "%s function time out \n", __func__);
 }
 
 static void tsi108_reset_ether(struct tsi108_prv_data * data)
@@ -1243,7 +1244,7 @@ static void tsi108_init_phy(struct net_device *dev)
                udelay(10);
        }
        if (i == 0)
-               printk(KERN_ERR "%s function time out \n", __FUNCTION__);
+               printk(KERN_ERR "%s function time out \n", __func__);
 
        if (data->phy_type == TSI108_PHY_BCM54XX) {
                tsi108_write_mii(data, 0x09, 0x0300);
@@ -1352,8 +1353,9 @@ static int tsi108_open(struct net_device *dev)
        data->rxhead = 0;
 
        for (i = 0; i < TSI108_RXRING_LEN; i++) {
-               struct sk_buff *skb = dev_alloc_skb(TSI108_RXBUF_SIZE + NET_IP_ALIGN);
+               struct sk_buff *skb;
 
+               skb = netdev_alloc_skb(dev, TSI108_RXBUF_SIZE + NET_IP_ALIGN);
                if (!skb) {
                        /* Bah.  No memory for now, but maybe we'll get
                         * some more later.
@@ -1435,7 +1437,6 @@ static int tsi108_close(struct net_device *dev)
                dev_kfree_skb(skb);
        }
 
-       synchronize_irq(data->irq_num);
        free_irq(data->irq_num, dev);
 
        /* Discard the RX ring. */
@@ -1526,7 +1527,7 @@ static int tsi108_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
        struct tsi108_prv_data *data = netdev_priv(dev);
        unsigned long flags;
        int rc;
-       
+
        spin_lock_irqsave(&data->txlock, flags);
        rc = mii_ethtool_gset(&data->mii_if, cmd);
        spin_unlock_irqrestore(&data->txlock, flags);
@@ -1543,7 +1544,7 @@ static int tsi108_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
        spin_lock_irqsave(&data->txlock, flags);
        rc = mii_ethtool_sset(&data->mii_if, cmd);
        spin_unlock_irqrestore(&data->txlock, flags);
-       
+
        return rc;
 }