]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commitdiff
cdc_ncm: Modify NCM network interface.
authorBH Hsieh <bhsieh@nvidia.com>
Wed, 18 Jan 2012 05:10:14 +0000 (13:10 +0800)
committerDan Willemsen <dwillemsen@nvidia.com>
Wed, 18 Mar 2015 19:25:39 +0000 (12:25 -0700)
Adding FLAG_RMNET to change ncm net device name
for Ericsson modem.

Bug 901367

Change-Id: I4a029cc10a02176035319ed4ac1e7b9af349cbd1
Reviewed-on: http://git-master/r/74912
Reviewed-by: WK Tsai <wtsai@nvidia.com>
Reviewed-by: Steve Lin <stlin@nvidia.com>
Signed-off-by: BH Hsieh <bhsieh@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/76459
Reviewed-by: Automatic_Commit_Validation_User
Rebase-Id: R4fb64027673d2187118d778ec25caca209894e65

drivers/net/usb/cdc_ncm.c
drivers/net/usb/usbnet.c
include/linux/usb/usbnet.h

index 80a844e0ae0383303d8fa4a6d4147fc99337f268..d8ee9aa989f28f2ea69e7c28afbef963ce9c24fd 100644 (file)
@@ -1519,7 +1519,7 @@ static const struct driver_info cdc_ncm_info = {
 static const struct driver_info wwan_info = {
        .description = "Mobile Broadband Network Device",
        .flags = FLAG_POINTTOPOINT | FLAG_NO_SETINT | FLAG_MULTI_PACKET
-                       | FLAG_WWAN,
+                       | FLAG_WWAN | FLAG_RMNET,
        .bind = cdc_ncm_bind,
        .unbind = cdc_ncm_unbind,
        .manage_power = usbnet_manage_power,
index 3a6770a65d7836ace177cff2bb45c925b474a84a..85881762077c33e1910f16dbd3253bc47f9763c2 100644 (file)
@@ -1664,6 +1664,9 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
                /* WWAN devices should always be named "wwan%d" */
                if ((dev->driver_info->flags & FLAG_WWAN) != 0)
                        strcpy(net->name, "wwan%d");
+               /* RMNET devices should always be named "rmnet%d" */
+               if ((dev->driver_info->flags & FLAG_RMNET) != 0)
+                       strcpy(net->name, "rmnet%d");
 
                /* devices that cannot do ARP */
                if ((dev->driver_info->flags & FLAG_NOARP) != 0)
index d9a4905e01d0c98b88e89c7db5c85bbf7d5be8a1..a58b54b409c577e413e9d96091249667301fe7b8 100644 (file)
@@ -108,7 +108,7 @@ struct driver_info {
 
 #define FLAG_LINK_INTR 0x0800          /* updates link (carrier) status */
 
-#define FLAG_POINTTOPOINT 0x1000       /* possibly use "usb%d" names */
+#define FLAG_POINTTOPOINT      0x1000  /* possibly use "usb%d" names */
 
 /*
  * Indicates to usbnet, that USB driver accumulates multiple IP packets.
@@ -117,6 +117,7 @@ struct driver_info {
 #define FLAG_MULTI_PACKET      0x2000
 #define FLAG_RX_ASSEMBLE       0x4000  /* rx packets may span >1 frames */
 #define FLAG_NOARP             0x8000  /* device can't do ARP */
+#define FLAG_RMNET             0x10000 /* use "rmnet%d" names */
 
        /* init device ... can sleep, or cause probe() failure */
        int     (*bind)(struct usbnet *, struct usb_interface *);