]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - drivers/net/fealnx.c
[NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()
[mirror_ubuntu-zesty-kernel.git] / drivers / net / fealnx.c
index 191bd429076aacc9efefdf9f86ba70024fcc540b..43f7647ff24631f2142ac6e68be404a4fc723eab 100644 (file)
@@ -434,7 +434,7 @@ static void reset_timer(unsigned long data);
 static void tx_timeout(struct net_device *dev);
 static void init_ring(struct net_device *dev);
 static int start_tx(struct sk_buff *skb, struct net_device *dev);
-static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *regs);
+static irqreturn_t intr_handler(int irq, void *dev_instance);
 static int netdev_rx(struct net_device *dev);
 static void set_rx_mode(struct net_device *dev);
 static void __set_rx_mode(struct net_device *dev);
@@ -486,6 +486,7 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
 #else
        int bar = 1;
 #endif
+       DECLARE_MAC_BUF(mac);
 
 /* when built into the kernel, we only print version if device is found */
 #ifndef MODULE
@@ -527,7 +528,6 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
                err = -ENOMEM;
                goto err_out_unmap;
        }
-       SET_MODULE_OWNER(dev);
        SET_NETDEV_DEV(dev, &pdev->dev);
 
        /* read ethernet id */
@@ -665,11 +665,9 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
        if (err)
                goto err_out_free_tx;
 
-       printk(KERN_INFO "%s: %s at %p, ",
-              dev->name, skel_netdrv_tbl[chip_id].chip_name, ioaddr);
-       for (i = 0; i < 5; i++)
-               printk("%2.2x:", dev->dev_addr[i]);
-       printk("%2.2x, IRQ %d.\n", dev->dev_addr[i], irq);
+       printk(KERN_INFO "%s: %s at %p, %s, IRQ %d.\n",
+              dev->name, skel_netdrv_tbl[chip_id].chip_name, ioaddr,
+              print_mac(mac, dev->dev_addr), irq);
 
        return 0;
 
@@ -1453,7 +1451,7 @@ static void reset_rx_descriptors(struct net_device *dev)
 
 /* The interrupt handler does all of the Rx thread work and cleans up
    after the Tx thread. */
-static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *rgs)
+static irqreturn_t intr_handler(int irq, void *dev_instance)
 {
        struct net_device *dev = (struct net_device *) dev_instance;
        struct netdev_private *np = netdev_priv(dev);
@@ -1719,7 +1717,6 @@ static int netdev_rx(struct net_device *dev)
                           to a minimally-sized skbuff. */
                        if (pkt_len < rx_copybreak &&
                            (skb = dev_alloc_skb(pkt_len + 2)) != NULL) {
-                               skb->dev = dev;
                                skb_reserve(skb, 2);    /* 16 byte align the IP header */
                                pci_dma_sync_single_for_cpu(np->pci_dev,
                                                            np->cur_rx->buffer,
@@ -1728,8 +1725,8 @@ static int netdev_rx(struct net_device *dev)
                                /* Call copy + cksum if available. */
 
 #if ! defined(__alpha__)
-                               eth_copy_and_sum(skb,
-                                       np->cur_rx->skbuff->data, pkt_len, 0);
+                               skb_copy_to_linear_data(skb,
+                                       np->cur_rx->skbuff->data, pkt_len);
                                skb_put(skb, pkt_len);
 #else
                                memcpy(skb_put(skb, pkt_len),
@@ -1893,8 +1890,6 @@ static const struct ethtool_ops netdev_ethtool_ops = {
        .get_link               = netdev_get_link,
        .get_msglevel           = netdev_get_msglevel,
        .set_msglevel           = netdev_set_msglevel,
-       .get_sg                 = ethtool_op_get_sg,
-       .get_tx_csum            = ethtool_op_get_tx_csum,
 };
 
 static int mii_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)