diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-10-02 01:15:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-05 03:43:33 -0400 |
commit | e1e499eef2200c2a7120c9ebf297d48b195cf887 (patch) | |
tree | e05c21cbd039f5f922087074b68a7d2cd8d75bb6 /drivers/net/usb | |
parent | 0bfbedb14a8a96c529341bec88991a92b41fac72 (diff) |
usbnet: Use wwan%d interface name for mobile broadband devices
Add support for usbnet based devices like CDC-Ether to indicate that they
are actually mobile broadband devices. In that case use wwan%d as default
interface name.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/cdc_ether.c | 20 | ||||
-rw-r--r-- | drivers/net/usb/usbnet.c | 3 |
2 files changed, 17 insertions, 6 deletions
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index 4a6aff579403..71e65fc10e6f 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c | |||
@@ -420,6 +420,14 @@ static const struct driver_info cdc_info = { | |||
420 | .status = cdc_status, | 420 | .status = cdc_status, |
421 | }; | 421 | }; |
422 | 422 | ||
423 | static const struct driver_info mbm_info = { | ||
424 | .description = "Mobile Broadband Network Device", | ||
425 | .flags = FLAG_WWAN, | ||
426 | .bind = cdc_bind, | ||
427 | .unbind = usbnet_cdc_unbind, | ||
428 | .status = cdc_status, | ||
429 | }; | ||
430 | |||
423 | /*-------------------------------------------------------------------------*/ | 431 | /*-------------------------------------------------------------------------*/ |
424 | 432 | ||
425 | 433 | ||
@@ -532,32 +540,32 @@ static const struct usb_device_id products [] = { | |||
532 | /* Ericsson F3507g */ | 540 | /* Ericsson F3507g */ |
533 | USB_DEVICE_AND_INTERFACE_INFO(0x0bdb, 0x1900, USB_CLASS_COMM, | 541 | USB_DEVICE_AND_INTERFACE_INFO(0x0bdb, 0x1900, USB_CLASS_COMM, |
534 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), | 542 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), |
535 | .driver_info = (unsigned long) &cdc_info, | 543 | .driver_info = (unsigned long) &mbm_info, |
536 | }, { | 544 | }, { |
537 | /* Ericsson F3507g ver. 2 */ | 545 | /* Ericsson F3507g ver. 2 */ |
538 | USB_DEVICE_AND_INTERFACE_INFO(0x0bdb, 0x1902, USB_CLASS_COMM, | 546 | USB_DEVICE_AND_INTERFACE_INFO(0x0bdb, 0x1902, USB_CLASS_COMM, |
539 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), | 547 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), |
540 | .driver_info = (unsigned long) &cdc_info, | 548 | .driver_info = (unsigned long) &mbm_info, |
541 | }, { | 549 | }, { |
542 | /* Ericsson F3607gw */ | 550 | /* Ericsson F3607gw */ |
543 | USB_DEVICE_AND_INTERFACE_INFO(0x0bdb, 0x1904, USB_CLASS_COMM, | 551 | USB_DEVICE_AND_INTERFACE_INFO(0x0bdb, 0x1904, USB_CLASS_COMM, |
544 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), | 552 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), |
545 | .driver_info = (unsigned long) &cdc_info, | 553 | .driver_info = (unsigned long) &mbm_info, |
546 | }, { | 554 | }, { |
547 | /* Ericsson F3307 */ | 555 | /* Ericsson F3307 */ |
548 | USB_DEVICE_AND_INTERFACE_INFO(0x0bdb, 0x1906, USB_CLASS_COMM, | 556 | USB_DEVICE_AND_INTERFACE_INFO(0x0bdb, 0x1906, USB_CLASS_COMM, |
549 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), | 557 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), |
550 | .driver_info = (unsigned long) &cdc_info, | 558 | .driver_info = (unsigned long) &mbm_info, |
551 | }, { | 559 | }, { |
552 | /* Toshiba F3507g */ | 560 | /* Toshiba F3507g */ |
553 | USB_DEVICE_AND_INTERFACE_INFO(0x0930, 0x130b, USB_CLASS_COMM, | 561 | USB_DEVICE_AND_INTERFACE_INFO(0x0930, 0x130b, USB_CLASS_COMM, |
554 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), | 562 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), |
555 | .driver_info = (unsigned long) &cdc_info, | 563 | .driver_info = (unsigned long) &mbm_info, |
556 | }, { | 564 | }, { |
557 | /* Dell F3507g */ | 565 | /* Dell F3507g */ |
558 | USB_DEVICE_AND_INTERFACE_INFO(0x413c, 0x8147, USB_CLASS_COMM, | 566 | USB_DEVICE_AND_INTERFACE_INFO(0x413c, 0x8147, USB_CLASS_COMM, |
559 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), | 567 | USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), |
560 | .driver_info = (unsigned long) &cdc_info, | 568 | .driver_info = (unsigned long) &mbm_info, |
561 | }, | 569 | }, |
562 | { }, // END | 570 | { }, // END |
563 | }; | 571 | }; |
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index ca5ca5ae061d..8124cf16259f 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
@@ -1295,6 +1295,9 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) | |||
1295 | /* WLAN devices should always be named "wlan%d" */ | 1295 | /* WLAN devices should always be named "wlan%d" */ |
1296 | if ((dev->driver_info->flags & FLAG_WLAN) != 0) | 1296 | if ((dev->driver_info->flags & FLAG_WLAN) != 0) |
1297 | strcpy(net->name, "wlan%d"); | 1297 | strcpy(net->name, "wlan%d"); |
1298 | /* WWAN devices should always be named "wwan%d" */ | ||
1299 | if ((dev->driver_info->flags & FLAG_WWAN) != 0) | ||
1300 | strcpy(net->name, "wwan%d"); | ||
1298 | 1301 | ||
1299 | /* maybe the remote can't receive an Ethernet MTU */ | 1302 | /* maybe the remote can't receive an Ethernet MTU */ |
1300 | if (net->mtu > (dev->hard_mtu - net->hard_header_len)) | 1303 | if (net->mtu > (dev->hard_mtu - net->hard_header_len)) |