2 * USB CDC common helpers
4 * Copyright (c) 2015 Oliver Neukum <oneukum@suse.com>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * version 2 as published by the Free Software Foundation.
11 #include <uapi/linux/usb/cdc.h>
14 * inofficial magic numbers
17 #define CDC_PHONET_MAGIC_NUMBER 0xAB
23 struct usb_cdc_parsed_header
{
24 struct usb_cdc_union_desc
*usb_cdc_union_desc
;
25 struct usb_cdc_header_desc
*usb_cdc_header_desc
;
27 struct usb_cdc_call_mgmt_descriptor
*usb_cdc_call_mgmt_descriptor
;
28 struct usb_cdc_acm_descriptor
*usb_cdc_acm_descriptor
;
29 struct usb_cdc_country_functional_desc
*usb_cdc_country_functional_desc
;
30 struct usb_cdc_network_terminal_desc
*usb_cdc_network_terminal_desc
;
31 struct usb_cdc_ether_desc
*usb_cdc_ether_desc
;
32 struct usb_cdc_dmm_desc
*usb_cdc_dmm_desc
;
33 struct usb_cdc_mdlm_desc
*usb_cdc_mdlm_desc
;
34 struct usb_cdc_mdlm_detail_desc
*usb_cdc_mdlm_detail_desc
;
35 struct usb_cdc_obex_desc
*usb_cdc_obex_desc
;
36 struct usb_cdc_ncm_desc
*usb_cdc_ncm_desc
;
37 struct usb_cdc_mbim_desc
*usb_cdc_mbim_desc
;
38 struct usb_cdc_mbim_extended_desc
*usb_cdc_mbim_extended_desc
;
40 bool phonet_magic_present
;
44 int cdc_parse_cdc_header(struct usb_cdc_parsed_header
*hdr
,
45 struct usb_interface
*intf
,