Re: wwanX vs usbX
- From: Marcel Holtmann <marcel holtmann org>
- To: Bjørn Mork <bjorn mork no>
- Cc: networkmanager-list gnome org
- Subject: Re: wwanX vs usbX
- Date: Tue, 26 Feb 2013 07:12:00 -0800
Hi Bjorn,
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.
that is what we have the DEVTYPE=wwan value in the uevent sysfs entry
for. That is the one that needs to have the right value.
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
Matching by network interface names is a really bad idea. That is why I
added DEVTYPE support for WWAN, Wireless LAN, Bluetooth and WiMAX way
back then.
You also forget the simple fact that network interfaces can be just
renamed. And newer systemd version will do exactly that to achieve some
sort of persistent naming.
Regards
Marcel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]