diff options
author | 2016-10-12 21:51:11 +0000 | |
---|---|---|
committer | 2016-10-12 21:51:11 +0000 | |
commit | e5de1fc6b3928d52c46c98b0c0e5fc0cbe0a9a7d (patch) | |
tree | 4919ba65dac65c0f1fb6fed4207f5ba20503fa0e | |
parent | Fix functionality and semantics of vmctl load/reload/reset. (diff) | |
download | wireguard-openbsd-e5de1fc6b3928d52c46c98b0c0e5fc0cbe0a9a7d.tar.xz wireguard-openbsd-e5de1fc6b3928d52c46c98b0c0e5fc0cbe0a9a7d.zip |
Rename CDCE_ZAURUS option to CDCE_CRC32 for clarity.
OK kettenis@
-rw-r--r-- | sys/dev/usb/if_cdce.c | 24 | ||||
-rw-r--r-- | sys/dev/usb/if_cdcereg.h | 4 |
2 files changed, 14 insertions, 14 deletions
diff --git a/sys/dev/usb/if_cdce.c b/sys/dev/usb/if_cdce.c index eb3900a0cce..983ddae1d22 100644 --- a/sys/dev/usb/if_cdce.c +++ b/sys/dev/usb/if_cdce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cdce.c,v 1.71 2016/09/26 07:09:32 fcambus Exp $ */ +/* $OpenBSD: if_cdce.c,v 1.72 2016/10/12 21:51:11 fcambus Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul@windriver.com> @@ -93,13 +93,13 @@ static uint32_t cdce_crc32(const void *, size_t); const struct cdce_type cdce_devs[] = { {{ USB_VENDOR_ACERLABS, USB_PRODUCT_ACERLABS_M5632 }, 0 }, {{ USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2501 }, 0 }, - {{ USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SL5500 }, CDCE_ZAURUS }, - {{ USB_VENDOR_SHARP, USB_PRODUCT_SHARP_A300 }, CDCE_ZAURUS }, - {{ USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SL5600 }, CDCE_ZAURUS }, - {{ USB_VENDOR_SHARP, USB_PRODUCT_SHARP_C700 }, CDCE_ZAURUS }, - {{ USB_VENDOR_SHARP, USB_PRODUCT_SHARP_C750 }, CDCE_ZAURUS }, - {{ USB_VENDOR_MOTOROLA2, USB_PRODUCT_MOTOROLA2_USBLAN }, CDCE_ZAURUS }, - {{ USB_VENDOR_MOTOROLA2, USB_PRODUCT_MOTOROLA2_USBLAN2 }, CDCE_ZAURUS }, + {{ USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SL5500 }, CDCE_CRC32 }, + {{ USB_VENDOR_SHARP, USB_PRODUCT_SHARP_A300 }, CDCE_CRC32 }, + {{ USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SL5600 }, CDCE_CRC32 }, + {{ USB_VENDOR_SHARP, USB_PRODUCT_SHARP_C700 }, CDCE_CRC32 }, + {{ USB_VENDOR_SHARP, USB_PRODUCT_SHARP_C750 }, CDCE_CRC32 }, + {{ USB_VENDOR_MOTOROLA2, USB_PRODUCT_MOTOROLA2_USBLAN }, CDCE_CRC32 }, + {{ USB_VENDOR_MOTOROLA2, USB_PRODUCT_MOTOROLA2_USBLAN2 }, CDCE_CRC32 }, {{ USB_VENDOR_GMATE, USB_PRODUCT_GMATE_YP3X00 }, 0 }, {{ USB_VENDOR_NETCHIP, USB_PRODUCT_NETCHIP_ETHERNETGADGET }, 0 }, {{ USB_VENDOR_COMPAQ, USB_PRODUCT_COMPAQ_IPAQLINUX }, 0 }, @@ -409,8 +409,8 @@ cdce_encap(struct cdce_softc *sc, struct mbuf *m, int idx) c = &sc->cdce_cdata.cdce_tx_chain[idx]; m_copydata(m, 0, m->m_pkthdr.len, c->cdce_buf); - if (sc->cdce_flags & CDCE_ZAURUS) { - /* Zaurus wants a 32-bit CRC appended to every frame */ + if (sc->cdce_flags & CDCE_CRC32) { + /* Some devices want a 32-bit CRC appended to every frame */ u_int32_t crc; crc = cdce_crc32(c->cdce_buf, m->m_pkthdr.len); @@ -741,8 +741,8 @@ cdce_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) sc->cdce_rxeof_errors = 0; usbd_get_xfer_status(xfer, NULL, NULL, &total_len, NULL); - if (sc->cdce_flags & CDCE_ZAURUS) - total_len -= 4; /* Strip off CRC added by Zaurus */ + if (sc->cdce_flags & CDCE_CRC32) + total_len -= 4; /* Strip off added CRC */ if (total_len <= 1) goto done; diff --git a/sys/dev/usb/if_cdcereg.h b/sys/dev/usb/if_cdcereg.h index b1bc78a7d1d..3ead6a69914 100644 --- a/sys/dev/usb/if_cdcereg.h +++ b/sys/dev/usb/if_cdcereg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cdcereg.h,v 1.6 2013/12/04 00:52:52 deraadt Exp $ */ +/* $OpenBSD: if_cdcereg.h,v 1.7 2016/10/12 21:51:11 fcambus Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul@windriver.com> @@ -41,7 +41,7 @@ struct cdce_type { struct usb_devno cdce_dev; u_int16_t cdce_flags; -#define CDCE_ZAURUS 1 +#define CDCE_CRC32 1 #define CDCE_SWAPUNION 2 }; |