]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
usbnet: convert rtl driver to net_device_ops
authorStephen Hemminger <shemminger@vyatta.com>
Fri, 20 Mar 2009 19:35:51 +0000 (19:35 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Mar 2009 02:41:00 +0000 (19:41 -0700)
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/rtl8150.c

index 67368ccdb1511f2b520e90e2152a99d69ecd3d56..f9fb454ffa8bab25db07ce78f50e30c4fbbc3e80 100644 (file)
@@ -891,6 +891,19 @@ static int rtl8150_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd)
        return res;
 }
 
+static const struct net_device_ops rtl8150_netdev_ops = {
+       .ndo_open               = rtl8150_open,
+       .ndo_stop               = rtl8150_close,
+       .ndo_do_ioctl           = rtl8150_ioctl,
+       .ndo_start_xmit         = rtl8150_start_xmit,
+       .ndo_tx_timeout         = rtl8150_tx_timeout,
+       .ndo_set_multicast_list = rtl8150_set_multicast,
+       .ndo_set_mac_address    = rtl8150_set_mac_address,
+
+       .ndo_change_mtu         = eth_change_mtu,
+       .ndo_validate_addr      = eth_validate_addr,
+};
+
 static int rtl8150_probe(struct usb_interface *intf,
                         const struct usb_device_id *id)
 {
@@ -917,15 +930,8 @@ static int rtl8150_probe(struct usb_interface *intf,
        
        dev->udev = udev;
        dev->netdev = netdev;
-       netdev->open = rtl8150_open;
-       netdev->stop = rtl8150_close;
-       netdev->do_ioctl = rtl8150_ioctl;
+       netdev->netdev_ops = &rtl8150_netdev_ops;
        netdev->watchdog_timeo = RTL8150_TX_TIMEOUT;
-       netdev->tx_timeout = rtl8150_tx_timeout;
-       netdev->hard_start_xmit = rtl8150_start_xmit;
-       netdev->set_multicast_list = rtl8150_set_multicast;
-       netdev->set_mac_address = rtl8150_set_mac_address;
-
        SET_ETHTOOL_OPS(netdev, &ops);
        dev->intr_interval = 100;       /* 100ms */