--- cdc-acm.h.orig 2011-10-16 14:25:07.888670601 +0900 +++ cdc-acm.h 2011-10-16 14:25:26.620670761 +0900 @@ -6,6 +6,34 @@ * */ +#define FOMA_SPECIFIC_INTERFACE 0x44 +#define USB_CDC_SUBCLASS_ACM_FOMA (0x88) + +#define FOMA_BTYPE_AB_1 (0x01) +#define FOMA_BTYPE_AB_2 (0x02) +#define FOMA_BTYPE_AB_5 (0x05) +#define FOMA_BTYPE_AB_6 (0x06) + +#define FOMA_BMODE_DEACTIVATED (0x00) +#define FOMA_BMODE_MODEM (0x01) +#define FOMA_BMODE_AT_COMMAND_CONTROL (0x02) +#define FOMA_BMODE_OBEX (0x60) +#define FOMA_BMODE_VENDOR1 (0xc0) +#define FOMA_BMODE_VENDOR2 (0xfe) +#define FOMA_BMODE_UNLINKED (0xFF) + +#define USB_RT_VENDORSPEC (0x41) +#define USB_REQ_ACTIVATE_MODE (0x60) +#define USB_REQ_SET_LINK (0x62) +#define USB_REQ_CLEAR_LINK (0x63) + +#define USB_DEVICE_FOMA(vend,cl,sc,pr) \ + .match_flags = 0x0381,\ + .idVendor = (vend),\ + .bInterfaceClass = (cl), \ + .bInterfaceSubClass = (sc),\ + .bInterfaceProtocol = (pr) + /* * CMSPAR, some architectures can't have space and mark parity. */ @@ -130,6 +158,16 @@ struct acm_wb *delayed_wb; /* write queued for a device about to be woken */ }; +/* "Mobile Abstract Control Model Specificl Descriptor" from MCPC GL-005 */ +struct foma_function_desc { + __u8 bFunctionLength; + __u8 bDescriptorType; + __u8 bDescriptorSubType; + __u8 bType; + __u8 bMode_0; + /* ... and there could be more Modes */ +} __attribute__ ((packed)); + #define CDC_DATA_INTERFACE_TYPE 0x0a /* constants describing various quirks and errors */