aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sundance.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2009-01-09 03:39:43 -0500
committerLen Brown <len.brown@intel.com>2009-01-09 03:39:43 -0500
commitb2576e1d4408e134e2188c967b1f28af39cd79d4 (patch)
tree004f3c82faab760f304ce031d6d2f572e7746a50 /drivers/net/sundance.c
parent3cc8a5f4ba91f67bbdb81a43a99281a26aab8d77 (diff)
parent2150edc6c5cf00f7adb54538b9ea2a3e9cedca3f (diff)
Merge branch 'linus' into release
Diffstat (limited to 'drivers/net/sundance.c')
-rw-r--r--drivers/net/sundance.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
index f860ea150395..feaf0e0577d7 100644
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -449,6 +449,19 @@ static void sundance_reset(struct net_device *dev, unsigned long reset_cmd)
449 } 449 }
450} 450}
451 451
452static const struct net_device_ops netdev_ops = {
453 .ndo_open = netdev_open,
454 .ndo_stop = netdev_close,
455 .ndo_start_xmit = start_tx,
456 .ndo_get_stats = get_stats,
457 .ndo_set_multicast_list = set_rx_mode,
458 .ndo_do_ioctl = netdev_ioctl,
459 .ndo_tx_timeout = tx_timeout,
460 .ndo_change_mtu = change_mtu,
461 .ndo_set_mac_address = eth_mac_addr,
462 .ndo_validate_addr = eth_validate_addr,
463};
464
452static int __devinit sundance_probe1 (struct pci_dev *pdev, 465static int __devinit sundance_probe1 (struct pci_dev *pdev,
453 const struct pci_device_id *ent) 466 const struct pci_device_id *ent)
454{ 467{
@@ -468,7 +481,6 @@ static int __devinit sundance_probe1 (struct pci_dev *pdev,
468 int bar = 1; 481 int bar = 1;
469#endif 482#endif
470 int phy, phy_end, phy_idx = 0; 483 int phy, phy_end, phy_idx = 0;
471 DECLARE_MAC_BUF(mac);
472 484
473/* when built into the kernel, we only print version if device is found */ 485/* when built into the kernel, we only print version if device is found */
474#ifndef MODULE 486#ifndef MODULE
@@ -531,25 +543,19 @@ static int __devinit sundance_probe1 (struct pci_dev *pdev,
531 np->mii_if.reg_num_mask = 0x1f; 543 np->mii_if.reg_num_mask = 0x1f;
532 544
533 /* The chip-specific entries in the device structure. */ 545 /* The chip-specific entries in the device structure. */
534 dev->open = &netdev_open; 546 dev->netdev_ops = &netdev_ops;
535 dev->hard_start_xmit = &start_tx;
536 dev->stop = &netdev_close;
537 dev->get_stats = &get_stats;
538 dev->set_multicast_list = &set_rx_mode;
539 dev->do_ioctl = &netdev_ioctl;
540 SET_ETHTOOL_OPS(dev, &ethtool_ops); 547 SET_ETHTOOL_OPS(dev, &ethtool_ops);
541 dev->tx_timeout = &tx_timeout;
542 dev->watchdog_timeo = TX_TIMEOUT; 548 dev->watchdog_timeo = TX_TIMEOUT;
543 dev->change_mtu = &change_mtu; 549
544 pci_set_drvdata(pdev, dev); 550 pci_set_drvdata(pdev, dev);
545 551
546 i = register_netdev(dev); 552 i = register_netdev(dev);
547 if (i) 553 if (i)
548 goto err_out_unmap_rx; 554 goto err_out_unmap_rx;
549 555
550 printk(KERN_INFO "%s: %s at %p, %s, IRQ %d.\n", 556 printk(KERN_INFO "%s: %s at %p, %pM, IRQ %d.\n",
551 dev->name, pci_id_tbl[chip_idx].name, ioaddr, 557 dev->name, pci_id_tbl[chip_idx].name, ioaddr,
552 print_mac(mac, dev->dev_addr), irq); 558 dev->dev_addr, irq);
553 559
554 np->phys[0] = 1; /* Default setting */ 560 np->phys[0] = 1; /* Default setting */
555 np->mii_preamble_required++; 561 np->mii_preamble_required++;
@@ -1351,7 +1357,6 @@ static void rx_poll(unsigned long data)
1351 skb->protocol = eth_type_trans(skb, dev); 1357 skb->protocol = eth_type_trans(skb, dev);
1352 /* Note: checksum -> skb->ip_summed = CHECKSUM_UNNECESSARY; */ 1358 /* Note: checksum -> skb->ip_summed = CHECKSUM_UNNECESSARY; */
1353 netif_rx(skb); 1359 netif_rx(skb);
1354 dev->last_rx = jiffies;
1355 } 1360 }
1356 entry = (entry + 1) % RX_RING_SIZE; 1361 entry = (entry + 1) % RX_RING_SIZE;
1357 received++; 1362 received++;