Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135408
b: refs/heads/master
c: 0f2166d
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Mar 22, 2009
1 parent e3d5fa4 commit 0de7b6d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b5556498b60a237cca173dfd60109f3504ce25ca
refs/heads/master: 0f2166dff6440bb6fb39e4fbe7bfca7cde95d650
13 changes: 12 additions & 1 deletion trunk/drivers/net/usb/rndis_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,16 @@ static int rndis_query(struct usbnet *dev, struct usb_interface *intf,
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
generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags)
{
Expand Down Expand Up @@ -327,7 +337,8 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags)
dev->rx_urb_size &= ~(dev->maxpacket - 1);
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);
if (unlikely(retval < 0)) {
/* it might not even be an RNDIS device!! */
Expand Down

0 comments on commit 0de7b6d

Please sign in to comment.