Re: wwanX vs usbX



On Tue, 2013-02-26 at 12:54 +0100, Bjørn Mork wrote:
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 :

Nothing should care what the device name is, because device names aren't
reliable and can certainly change.  For ModemManager the plugins take
care of making sure that they claim the network interface associated
with the serial/qmi/mbim/etc ports.

NetworkManager needs to know what the DEVTYPE is so that it doesn't try
to control a WWAN device as a plain ethernet device when ModemManager
isn't running, because there's no functional difference between the two
when they're driven by cdc-ether, and a lot actually are.

We don't care about the DEVTYPE when ModemManager *is* running.  But it
becomes important when it *isn't* running because we don't have anything
to tell us that the net port has proprietary control channel.

Dan

    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



_______________________________________________
networkmanager-list mailing list
networkmanager-list gnome org
https://mail.gnome.org/mailman/listinfo/networkmanager-list




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