diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-01-07 20:58:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-07 20:58:17 -0500 |
commit | 4fc8006e003a9bcb09015179e1cfc42420d88872 (patch) | |
tree | 8a18e627e4108a9963e353799329fcbc9cd994a4 /drivers | |
parent | e287157f15f3ab9cda4cfe334fee41c7b758966f (diff) |
starfire: update to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/starfire.c | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c index 57fb1f71c47b..da3a76b18eff 100644 --- a/drivers/net/starfire.c +++ b/drivers/net/starfire.c | |||
@@ -648,6 +648,24 @@ static void netdev_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) | |||
648 | #endif /* VLAN_SUPPORT */ | 648 | #endif /* VLAN_SUPPORT */ |
649 | 649 | ||
650 | 650 | ||
651 | static const struct net_device_ops netdev_ops = { | ||
652 | .ndo_open = netdev_open, | ||
653 | .ndo_stop = netdev_close, | ||
654 | .ndo_start_xmit = start_tx, | ||
655 | .ndo_tx_timeout = tx_timeout, | ||
656 | .ndo_get_stats = get_stats, | ||
657 | .ndo_set_multicast_list = &set_rx_mode, | ||
658 | .ndo_do_ioctl = netdev_ioctl, | ||
659 | .ndo_change_mtu = eth_change_mtu, | ||
660 | .ndo_set_mac_address = eth_mac_addr, | ||
661 | .ndo_validate_addr = eth_validate_addr, | ||
662 | #ifdef VLAN_SUPPORT | ||
663 | .ndo_vlan_rx_register = netdev_vlan_rx_register, | ||
664 | .ndo_vlan_rx_add_vid = netdev_vlan_rx_add_vid, | ||
665 | .ndo_vlan_rx_kill_vid = netdev_vlan_rx_kill_vid, | ||
666 | #endif | ||
667 | }; | ||
668 | |||
651 | static int __devinit starfire_init_one(struct pci_dev *pdev, | 669 | static int __devinit starfire_init_one(struct pci_dev *pdev, |
652 | const struct pci_device_id *ent) | 670 | const struct pci_device_id *ent) |
653 | { | 671 | { |
@@ -710,11 +728,9 @@ static int __devinit starfire_init_one(struct pci_dev *pdev, | |||
710 | if (enable_hw_cksum) | 728 | if (enable_hw_cksum) |
711 | dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG; | 729 | dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG; |
712 | #endif /* ZEROCOPY */ | 730 | #endif /* ZEROCOPY */ |
731 | |||
713 | #ifdef VLAN_SUPPORT | 732 | #ifdef VLAN_SUPPORT |
714 | dev->features |= NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER; | 733 | dev->features |= NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER; |
715 | dev->vlan_rx_register = netdev_vlan_rx_register; | ||
716 | dev->vlan_rx_add_vid = netdev_vlan_rx_add_vid; | ||
717 | dev->vlan_rx_kill_vid = netdev_vlan_rx_kill_vid; | ||
718 | #endif /* VLAN_RX_KILL_VID */ | 734 | #endif /* VLAN_RX_KILL_VID */ |
719 | #ifdef ADDR_64BITS | 735 | #ifdef ADDR_64BITS |
720 | dev->features |= NETIF_F_HIGHDMA; | 736 | dev->features |= NETIF_F_HIGHDMA; |
@@ -810,18 +826,12 @@ static int __devinit starfire_init_one(struct pci_dev *pdev, | |||
810 | } | 826 | } |
811 | } | 827 | } |
812 | 828 | ||
813 | /* The chip-specific entries in the device structure. */ | 829 | dev->netdev_ops = &netdev_ops; |
814 | dev->open = &netdev_open; | ||
815 | dev->hard_start_xmit = &start_tx; | ||
816 | dev->tx_timeout = tx_timeout; | ||
817 | dev->watchdog_timeo = TX_TIMEOUT; | 830 | dev->watchdog_timeo = TX_TIMEOUT; |
818 | netif_napi_add(dev, &np->napi, netdev_poll, max_interrupt_work); | ||
819 | dev->stop = &netdev_close; | ||
820 | dev->get_stats = &get_stats; | ||
821 | dev->set_multicast_list = &set_rx_mode; | ||
822 | dev->do_ioctl = &netdev_ioctl; | ||
823 | SET_ETHTOOL_OPS(dev, ðtool_ops); | 831 | SET_ETHTOOL_OPS(dev, ðtool_ops); |
824 | 832 | ||
833 | netif_napi_add(dev, &np->napi, netdev_poll, max_interrupt_work); | ||
834 | |||
825 | if (mtu) | 835 | if (mtu) |
826 | dev->mtu = mtu; | 836 | dev->mtu = mtu; |
827 | 837 | ||