netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Bjørn Mork" <bjorn@mork.no>
To: netdev@vger.kernel.org
Cc: linux-usb@vger.kernel.org, "Oliver Neukum" <oliver@neukum.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Alexey Orishko" <alexey.orishko@gmail.com>,
	"Greg Suarez" <gpsuarez2512@gmail.com>,
	"Fangxiaozhi (Franko)" <fangxiaozhi@huawei.com>,
	"Dan Williams" <dcbw@redhat.com>,
	"Aleksander Morgado" <aleksander@lanedo.com>,
	"Greg Suarez" <gsuarez@smithmicro.com>,
	"Bjørn Mork" <bjorn@mork.no>
Subject: [PATCH v2 net-next 02/13] USB: cdc: add MBIM constants and structures
Date: Mon, 22 Oct 2012 22:56:29 +0200	[thread overview]
Message-ID: <1350939400-27209-3-git-send-email-bjorn@mork.no> (raw)
In-Reply-To: <1350939400-27209-1-git-send-email-bjorn@mork.no>

From: Greg Suarez <gsuarez@smithmicro.com>

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 <gsuarez@smithmicro.com>
[bmork: added DSS defines]
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 include/linux/usb/cdc.h |   23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h
index 81a9279..f35aa0a 100644
--- a/include/linux/usb/cdc.h
+++ b/include/linux/usb/cdc.h
@@ -19,6 +19,7 @@
 #define USB_CDC_SUBCLASS_OBEX			0x0b
 #define USB_CDC_SUBCLASS_EEM			0x0c
 #define USB_CDC_SUBCLASS_NCM			0x0d
+#define USB_CDC_SUBCLASS_MBIM			0x0e
 
 #define USB_CDC_PROTO_NONE			0
 
@@ -33,6 +34,7 @@
 #define USB_CDC_PROTO_EEM			7
 
 #define USB_CDC_NCM_PROTO_NTB			1
+#define USB_CDC_MBIM_PROTO_NTB			2
 
 /*-------------------------------------------------------------------------*/
 
@@ -53,6 +55,7 @@
 #define USB_CDC_DMM_TYPE		0x14
 #define USB_CDC_OBEX_TYPE		0x15
 #define USB_CDC_NCM_TYPE		0x1a
+#define USB_CDC_MBIM_TYPE		0x1b
 
 /* "Header Functional Descriptor" from CDC spec  5.2.3.1 */
 struct usb_cdc_header_desc {
@@ -187,6 +190,21 @@ struct usb_cdc_ncm_desc {
 	__le16	bcdNcmVersion;
 	__u8	bmNetworkCapabilities;
 } __attribute__ ((packed));
+
+/* "MBIM Control Model Functional Descriptor" */
+struct usb_cdc_mbim_desc {
+	__u8	bLength;
+	__u8	bDescriptorType;
+	__u8	bDescriptorSubType;
+
+	__le16	bcdMBIMVersion;
+	__le16  wMaxControlMessage;
+	__u8    bNumberFilters;
+	__u8    bMaxFilterSize;
+	__le16  wMaxSegmentSize;
+	__u8    bmNetworkCapabilities;
+} __attribute__ ((packed));
+
 /*-------------------------------------------------------------------------*/
 
 /*
@@ -332,6 +350,11 @@ struct usb_cdc_ncm_nth32 {
 #define USB_CDC_NCM_NDP32_CRC_SIGN	0x316D636E /* ncm1 */
 #define USB_CDC_NCM_NDP32_NOCRC_SIGN	0x306D636E /* ncm0 */
 
+#define USB_CDC_MBIM_NDP16_IPS_SIGN     0x00535049 /* IPS<sessionID> : IPS0 for now */
+#define USB_CDC_MBIM_NDP32_IPS_SIGN     0x00737069 /* ips<sessionID> : ips0 for now */
+#define USB_CDC_MBIM_NDP16_DSS_SIGN     0x00535344 /* DSS<sessionID> */
+#define USB_CDC_MBIM_NDP32_DSS_SIGN     0x00737364 /* dss<sessionID> */
+
 /* 16-bit NCM Datagram Pointer Entry */
 struct usb_cdc_ncm_dpe16 {
 	__le16	wDatagramIndex;
-- 
1.7.10.4

  parent reply	other threads:[~2012-10-22 20:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-22 20:56 [PATCH v2 net-next 00/13] Adding a USB CDC MBIM driver Bjørn Mork
     [not found] ` <1350939400-27209-1-git-send-email-bjorn-yOkvZcmFvRU@public.gmane.org>
2012-10-22 20:56   ` [PATCH v2 net-next 01/13] net: cdc_ncm: workaround NTB input size firmware bug Bjørn Mork
2012-10-22 20:56   ` [PATCH v2 net-next 04/13] net: cdc_ncm: refactor bind preparing for MBIM support Bjørn Mork
2012-10-22 20:56   ` [PATCH v2 net-next 06/13] net: cdc_ncm: splitting rx_fixup for code reuse Bjørn Mork
2012-10-22 20:56   ` [PATCH v2 net-next 09/13] net: cdc_mbim: adding MBIM driver Bjørn Mork
2012-10-22 20:56   ` [PATCH v2 net-next 12/13] net: cdc_ncm: map MBIM IPS SessionID to VLAN ID Bjørn Mork
2012-10-22 20:56 ` Bjørn Mork [this message]
2012-10-22 20:56 ` [PATCH v2 net-next 03/13] net: cdc_ncm: adding MBIM support to ncm_setup Bjørn Mork
2012-10-22 20:56 ` [PATCH v2 net-next 05/13] net: cdc_ncm: process chained NDPs Bjørn Mork
2012-10-22 20:56 ` [PATCH v2 net-next 07/13] net: cdc_ncm: refactoring for tx multiplexing Bjørn Mork
2012-10-22 20:56 ` [PATCH v2 net-next 08/13] net: cdc_ncm: export shared symbols and definitions Bjørn Mork
2012-10-22 20:56 ` [PATCH v2 net-next 10/13] net: cdc_mbim: build the MBIM driver Bjørn Mork
2012-10-22 20:56 ` [PATCH v2 net-next 11/13] net: cdc_ncm: do not bind to NCM compatible MBIM devices Bjørn Mork
2012-10-22 20:56 ` [PATCH v2 net-next 13/13] net: cdc_mbim: Device Service Stream support Bjørn Mork
2012-10-23  6:41 ` [PATCH v2 net-next 00/13] Adding a USB CDC MBIM driver David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1350939400-27209-3-git-send-email-bjorn@mork.no \
    --to=bjorn@mork.no \
    --cc=aleksander@lanedo.com \
    --cc=alexey.orishko@gmail.com \
    --cc=dcbw@redhat.com \
    --cc=fangxiaozhi@huawei.com \
    --cc=gpsuarez2512@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gsuarez@smithmicro.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oliver@neukum.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).