wwanX vs usbX



Hello,

is it so that ModemManager/NetworkManager require wwanX names for all 3G
etc modem network interfaces?  If so, then I guess we have to add a new
Huawei entry to cdc_ncm now that they have started using proper CDC NCM
class codes.  From
http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=3&t=1322 :

    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass     13
      bInterfaceProtocol      0
      iInterface              0
      CDC Header:
        bcdCDC               1.10
      UNRECOGNIZED CDC:  06 24 1a 00 01 1f
      CDC Ethernet:
        iMacAddress                      3 582C80139263
        bmEthernetStatistics    0x00000005
        wMaxSegmentSize               1514
        wNumberMCFilters            0x0003
        bNumberPowerFilters              1
      CDC Union:
        bMasterInterface        2
        bSlaveInterface         2
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               5


Putting naming policy in the kernel like this quite appalling, IMHO.
Having device and vendor specific entries in the cdc_ncm and cdc_ether
class drivers just because we need different kernel device names is
completely unnecessary.

I see the need to detect whether a device needs an external management
channel or not. But this could have been handled much more elegantly by
using the same logic MM applies when collecting all modem ports: If we
find an associated management channel (AT serial port, QMI /dev/cdc-wdmX,
MBIM /dev/cdc-wdmX or whatever), then this channel will manage the
network device regardless of whether the name is usbX, ethX, wwanX or
something else.  If there is no management channel then we can just as
well assume that the device works without management.

The current scheme is bad for several reasons:
- requires otherwise unnecessary vendor/device specific entries in class
  drivers,
- vendor entries may erronously name non-managed devices as wwanX if the
  same vendor makes both types of devices,
- adding device specific entries will always lag behind compared to
  class entries,
- policies should be set in userspace

Just my € .02


Bjørn





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]