* [PATCH RESEND net-next V2 0/3] huawei_cdc_ncm introduction
@ 2013-08-22 2:30 ` Enrico Mioso
2013-08-22 2:30 ` [PATCH RESEND net-next V2 1/3] net: cdc_ncm: Export cdc_ncm_{tx,rx}_fixup functions for re-use Enrico Mioso
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Enrico Mioso @ 2013-08-22 2:30 UTC (permalink / raw)
To: gregkh, oliver, linux-usb, netdev, linux-kernel; +Cc: Enrico Mioso
These patches are all related to the new huawei_cdc_ncm driver, supporting
devices that use the NCM protocol as a transport layer for other protocols.
this is the case of the Huawei E3131 3G modem.
Thanks should go to bjorn and others who helped me with patience.
Enrico Mioso (3):
net: cdc_ncm: Export cdc_ncm_{tx,rx}_fixup functions for re-use
net: huawei_cdc_ncm: Introduce the
net: cdc_ncm: remove non-standard NCM device IDs
drivers/net/usb/Kconfig | 11 +++++++++++
drivers/net/usb/Makefile | 1 +
drivers/net/usb/cdc_ncm.c | 17 ++++-------------
include/linux/usb/cdc_ncm.h | 3 +++
4 files changed, 19 insertions(+), 13 deletions(-)
--
This version includes mainly cosmetic fixes related to patches.
1.7.10.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH RESEND net-next V2 1/3] net: cdc_ncm: Export cdc_ncm_{tx,rx}_fixup functions for re-use
2013-08-22 2:30 ` [PATCH RESEND net-next V2 0/3] huawei_cdc_ncm introduction Enrico Mioso
@ 2013-08-22 2:30 ` Enrico Mioso
2013-08-22 2:30 ` [PATCH RESEND net-next V2 2/3] net: huawei_cdc_ncm: Introduce the huawei_cdc_ncm driver Enrico Mioso
2013-08-22 2:30 ` [PATCH RESEND net-next V2 3/3] net: cdc_ncm: remove non-standard NCM device IDs Enrico Mioso
2 siblings, 0 replies; 5+ messages in thread
From: Enrico Mioso @ 2013-08-22 2:30 UTC (permalink / raw)
To: gregkh, oliver, linux-usb, netdev, linux-kernel; +Cc: Enrico Mioso
Some drivers implementing NCM-like protocols, may re-use those functions, as is
the case in the huawei_cdc_ncm driver.
Export them via EXPORT_SYMBOL_GPL, in accordance with how other functions have
been exported.
Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
---
drivers/net/usb/cdc_ncm.c | 6 ++++--
include/linux/usb/cdc_ncm.h | 3 +++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 43afde8..62686be 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -858,7 +858,7 @@ static void cdc_ncm_txpath_bh(unsigned long param)
}
}
-static struct sk_buff *
+struct sk_buff *
cdc_ncm_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags)
{
struct sk_buff *skb_out;
@@ -885,6 +885,7 @@ error:
return NULL;
}
+EXPORT_SYMBOL_GPL(cdc_ncm_tx_fixup);
/* verify NTB header and return offset of first NDP, or negative error */
int cdc_ncm_rx_verify_nth16(struct cdc_ncm_ctx *ctx, struct sk_buff *skb_in)
@@ -965,7 +966,7 @@ error:
}
EXPORT_SYMBOL_GPL(cdc_ncm_rx_verify_ndp16);
-static int cdc_ncm_rx_fixup(struct usbnet *dev, struct sk_buff *skb_in)
+int cdc_ncm_rx_fixup(struct usbnet *dev, struct sk_buff *skb_in)
{
struct sk_buff *skb;
struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0];
@@ -1040,6 +1041,7 @@ err_ndp:
error:
return 0;
}
+EXPORT_SYMBOL_GPL(cdc_ncm_rx_fixup);
static void
cdc_ncm_speed_change(struct cdc_ncm_ctx *ctx,
diff --git a/include/linux/usb/cdc_ncm.h b/include/linux/usb/cdc_ncm.h
index cc25b70..163244b 100644
--- a/include/linux/usb/cdc_ncm.h
+++ b/include/linux/usb/cdc_ncm.h
@@ -133,3 +133,6 @@ extern void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf);
extern struct sk_buff *cdc_ncm_fill_tx_frame(struct cdc_ncm_ctx *ctx, struct sk_buff *skb, __le32 sign);
extern int cdc_ncm_rx_verify_nth16(struct cdc_ncm_ctx *ctx, struct sk_buff *skb_in);
extern int cdc_ncm_rx_verify_ndp16(struct sk_buff *skb_in, int ndpoffset);
+struct sk_buff *
+cdc_ncm_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags);
+int cdc_ncm_rx_fixup(struct usbnet *dev, struct sk_buff *skb_in);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH RESEND net-next V2 2/3] net: huawei_cdc_ncm: Introduce the huawei_cdc_ncm driver
2013-08-22 2:30 ` [PATCH RESEND net-next V2 0/3] huawei_cdc_ncm introduction Enrico Mioso
2013-08-22 2:30 ` [PATCH RESEND net-next V2 1/3] net: cdc_ncm: Export cdc_ncm_{tx,rx}_fixup functions for re-use Enrico Mioso
@ 2013-08-22 2:30 ` Enrico Mioso
[not found] ` <1377138641-2765-3-git-send-email-mrkiko.rs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-08-22 2:30 ` [PATCH RESEND net-next V2 3/3] net: cdc_ncm: remove non-standard NCM device IDs Enrico Mioso
2 siblings, 1 reply; 5+ messages in thread
From: Enrico Mioso @ 2013-08-22 2:30 UTC (permalink / raw)
To: gregkh, oliver, linux-usb, netdev, linux-kernel; +Cc: Enrico Mioso
This driver supports devices using the NCM protocol as an encapsulation layer
for other protocols, like the E3131 Huawei 3G modem. This driver was heavily inspired by the qmi_wwan approach & code model.
Suggested-by: Bjorn Mork <bjorn@mork.no>
Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
---
drivers/net/usb/Kconfig | 11 +++++++++++
drivers/net/usb/Makefile | 1 +
2 files changed, 12 insertions(+)
diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig
index d84bfd4..6e56751 100644
--- a/drivers/net/usb/Kconfig
+++ b/drivers/net/usb/Kconfig
@@ -242,6 +242,17 @@ config USB_NET_CDC_NCM
* ST-Ericsson M343 HSPA Mobile Broadband Modem (reference design)
* Ericsson F5521gw Mobile Broadband Module
+config USB_NET_HUAWEI_CDC_NCM
+ tristate "Huawei-style CDC NCM support"
+ depends on USB_USBNET
+ select USB_WDM
+ select USB_NET_CDC_NCM
+ help
+ This driver aims to support huawei-style NCM devices, that use ncm as a
+ transport for other protocols.
+ To compile this driver as a module, choose M here: the module will be
+ called huawei_cdc_ncm.
+
config USB_NET_CDC_MBIM
tristate "CDC MBIM support"
depends on USB_USBNET
diff --git a/drivers/net/usb/Makefile b/drivers/net/usb/Makefile
index e817178..fd0e6a7 100644
--- a/drivers/net/usb/Makefile
+++ b/drivers/net/usb/Makefile
@@ -31,6 +31,7 @@ obj-$(CONFIG_USB_IPHETH) += ipheth.o
obj-$(CONFIG_USB_SIERRA_NET) += sierra_net.o
obj-$(CONFIG_USB_NET_CX82310_ETH) += cx82310_eth.o
obj-$(CONFIG_USB_NET_CDC_NCM) += cdc_ncm.o
+obj-$(CONFIG_USB_NET_HUAWEI_CDC_NCM) += huawei_cdc_ncm.o
obj-$(CONFIG_USB_VL600) += lg-vl600.o
obj-$(CONFIG_USB_NET_QMI_WWAN) += qmi_wwan.o
obj-$(CONFIG_USB_NET_CDC_MBIM) += cdc_mbim.o
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH RESEND net-next V2 3/3] net: cdc_ncm: remove non-standard NCM device IDs
2013-08-22 2:30 ` [PATCH RESEND net-next V2 0/3] huawei_cdc_ncm introduction Enrico Mioso
2013-08-22 2:30 ` [PATCH RESEND net-next V2 1/3] net: cdc_ncm: Export cdc_ncm_{tx,rx}_fixup functions for re-use Enrico Mioso
2013-08-22 2:30 ` [PATCH RESEND net-next V2 2/3] net: huawei_cdc_ncm: Introduce the huawei_cdc_ncm driver Enrico Mioso
@ 2013-08-22 2:30 ` Enrico Mioso
2 siblings, 0 replies; 5+ messages in thread
From: Enrico Mioso @ 2013-08-22 2:30 UTC (permalink / raw)
To: gregkh, oliver, linux-usb, netdev, linux-kernel; +Cc: Enrico Mioso
Remove device IDs of NCM-like (but not NCM-conformant) devices, that are
handled by the huawwei_cdc_ncm driver now.
Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
---
drivers/net/usb/cdc_ncm.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 62686be..31f43f7 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -1236,17 +1236,6 @@ static const struct usb_device_id cdc_devs[] = {
.driver_info = (unsigned long)&wwan_info,
},
- /* Huawei NCM devices disguised as vendor specific */
- { USB_VENDOR_AND_INTERFACE_INFO(0x12d1, 0xff, 0x02, 0x16),
- .driver_info = (unsigned long)&wwan_info,
- },
- { USB_VENDOR_AND_INTERFACE_INFO(0x12d1, 0xff, 0x02, 0x46),
- .driver_info = (unsigned long)&wwan_info,
- },
- { USB_VENDOR_AND_INTERFACE_INFO(0x12d1, 0xff, 0x02, 0x76),
- .driver_info = (unsigned long)&wwan_info,
- },
-
/* Infineon(now Intel) HSPA Modem platform */
{ USB_DEVICE_AND_INTERFACE_INFO(0x1519, 0x0443,
USB_CLASS_COMM,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH RESEND net-next V2 2/3] net: huawei_cdc_ncm: Introduce the huawei_cdc_ncm driver
[not found] ` <1377138641-2765-3-git-send-email-mrkiko.rs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2013-08-22 2:56 ` Greg KH
0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2013-08-22 2:56 UTC (permalink / raw)
To: Enrico Mioso
Cc: oliver-GvhC2dPhHPQdnm+yROfE0A, linux-usb-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On Thu, Aug 22, 2013 at 04:30:40AM +0200, Enrico Mioso wrote:
> This driver supports devices using the NCM protocol as an encapsulation layer
> for other protocols, like the E3131 Huawei 3G modem. This driver was heavily inspired by the qmi_wwan approach & code model.
Line-wrap your changelog lines?
>
> Suggested-by: Bjorn Mork <bjorn-yOkvZcmFvRU@public.gmane.org>
> Signed-off-by: Enrico Mioso <mrkiko.rs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> drivers/net/usb/Kconfig | 11 +++++++++++
> drivers/net/usb/Makefile | 1 +
> 2 files changed, 12 insertions(+)
I think you forgot to add the driver to the patch :(
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-08-22 2:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mrkiko.rs@gmail.com>
2013-08-22 2:30 ` [PATCH RESEND net-next V2 0/3] huawei_cdc_ncm introduction Enrico Mioso
2013-08-22 2:30 ` [PATCH RESEND net-next V2 1/3] net: cdc_ncm: Export cdc_ncm_{tx,rx}_fixup functions for re-use Enrico Mioso
2013-08-22 2:30 ` [PATCH RESEND net-next V2 2/3] net: huawei_cdc_ncm: Introduce the huawei_cdc_ncm driver Enrico Mioso
[not found] ` <1377138641-2765-3-git-send-email-mrkiko.rs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-08-22 2:56 ` Greg KH
2013-08-22 2:30 ` [PATCH RESEND net-next V2 3/3] net: cdc_ncm: remove non-standard NCM device IDs Enrico Mioso
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).