aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-03-20 15:35:51 -0400
committerDavid S. Miller <davem@davemloft.net>2009-03-21 22:41:00 -0400
commitd79f7ef48b0897458a4df30085338aeb7fb85ffc (patch)
treea430632a79ea8ce44125c5bb89662518cc5f35b1
parentb7e41e23055f20be334c404b15373c8deb2262b9 (diff)
usbnet: convert rtl driver to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/usb/rtl8150.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c
index 67368ccdb151..f9fb454ffa8b 100644
--- a/drivers/net/usb/rtl8150.c
+++ b/drivers/net/usb/rtl8150.c
@@ -891,6 +891,19 @@ static int rtl8150_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd)
891 return res; 891 return res;
892} 892}
893 893
894static const struct net_device_ops rtl8150_netdev_ops = {
895 .ndo_open = rtl8150_open,
896 .ndo_stop = rtl8150_close,
897 .ndo_do_ioctl = rtl8150_ioctl,
898 .ndo_start_xmit = rtl8150_start_xmit,
899 .ndo_tx_timeout = rtl8150_tx_timeout,
900 .ndo_set_multicast_list = rtl8150_set_multicast,
901 .ndo_set_mac_address = rtl8150_set_mac_address,
902
903 .ndo_change_mtu = eth_change_mtu,
904 .ndo_validate_addr = eth_validate_addr,
905};
906
894static int rtl8150_probe(struct usb_interface *intf, 907static int rtl8150_probe(struct usb_interface *intf,
895 const struct usb_device_id *id) 908 const struct usb_device_id *id)
896{ 909{
@@ -917,15 +930,8 @@ static int rtl8150_probe(struct usb_interface *intf,
917 930
918 dev->udev = udev; 931 dev->udev = udev;
919 dev->netdev = netdev; 932 dev->netdev = netdev;
920 netdev->open = rtl8150_open; 933 netdev->netdev_ops = &rtl8150_netdev_ops;
921 netdev->stop = rtl8150_close;
922 netdev->do_ioctl = rtl8150_ioctl;
923 netdev->watchdog_timeo = RTL8150_TX_TIMEOUT; 934 netdev->watchdog_timeo = RTL8150_TX_TIMEOUT;
924 netdev->tx_timeout = rtl8150_tx_timeout;
925 netdev->hard_start_xmit = rtl8150_start_xmit;
926 netdev->set_multicast_list = rtl8150_set_multicast;
927 netdev->set_mac_address = rtl8150_set_mac_address;
928
929 SET_ETHTOOL_OPS(netdev, &ops); 935 SET_ETHTOOL_OPS(netdev, &ops);
930 dev->intr_interval = 100; /* 100ms */ 936 dev->intr_interval = 100; /* 100ms */
931 937