Deleted Added
full compact
if_cue.c (227309) if_cue.c (233774)
1/*-
2 * Copyright (c) 1997, 1998, 1999, 2000
3 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1997, 1998, 1999, 2000
3 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/dev/usb/net/if_cue.c 227309 2011-11-07 15:43:11Z ed $");
34__FBSDID("$FreeBSD: head/sys/dev/usb/net/if_cue.c 233774 2012-04-02 10:50:42Z hselasky $");
35
36/*
37 * CATC USB-EL1210A USB to ethernet driver. Used in the CATC Netmate
38 * adapters and others.
39 *
40 * Written by Bill Paul <wpaul@ee.columbia.edu>
41 * Electrical Engineering Department
42 * Columbia University, New York City

--- 409 unchanged lines hidden (view full) ---

452 int len;
453 int actlen;
454
455 usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL);
456
457 switch (USB_GET_STATE(xfer)) {
458 case USB_ST_TRANSFERRED:
459
35
36/*
37 * CATC USB-EL1210A USB to ethernet driver. Used in the CATC Netmate
38 * adapters and others.
39 *
40 * Written by Bill Paul <wpaul@ee.columbia.edu>
41 * Electrical Engineering Department
42 * Columbia University, New York City

--- 409 unchanged lines hidden (view full) ---

452 int len;
453 int actlen;
454
455 usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL);
456
457 switch (USB_GET_STATE(xfer)) {
458 case USB_ST_TRANSFERRED:
459
460 if (actlen <= (2 + sizeof(struct ether_header))) {
460 if (actlen <= (int)(2 + sizeof(struct ether_header))) {
461 ifp->if_ierrors++;
462 goto tr_setup;
463 }
464 pc = usbd_xfer_get_frame(xfer, 0);
465 usbd_copy_out(pc, 0, buf, 2);
466 actlen -= 2;
467 len = buf[0] | (buf[1] << 8);
468 len = min(actlen, len);

--- 182 unchanged lines hidden ---
461 ifp->if_ierrors++;
462 goto tr_setup;
463 }
464 pc = usbd_xfer_get_frame(xfer, 0);
465 usbd_copy_out(pc, 0, buf, 2);
466 actlen -= 2;
467 len = buf[0] | (buf[1] << 8);
468 len = min(actlen, len);

--- 182 unchanged lines hidden ---