aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/rndis_host.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/usb/rndis_host.c')
-rw-r--r--drivers/net/usb/rndis_host.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
index f56dec6119c3..490fa8f55424 100644
--- a/drivers/net/usb/rndis_host.c
+++ b/drivers/net/usb/rndis_host.c
@@ -114,8 +114,8 @@ int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf, int buflen)
114 */ 114 */
115 115
116 /* Issue the request; xid is unique, don't bother byteswapping it */ 116 /* Issue the request; xid is unique, don't bother byteswapping it */
117 if (likely(buf->msg_type != RNDIS_MSG_HALT 117 if (likely(buf->msg_type != RNDIS_MSG_HALT &&
118 && buf->msg_type != RNDIS_MSG_RESET)) { 118 buf->msg_type != RNDIS_MSG_RESET)) {
119 xid = dev->xid++; 119 xid = dev->xid++;
120 if (!xid) 120 if (!xid)
121 xid = dev->xid++; 121 xid = dev->xid++;
@@ -493,9 +493,9 @@ int rndis_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
493 data_len = le32_to_cpu(hdr->data_len); 493 data_len = le32_to_cpu(hdr->data_len);
494 494
495 /* don't choke if we see oob, per-packet data, etc */ 495 /* don't choke if we see oob, per-packet data, etc */
496 if (unlikely(hdr->msg_type != RNDIS_MSG_PACKET 496 if (unlikely(hdr->msg_type != RNDIS_MSG_PACKET ||
497 || skb->len < msg_len 497 skb->len < msg_len ||
498 || (data_offset + data_len + 8) > msg_len)) { 498 (data_offset + data_len + 8) > msg_len)) {
499 dev->net->stats.rx_frame_errors++; 499 dev->net->stats.rx_frame_errors++;
500 devdbg(dev, "bad rndis message %d/%d/%d/%d, len %d", 500 devdbg(dev, "bad rndis message %d/%d/%d/%d, len %d",
501 le32_to_cpu(hdr->msg_type), 501 le32_to_cpu(hdr->msg_type),