Lines Matching refs:header
99 struct usb_descriptor_header *header; in usb_parse_endpoint() local
103 header = (struct usb_descriptor_header *)buffer; in usb_parse_endpoint()
105 if (header->bLength > size) { in usb_parse_endpoint()
110 if (header->bDescriptorType != USB_DT_ENDPOINT) { in usb_parse_endpoint()
112 header->bDescriptorType, USB_DT_ENDPOINT); in usb_parse_endpoint()
116 if (header->bLength == USB_DT_ENDPOINT_AUDIO_SIZE) in usb_parse_endpoint()
147 buffer += header->bLength; in usb_parse_endpoint()
148 size -= header->bLength; in usb_parse_endpoint()
149 parsed += header->bLength; in usb_parse_endpoint()
154 header = (struct usb_descriptor_header *)buffer; in usb_parse_endpoint()
156 if (header->bLength < 2) { in usb_parse_endpoint()
157 usb_err("invalid descriptor length of %d", header->bLength); in usb_parse_endpoint()
161 if ((header->bDescriptorType == USB_DT_ENDPOINT) || in usb_parse_endpoint()
162 (header->bDescriptorType == USB_DT_INTERFACE) || in usb_parse_endpoint()
163 (header->bDescriptorType == USB_DT_CONFIG) || in usb_parse_endpoint()
164 (header->bDescriptorType == USB_DT_DEVICE)) in usb_parse_endpoint()
167 if ( header->bDescriptorType == USB_DT_OTG ) in usb_parse_endpoint()
177 header->bDescriptorType,header->bLength); in usb_parse_endpoint()
180 buffer += header->bLength; in usb_parse_endpoint()
181 size -= header->bLength; in usb_parse_endpoint()
182 parsed += header->bLength; in usb_parse_endpoint()
238 struct usb_descriptor_header *header; in usb_parse_interface() local
317 header = (struct usb_descriptor_header *)buffer; in usb_parse_interface()
319 if (header->bLength < 2) { in usb_parse_interface()
320 usb_err("invalid descriptor len of %d", header->bLength); in usb_parse_interface()
324 if ((header->bDescriptorType == USB_DT_INTERFACE) || in usb_parse_interface()
325 (header->bDescriptorType == USB_DT_ENDPOINT) || in usb_parse_interface()
326 (header->bDescriptorType == USB_DT_CONFIG) || in usb_parse_interface()
327 (header->bDescriptorType == USB_DT_DEVICE)) in usb_parse_interface()
332 buffer += header->bLength; in usb_parse_interface()
333 parsed += header->bLength; in usb_parse_interface()
334 size -= header->bLength; in usb_parse_interface()
353 header = (struct usb_descriptor_header *)buffer; in usb_parse_interface()
355 ((header->bDescriptorType == USB_DT_CONFIG) || in usb_parse_interface()
356 (header->bDescriptorType == USB_DT_DEVICE))) in usb_parse_interface()
380 header = (struct usb_descriptor_header *)buffer; in usb_parse_interface()
382 if (header->bLength > size) { in usb_parse_interface()
419 struct usb_descriptor_header *header; in usb_parse_configuration() local
457 header = (struct usb_descriptor_header *)buffer; in usb_parse_configuration()
459 if ((header->bLength > size) || (header->bLength < 2)) { in usb_parse_configuration()
460 usb_err("invalid descriptor length of %d", header->bLength); in usb_parse_configuration()
464 if ((header->bDescriptorType == USB_DT_ENDPOINT) || in usb_parse_configuration()
465 (header->bDescriptorType == USB_DT_INTERFACE) || in usb_parse_configuration()
466 (header->bDescriptorType == USB_DT_CONFIG) || in usb_parse_configuration()
467 (header->bDescriptorType == USB_DT_DEVICE)) in usb_parse_configuration()
479 dbg("skipping descriptor 0x%X", header->bDescriptorType); in usb_parse_configuration()
481 buffer += header->bLength; in usb_parse_configuration()
482 size -= header->bLength; in usb_parse_configuration()