summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-03-20 19:35:58 +0000
committerDavid S. Miller <davem@davemloft.net>2009-03-21 19:55:34 -0700
commit63e77b391f7230ab87effbcaf7238e9b1e6d7404 (patch)
tree5633e01b782d4ee59fa666fa041f380d7993e702 /drivers/net
parente12c4f83210b457e2969fbe1198357e66f044a93 (diff)
usbnet: convert smsc95xx driver to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/usb/smsc95xx.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index 3e6155a38f0c..dc1665326592 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -1008,6 +1008,18 @@ static int smsc95xx_reset(struct usbnet *dev)
return 0;
}
+static const struct net_device_ops smsc95xx_netdev_ops = {
+ .ndo_open = usbnet_open,
+ .ndo_stop = usbnet_stop,
+ .ndo_start_xmit = usbnet_start_xmit,
+ .ndo_tx_timeout = usbnet_tx_timeout,
+ .ndo_change_mtu = usbnet_change_mtu,
+ .ndo_set_mac_address = eth_mac_addr,
+ .ndo_validate_addr = eth_validate_addr,
+ .ndo_do_ioctl = smsc95xx_ioctl,
+ .ndo_set_multicast_list = smsc95xx_set_multicast,
+};
+
static int smsc95xx_bind(struct usbnet *dev, struct usb_interface *intf)
{
struct smsc95xx_priv *pdata = NULL;
@@ -1038,9 +1050,8 @@ static int smsc95xx_bind(struct usbnet *dev, struct usb_interface *intf)
/* Init all registers */
ret = smsc95xx_reset(dev);
- dev->net->do_ioctl = smsc95xx_ioctl;
+ dev->net->netdev_ops = &smsc95xx_netdev_ops;
dev->net->ethtool_ops = &smsc95xx_ethtool_ops;
- dev->net->set_multicast_list = smsc95xx_set_multicast;
dev->net->flags |= IFF_MULTICAST;
dev->net->hard_header_len += SMSC95XX_TX_OVERHEAD;
return 0;