Commit 0f2166df authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

usbnet: convert rndis driver to net_device_ops

Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Acked-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b5556498
...@@ -266,6 +266,16 @@ static int rndis_query(struct usbnet *dev, struct usb_interface *intf, ...@@ -266,6 +266,16 @@ static int rndis_query(struct usbnet *dev, struct usb_interface *intf,
return -EDOM; return -EDOM;
} }
/* same as usbnet_netdev_ops but MTU change not allowed */
static const struct net_device_ops rndis_netdev_ops = {
.ndo_open = usbnet_open,
.ndo_stop = usbnet_stop,
.ndo_start_xmit = usbnet_start_xmit,
.ndo_tx_timeout = usbnet_tx_timeout,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
};
int int
generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags) generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags)
{ {
...@@ -327,7 +337,8 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags) ...@@ -327,7 +337,8 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags)
dev->rx_urb_size &= ~(dev->maxpacket - 1); dev->rx_urb_size &= ~(dev->maxpacket - 1);
u.init->max_transfer_size = cpu_to_le32(dev->rx_urb_size); u.init->max_transfer_size = cpu_to_le32(dev->rx_urb_size);
net->change_mtu = NULL; net->netdev_ops = &rndis_netdev_ops;
retval = rndis_command(dev, u.header, CONTROL_BUFFER_SIZE); retval = rndis_command(dev, u.header, CONTROL_BUFFER_SIZE);
if (unlikely(retval < 0)) { if (unlikely(retval < 0)) {
/* it might not even be an RNDIS device!! */ /* it might not even be an RNDIS device!! */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment