|
19 | 19 | #define USB_CDC_SUBCLASS_OBEX 0x0b
|
20 | 20 | #define USB_CDC_SUBCLASS_EEM 0x0c
|
21 | 21 | #define USB_CDC_SUBCLASS_NCM 0x0d
|
| 22 | +#define USB_CDC_SUBCLASS_MBIM 0x0e |
22 | 23 |
|
23 | 24 | #define USB_CDC_PROTO_NONE 0
|
24 | 25 |
|
|
33 | 34 | #define USB_CDC_PROTO_EEM 7
|
34 | 35 |
|
35 | 36 | #define USB_CDC_NCM_PROTO_NTB 1
|
| 37 | +#define USB_CDC_MBIM_PROTO_NTB 2 |
36 | 38 |
|
37 | 39 | /*-------------------------------------------------------------------------*/
|
38 | 40 |
|
|
53 | 55 | #define USB_CDC_DMM_TYPE 0x14
|
54 | 56 | #define USB_CDC_OBEX_TYPE 0x15
|
55 | 57 | #define USB_CDC_NCM_TYPE 0x1a
|
| 58 | +#define USB_CDC_MBIM_TYPE 0x1b |
56 | 59 |
|
57 | 60 | /* "Header Functional Descriptor" from CDC spec 5.2.3.1 */
|
58 | 61 | struct usb_cdc_header_desc {
|
@@ -187,6 +190,21 @@ struct usb_cdc_ncm_desc {
|
187 | 190 | __le16 bcdNcmVersion;
|
188 | 191 | __u8 bmNetworkCapabilities;
|
189 | 192 | } __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 | + |
190 | 208 | /*-------------------------------------------------------------------------*/
|
191 | 209 |
|
192 | 210 | /*
|
@@ -332,6 +350,11 @@ struct usb_cdc_ncm_nth32 {
|
332 | 350 | #define USB_CDC_NCM_NDP32_CRC_SIGN 0x316D636E /* ncm1 */
|
333 | 351 | #define USB_CDC_NCM_NDP32_NOCRC_SIGN 0x306D636E /* ncm0 */
|
334 | 352 |
|
| 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 | + |
335 | 358 | /* 16-bit NCM Datagram Pointer Entry */
|
336 | 359 | struct usb_cdc_ncm_dpe16 {
|
337 | 360 | __le16 wDatagramIndex;
|
|
0 commit comments