Skip to content

Commit

Permalink
USB: rndis_host: debug info clobbered before it is logged
Browse files Browse the repository at this point in the history
The MTU throttle-down if a RNDIS device doesn't support a particular
packet size is being incorrectly logged.  The attempted packet size is
being clobbered before it gets logged.

First patch; please inform if I'm doing this incorrectly.  Diff'd
against latest official source as per the FAQ; forward port to current
git version is straightforward.

Signed-off-by: George Nassar <george.nassar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
George Nassar authored and Greg Kroah-Hartman committed Oct 30, 2009
1 parent 2e2ec95 commit 40ac7b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/usb/rndis_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,12 +362,12 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags)
retval = -EINVAL;
goto halt_fail_and_release;
}
dev->hard_mtu = tmp;
net->mtu = dev->hard_mtu - net->hard_header_len;
dev_warn(&intf->dev,
"dev can't take %u byte packets (max %u), "
"adjusting MTU to %u\n",
dev->hard_mtu, tmp, net->mtu);
dev->hard_mtu, tmp, tmp - net->hard_header_len);
dev->hard_mtu = tmp;
net->mtu = dev->hard_mtu - net->hard_header_len;
}

/* REVISIT: peripheral "alignment" request is ignored ... */
Expand Down

0 comments on commit 40ac7b6

Please sign in to comment.