X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Fnet%2Fdl2k.c;h=c749e9fb47ef9d99922946f42013ab21951b5eb4;hb=705bb9dc72b2464a7e421ee45d5e4a3f206d5c75;hp=f8037110a522e3eb2616414908cacdaafa363c8f;hpb=cb28a1bbdb4790378e7366d6c9ee1d2340b84f92;p=linux-2.6-omap-h63xx.git diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c index f8037110a52..c749e9fb47e 100644 --- a/drivers/net/dl2k.c +++ b/drivers/net/dl2k.c @@ -85,6 +85,19 @@ static int mii_write (struct net_device *dev, int phy_addr, int reg_num, static const struct ethtool_ops ethtool_ops; +static const struct net_device_ops netdev_ops = { + .ndo_open = rio_open, + .ndo_start_xmit = start_xmit, + .ndo_stop = rio_close, + .ndo_get_stats = get_stats, + .ndo_validate_addr = eth_validate_addr, + .ndo_set_mac_address = eth_mac_addr, + .ndo_set_multicast_list = set_multicast, + .ndo_do_ioctl = rio_ioctl, + .ndo_tx_timeout = rio_tx_timeout, + .ndo_change_mtu = change_mtu, +}; + static int __devinit rio_probe1 (struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -97,7 +110,6 @@ rio_probe1 (struct pci_dev *pdev, const struct pci_device_id *ent) static int version_printed; void *ring_space; dma_addr_t ring_dma; - DECLARE_MAC_BUF(mac); if (!version_printed++) printk ("%s", version); @@ -198,15 +210,8 @@ rio_probe1 (struct pci_dev *pdev, const struct pci_device_id *ent) else if (tx_coalesce > TX_RING_SIZE-1) tx_coalesce = TX_RING_SIZE - 1; } - dev->open = &rio_open; - dev->hard_start_xmit = &start_xmit; - dev->stop = &rio_close; - dev->get_stats = &get_stats; - dev->set_multicast_list = &set_multicast; - dev->do_ioctl = &rio_ioctl; - dev->tx_timeout = &rio_tx_timeout; + dev->netdev_ops = &netdev_ops; dev->watchdog_timeo = TX_TIMEOUT; - dev->change_mtu = &change_mtu; SET_ETHTOOL_OPS(dev, ðtool_ops); #if 0 dev->features = NETIF_F_IP_CSUM; @@ -257,8 +262,8 @@ rio_probe1 (struct pci_dev *pdev, const struct pci_device_id *ent) card_idx++; - printk (KERN_INFO "%s: %s, %s, IRQ %d\n", - dev->name, np->name, print_mac(mac, dev->dev_addr), irq); + printk (KERN_INFO "%s: %s, %pM, IRQ %d\n", + dev->name, np->name, dev->dev_addr, irq); if (tx_coalesce > 1) printk(KERN_INFO "tx_coalesce:\t%d packets\n", tx_coalesce); @@ -892,7 +897,6 @@ receive_packet (struct net_device *dev) } #endif netif_rx (skb); - dev->last_rx = jiffies; } entry = (entry + 1) % RX_RING_SIZE; }