diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-03-20 15:36:00 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-21 22:55:35 -0400 |
commit | 0f2166dff6440bb6fb39e4fbe7bfca7cde95d650 (patch) | |
tree | 25c66eaf804ff4b49248236e3a6c4356aeaf0fc8 /drivers/net/usb/rndis_host.c | |
parent | b5556498b60a237cca173dfd60109f3504ce25ca (diff) |
usbnet: convert rndis driver to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/rndis_host.c')
-rw-r--r-- | drivers/net/usb/rndis_host.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c index b7f763e1298c..1bf243ef950e 100644 --- a/drivers/net/usb/rndis_host.c +++ b/drivers/net/usb/rndis_host.c | |||
@@ -266,6 +266,16 @@ response_error: | |||
266 | return -EDOM; | 266 | return -EDOM; |
267 | } | 267 | } |
268 | 268 | ||
269 | /* same as usbnet_netdev_ops but MTU change not allowed */ | ||
270 | static const struct net_device_ops rndis_netdev_ops = { | ||
271 | .ndo_open = usbnet_open, | ||
272 | .ndo_stop = usbnet_stop, | ||
273 | .ndo_start_xmit = usbnet_start_xmit, | ||
274 | .ndo_tx_timeout = usbnet_tx_timeout, | ||
275 | .ndo_set_mac_address = eth_mac_addr, | ||
276 | .ndo_validate_addr = eth_validate_addr, | ||
277 | }; | ||
278 | |||
269 | int | 279 | int |
270 | generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags) | 280 | generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags) |
271 | { | 281 | { |
@@ -327,7 +337,8 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags) | |||
327 | dev->rx_urb_size &= ~(dev->maxpacket - 1); | 337 | dev->rx_urb_size &= ~(dev->maxpacket - 1); |
328 | u.init->max_transfer_size = cpu_to_le32(dev->rx_urb_size); | 338 | u.init->max_transfer_size = cpu_to_le32(dev->rx_urb_size); |
329 | 339 | ||
330 | net->change_mtu = NULL; | 340 | net->netdev_ops = &rndis_netdev_ops; |
341 | |||
331 | retval = rndis_command(dev, u.header, CONTROL_BUFFER_SIZE); | 342 | retval = rndis_command(dev, u.header, CONTROL_BUFFER_SIZE); |
332 | if (unlikely(retval < 0)) { | 343 | if (unlikely(retval < 0)) { |
333 | /* it might not even be an RNDIS device!! */ | 344 | /* it might not even be an RNDIS device!! */ |