From e174961ca1a0b28f7abf0be47973ad57cb74e5f0 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Mon, 27 Oct 2008 15:59:26 -0700 Subject: net: convert print_mac to %pM This converts pretty much everything to print_mac. There were a few things that had conflicts which I have just dropped for now, no harm done. I've built an allyesconfig with this and looked at the files that weren't built very carefully, but it's a huge patch. Signed-off-by: Johannes Berg Signed-off-by: David S. Miller --- drivers/net/dl2k.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/net/dl2k.c') diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c index f8037110a522..f9e405a8a844 100644 --- a/drivers/net/dl2k.c +++ b/drivers/net/dl2k.c @@ -97,7 +97,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); @@ -257,8 +256,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); -- cgit v1.2.3 From babcda74e9d96bb58fd9c6c5112dbdbff169e695 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Mon, 3 Nov 2008 21:11:17 -0800 Subject: drivers/net: Kill now superfluous ->last_rx stores. The generic packet receive code takes care of setting netdev->last_rx when necessary, for the sake of the bonding ARP monitor. Drivers need not do it any more. Some cases had to be skipped over because the drivers were making use of the ->last_rx value themselves. Signed-off-by: David S. Miller --- drivers/net/dl2k.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/net/dl2k.c') diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c index f9e405a8a844..9ec9785a9fc3 100644 --- a/drivers/net/dl2k.c +++ b/drivers/net/dl2k.c @@ -891,7 +891,6 @@ receive_packet (struct net_device *dev) } #endif netif_rx (skb); - dev->last_rx = jiffies; } entry = (entry + 1) % RX_RING_SIZE; } -- cgit v1.2.3 From 876526443e64ae15bc3715dd6fbe8b9deadf89bc Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 21 Nov 2008 17:31:51 -0800 Subject: dl2k: convert to net_device_ops Convert driver to new net_device_ops. Compile tested only. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller --- drivers/net/dl2k.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'drivers/net/dl2k.c') diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c index 9ec9785a9fc3..c749e9fb47ef 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) { @@ -197,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; -- cgit v1.2.3