aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sungem.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-01-07 20:28:54 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-07 20:28:54 -0500
commitd9a811d5fd9ff6c5fec17dea559a6ea697ae207e (patch)
tree8152fe5d918ba0a68cd7db292d20b27375aea577 /drivers/net/sungem.c
parent2f89d12e98c9248ce967f4c6a86b06dbbcf013cd (diff)
sungem: 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/net/sungem.c')
-rw-r--r--drivers/net/sungem.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index 8a7460412482..86c765d83de1 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -2989,6 +2989,19 @@ static void gem_remove_one(struct pci_dev *pdev)
2989 } 2989 }
2990} 2990}
2991 2991
2992static const struct net_device_ops gem_netdev_ops = {
2993 .ndo_open = gem_open,
2994 .ndo_stop = gem_close,
2995 .ndo_start_xmit = gem_start_xmit,
2996 .ndo_get_stats = gem_get_stats,
2997 .ndo_set_multicast_list = gem_set_multicast,
2998 .ndo_do_ioctl = gem_ioctl,
2999 .ndo_tx_timeout = gem_tx_timeout,
3000 .ndo_change_mtu = gem_change_mtu,
3001 .ndo_set_mac_address = eth_mac_addr,
3002 .ndo_validate_addr = eth_validate_addr,
3003};
3004
2992static int __devinit gem_init_one(struct pci_dev *pdev, 3005static int __devinit gem_init_one(struct pci_dev *pdev,
2993 const struct pci_device_id *ent) 3006 const struct pci_device_id *ent)
2994{ 3007{
@@ -3142,17 +3155,10 @@ static int __devinit gem_init_one(struct pci_dev *pdev,
3142 if (gem_get_device_address(gp)) 3155 if (gem_get_device_address(gp))
3143 goto err_out_free_consistent; 3156 goto err_out_free_consistent;
3144 3157
3145 dev->open = gem_open; 3158 dev->netdev_ops = &gem_netdev_ops;
3146 dev->stop = gem_close;
3147 dev->hard_start_xmit = gem_start_xmit;
3148 dev->get_stats = gem_get_stats;
3149 dev->set_multicast_list = gem_set_multicast;
3150 dev->do_ioctl = gem_ioctl;
3151 netif_napi_add(dev, &gp->napi, gem_poll, 64); 3159 netif_napi_add(dev, &gp->napi, gem_poll, 64);
3152 dev->ethtool_ops = &gem_ethtool_ops; 3160 dev->ethtool_ops = &gem_ethtool_ops;
3153 dev->tx_timeout = gem_tx_timeout;
3154 dev->watchdog_timeo = 5 * HZ; 3161 dev->watchdog_timeo = 5 * HZ;
3155 dev->change_mtu = gem_change_mtu;
3156 dev->irq = pdev->irq; 3162 dev->irq = pdev->irq;
3157 dev->dma = 0; 3163 dev->dma = 0;
3158 dev->set_mac_address = gem_set_mac_address; 3164 dev->set_mac_address = gem_set_mac_address;