diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-11-21 20:30:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-21 20:30:35 -0500 |
commit | 8126089f9f3ee2608b11dd6c629a71ae1806e4fc (patch) | |
tree | c724fbc5e9115474fd1f12bb9d21ac41f6a9d767 /drivers/net/myri10ge | |
parent | 5d1d07d8b0bbed82546b89e3222ec98567c1652b (diff) |
myri10ge: convert to net_device_ops
Convert driver to new net_device_ops. Compile tested only.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/myri10ge')
-rw-r--r-- | drivers/net/myri10ge/myri10ge.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index c724d96fd1e5..3b7a303cca60 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -3731,6 +3731,17 @@ abort_with_fw: | |||
3731 | myri10ge_load_firmware(mgp, 0); | 3731 | myri10ge_load_firmware(mgp, 0); |
3732 | } | 3732 | } |
3733 | 3733 | ||
3734 | static const struct net_device_ops myri10ge_netdev_ops = { | ||
3735 | .ndo_open = myri10ge_open, | ||
3736 | .ndo_stop = myri10ge_close, | ||
3737 | .ndo_start_xmit = myri10ge_xmit, | ||
3738 | .ndo_get_stats = myri10ge_get_stats, | ||
3739 | .ndo_validate_addr = eth_validate_addr, | ||
3740 | .ndo_change_mtu = myri10ge_change_mtu, | ||
3741 | .ndo_set_multicast_list = myri10ge_set_multicast_list, | ||
3742 | .ndo_set_mac_address = myri10ge_set_mac_address, | ||
3743 | }; | ||
3744 | |||
3734 | static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | 3745 | static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
3735 | { | 3746 | { |
3736 | struct net_device *netdev; | 3747 | struct net_device *netdev; |
@@ -3862,15 +3873,10 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3862 | myri10ge_initial_mtu = MYRI10GE_MAX_ETHER_MTU - ETH_HLEN; | 3873 | myri10ge_initial_mtu = MYRI10GE_MAX_ETHER_MTU - ETH_HLEN; |
3863 | if ((myri10ge_initial_mtu + ETH_HLEN) < 68) | 3874 | if ((myri10ge_initial_mtu + ETH_HLEN) < 68) |
3864 | myri10ge_initial_mtu = 68; | 3875 | myri10ge_initial_mtu = 68; |
3876 | |||
3877 | netdev->netdev_ops = &myri10ge_netdev_ops; | ||
3865 | netdev->mtu = myri10ge_initial_mtu; | 3878 | netdev->mtu = myri10ge_initial_mtu; |
3866 | netdev->open = myri10ge_open; | ||
3867 | netdev->stop = myri10ge_close; | ||
3868 | netdev->hard_start_xmit = myri10ge_xmit; | ||
3869 | netdev->get_stats = myri10ge_get_stats; | ||
3870 | netdev->base_addr = mgp->iomem_base; | 3879 | netdev->base_addr = mgp->iomem_base; |
3871 | netdev->change_mtu = myri10ge_change_mtu; | ||
3872 | netdev->set_multicast_list = myri10ge_set_multicast_list; | ||
3873 | netdev->set_mac_address = myri10ge_set_mac_address; | ||
3874 | netdev->features = mgp->features; | 3880 | netdev->features = mgp->features; |
3875 | 3881 | ||
3876 | if (dac_enabled) | 3882 | if (dac_enabled) |