diff options
author | Oliver Neukum <oneukum@suse.de> | 2009-01-08 14:22:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-08 14:22:25 -0500 |
commit | 8cb89571bd66fec6a71d8a2b1de2262722dfbb8d (patch) | |
tree | 8052cbcca5cc4b6b50a10d973e9836482cc65058 /drivers/net/usb | |
parent | 9f4c95835654f6169469af8a1de91454f7a65ac1 (diff) |
net: convert pegasus driver to net_device_ops
This converts the pegasus driver to use of the new net_device_ops structure
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/pegasus.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index d9241f1c0803..a8228d87c8cf 100644 --- a/drivers/net/usb/pegasus.c +++ b/drivers/net/usb/pegasus.c | |||
@@ -93,6 +93,7 @@ module_param (msg_level, int, 0); | |||
93 | MODULE_PARM_DESC (msg_level, "Override default message level"); | 93 | MODULE_PARM_DESC (msg_level, "Override default message level"); |
94 | 94 | ||
95 | MODULE_DEVICE_TABLE(usb, pegasus_ids); | 95 | MODULE_DEVICE_TABLE(usb, pegasus_ids); |
96 | static const struct net_device_ops pegasus_netdev_ops; | ||
96 | 97 | ||
97 | static int update_eth_regs_async(pegasus_t *); | 98 | static int update_eth_regs_async(pegasus_t *); |
98 | /* Aargh!!! I _really_ hate such tweaks */ | 99 | /* Aargh!!! I _really_ hate such tweaks */ |
@@ -1360,14 +1361,10 @@ static int pegasus_probe(struct usb_interface *intf, | |||
1360 | pegasus->intf = intf; | 1361 | pegasus->intf = intf; |
1361 | pegasus->usb = dev; | 1362 | pegasus->usb = dev; |
1362 | pegasus->net = net; | 1363 | pegasus->net = net; |
1363 | net->open = pegasus_open; | 1364 | |
1364 | net->stop = pegasus_close; | 1365 | |
1365 | net->watchdog_timeo = PEGASUS_TX_TIMEOUT; | 1366 | net->watchdog_timeo = PEGASUS_TX_TIMEOUT; |
1366 | net->tx_timeout = pegasus_tx_timeout; | 1367 | net->netdev_ops = &pegasus_netdev_ops; |
1367 | net->do_ioctl = pegasus_ioctl; | ||
1368 | net->hard_start_xmit = pegasus_start_xmit; | ||
1369 | net->set_multicast_list = pegasus_set_multicast; | ||
1370 | net->get_stats = pegasus_netdev_stats; | ||
1371 | SET_ETHTOOL_OPS(net, &ops); | 1368 | SET_ETHTOOL_OPS(net, &ops); |
1372 | pegasus->mii.dev = net; | 1369 | pegasus->mii.dev = net; |
1373 | pegasus->mii.mdio_read = mdio_read; | 1370 | pegasus->mii.mdio_read = mdio_read; |
@@ -1482,6 +1479,16 @@ static int pegasus_resume (struct usb_interface *intf) | |||
1482 | return 0; | 1479 | return 0; |
1483 | } | 1480 | } |
1484 | 1481 | ||
1482 | static const struct net_device_ops pegasus_netdev_ops = { | ||
1483 | .ndo_open = pegasus_open, | ||
1484 | .ndo_stop = pegasus_close, | ||
1485 | .ndo_do_ioctl = pegasus_ioctl, | ||
1486 | .ndo_start_xmit = pegasus_start_xmit, | ||
1487 | .ndo_set_multicast_list = pegasus_set_multicast, | ||
1488 | .ndo_get_stats = pegasus_netdev_stats, | ||
1489 | .ndo_tx_timeout = pegasus_tx_timeout, | ||
1490 | }; | ||
1491 | |||
1485 | static struct usb_driver pegasus_driver = { | 1492 | static struct usb_driver pegasus_driver = { |
1486 | .name = driver_name, | 1493 | .name = driver_name, |
1487 | .probe = pegasus_probe, | 1494 | .probe = pegasus_probe, |