Dan Williams <d...@redhat.com> writes:

> Drivers are stupid,

They don't *have* to be, you know :)

I did wonder if we should make the usbnet framework reject such
addresses after seeing this a while ago:

    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass     13 
      bInterfaceProtocol      0 
      iInterface              5 Sierra Wireless EM7345 4G LTE (NCM)
      CDC Header:
        bcdCDC               1.20
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1 
      CDC NCM:
        bcdNcmVersion        1.00
        bmNetworkCapabilities 0x00
      CDC Ethernet:
        iMacAddress                      6 FFFFFFFFFFFF
        bmEthernetStatistics    0x00000000
        wMaxSegmentSize               1514
        wNumberMCFilters            0x0000
        bNumberPowerFilters              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               4


but I ended up letting it be, considering that if the vendor meant this
to work then they would probably have provided a more useful address...

Note that this address is an USB string descriptor served to us by the
firmware, so it's not like we're reading some uninitialized register
here.  Directly at least - the problem can of course be that the
firmware translates some uninitialized register into a string with no
sanity checking.

Anyway, just thought I'd mention this example in case you are in favour
of letting the driver fix this up.  We can do that, if smarter drivers
are on the wishlist :)


Bjørn
_______________________________________________
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to