提交 cb560c40 编写于 作者: X Xenia Ragiadakou 提交者: Greg Kroah-Hartman

staging: ozwpan: fix access byteorder for wMaxPacketSize in ozhcd.c

This patch fixes the access byteorder of wMaxPacketSize
which is __le16, following the USB standard, and needs to
be converted into native cpu byteorder in order to be accessed.

Instead of using le16_to_cpu(hep->desc.wMaxPacketSize),
it was used the usb_endpoint_maxp() function, defined in
<uapi/linux/usb/ch9.h>
Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 0009631b
......@@ -1243,7 +1243,7 @@ static int oz_build_endpoints_for_interface(struct usb_hcd *hcd,
if ((ep->attrib & USB_ENDPOINT_XFERTYPE_MASK)
== USB_ENDPOINT_XFER_ISOC) {
oz_trace("wMaxPacketSize = %d\n",
hep->desc.wMaxPacketSize);
usb_endpoint_maxp(&hep->desc));
ep->credit_ceiling = 200;
if (ep_addr & USB_ENDPOINT_DIR_MASK) {
ep->flags |= OZ_F_EP_BUFFERING;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册