Lines Matching refs:header
81 struct usb_descriptor_header header;
87 usbi_parse_descriptor(buffer, "bb", &header, 0);
91 if (header.bLength > size) {
96 if (header.bDescriptorType != LIBUSB_DT_ENDPOINT) {
98 header.bDescriptorType, LIBUSB_DT_ENDPOINT);
102 if (header.bLength >= ENDPOINT_AUDIO_DESC_LENGTH)
104 else if (header.bLength >= ENDPOINT_DESC_LENGTH)
107 buffer += header.bLength;
108 size -= header.bLength;
109 parsed += header.bLength;
115 usbi_parse_descriptor(buffer, "bb", &header, 0);
117 if (header.bLength < 2) {
118 usbi_err(ctx, "invalid descriptor length %d", header.bLength);
123 if ((header.bDescriptorType == LIBUSB_DT_ENDPOINT) ||
124 (header.bDescriptorType == LIBUSB_DT_INTERFACE) ||
125 (header.bDescriptorType == LIBUSB_DT_CONFIG) ||
126 (header.bDescriptorType == LIBUSB_DT_DEVICE))
129 usbi_dbg("skipping descriptor %x", header.bDescriptorType);
130 buffer += header.bLength;
131 size -= header.bLength;
132 parsed += header.bLength;
191 struct usb_descriptor_header header;
225 usbi_parse_descriptor(buffer, "bb", &header, 0);
226 if (header.bLength < 2) {
228 header.bLength);
234 if ((header.bDescriptorType == LIBUSB_DT_INTERFACE) ||
235 (header.bDescriptorType == LIBUSB_DT_ENDPOINT) ||
236 (header.bDescriptorType == LIBUSB_DT_CONFIG) ||
237 (header.bDescriptorType == LIBUSB_DT_DEVICE))
240 buffer += header.bLength;
241 parsed += header.bLength;
242 size -= header.bLength;
259 usbi_parse_descriptor(buffer, "bb", &header, 0);
261 ((header.bDescriptorType == LIBUSB_DT_CONFIG) ||
262 (header.bDescriptorType == LIBUSB_DT_DEVICE)))
283 usbi_parse_descriptor(buffer, "bb", &header, 0);
285 if (header.bLength > size) {
337 struct usb_descriptor_header header;
369 usbi_parse_descriptor(buffer, "bb", &header, 0);
371 if ((header.bLength > size) ||
372 (header.bLength < DESC_HEADER_LENGTH)) {
374 header.bLength);
380 if ((header.bDescriptorType == LIBUSB_DT_ENDPOINT) ||
381 (header.bDescriptorType == LIBUSB_DT_INTERFACE) ||
382 (header.bDescriptorType == LIBUSB_DT_CONFIG) ||
383 (header.bDescriptorType == LIBUSB_DT_DEVICE))
386 usbi_dbg("skipping descriptor 0x%x\n", header.bDescriptorType);
387 buffer += header.bLength;
388 size -= header.bLength;