Skip to content

Commit 51615ed

Browse files
Greg Suarezdavem330
authored andcommitted
USB: cdc: add MBIM constants and structures
Based on revision 1.0 of "Universal Serial Bus Communications Class Subclass Specification for Mobile Broadband Interface Model" available from www.usb.org Signed-off-by: Greg Suarez <[email protected]> [bmork: added DSS defines] Signed-off-by: Bjørn Mork <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent dad957d commit 51615ed

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

include/linux/usb/cdc.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#define USB_CDC_SUBCLASS_OBEX 0x0b
2020
#define USB_CDC_SUBCLASS_EEM 0x0c
2121
#define USB_CDC_SUBCLASS_NCM 0x0d
22+
#define USB_CDC_SUBCLASS_MBIM 0x0e
2223

2324
#define USB_CDC_PROTO_NONE 0
2425

@@ -33,6 +34,7 @@
3334
#define USB_CDC_PROTO_EEM 7
3435

3536
#define USB_CDC_NCM_PROTO_NTB 1
37+
#define USB_CDC_MBIM_PROTO_NTB 2
3638

3739
/*-------------------------------------------------------------------------*/
3840

@@ -53,6 +55,7 @@
5355
#define USB_CDC_DMM_TYPE 0x14
5456
#define USB_CDC_OBEX_TYPE 0x15
5557
#define USB_CDC_NCM_TYPE 0x1a
58+
#define USB_CDC_MBIM_TYPE 0x1b
5659

5760
/* "Header Functional Descriptor" from CDC spec 5.2.3.1 */
5861
struct usb_cdc_header_desc {
@@ -187,6 +190,21 @@ struct usb_cdc_ncm_desc {
187190
__le16 bcdNcmVersion;
188191
__u8 bmNetworkCapabilities;
189192
} __attribute__ ((packed));
193+
194+
/* "MBIM Control Model Functional Descriptor" */
195+
struct usb_cdc_mbim_desc {
196+
__u8 bLength;
197+
__u8 bDescriptorType;
198+
__u8 bDescriptorSubType;
199+
200+
__le16 bcdMBIMVersion;
201+
__le16 wMaxControlMessage;
202+
__u8 bNumberFilters;
203+
__u8 bMaxFilterSize;
204+
__le16 wMaxSegmentSize;
205+
__u8 bmNetworkCapabilities;
206+
} __attribute__ ((packed));
207+
190208
/*-------------------------------------------------------------------------*/
191209

192210
/*
@@ -332,6 +350,11 @@ struct usb_cdc_ncm_nth32 {
332350
#define USB_CDC_NCM_NDP32_CRC_SIGN 0x316D636E /* ncm1 */
333351
#define USB_CDC_NCM_NDP32_NOCRC_SIGN 0x306D636E /* ncm0 */
334352

353+
#define USB_CDC_MBIM_NDP16_IPS_SIGN 0x00535049 /* IPS<sessionID> : IPS0 for now */
354+
#define USB_CDC_MBIM_NDP32_IPS_SIGN 0x00737069 /* ips<sessionID> : ips0 for now */
355+
#define USB_CDC_MBIM_NDP16_DSS_SIGN 0x00535344 /* DSS<sessionID> */
356+
#define USB_CDC_MBIM_NDP32_DSS_SIGN 0x00737364 /* dss<sessionID> */
357+
335358
/* 16-bit NCM Datagram Pointer Entry */
336359
struct usb_cdc_ncm_dpe16 {
337360
__le16 wDatagramIndex;

0 commit comments

Comments
 (0)