<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/net/usb/huawei_cdc_ncm.c, branch linux-4.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.3.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.3.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2015-07-09T21:58:31Z</updated>
<entry>
<title>cdc_ncm: Add support for moving NDP to end of NCM frame</title>
<updated>2015-07-09T21:58:31Z</updated>
<author>
<name>Enrico Mioso</name>
<email>mrkiko.rs@gmail.com</email>
</author>
<published>2015-07-08T11:05:57Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4a0e3e989d66bb7204b163d9cfaa7fa96d0f2023'/>
<id>urn:sha1:4a0e3e989d66bb7204b163d9cfaa7fa96d0f2023</id>
<content type='text'>
NCM specs are not actually mandating a specific position in the frame for
the NDP (Network Datagram Pointer). However, some Huawei devices will
ignore our aggregates if it is not placed after the datagrams it points
to. Add support for doing just this, in a per-device configurable way.
While at it, update NCM subdrivers, disabling this functionality in all of
them, except in huawei_cdc_ncm where it is enabled instead.
We aren't making any distinction between different Huawei NCM devices,
based on what the vendor driver does. Standard NCM devices are left
unaffected: if they are compliant, they should be always usable, still
stay on the safe side.

This change has been tested and working with a Huawei E3131 device (which
works regardless of NDP position), a Huawei E3531 (also working both
ways) and an E3372 (which mandates NDP to be after indexed datagrams).

V1-&gt;V2:
- corrected wrong NDP acronym definition
- fixed possible NULL pointer dereference
- patch cleanup
V2-&gt;V3:
- Properly account for the NDP size when writing new packets to SKB

Signed-off-by: Enrico Mioso &lt;mrkiko.rs@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: huawei_cdc_ncm: add "subclass 3" devices</title>
<updated>2014-07-17T23:49:50Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2014-07-17T11:34:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c2a6c7813f1ffae636e369b5d7011c9f518d3cd9'/>
<id>urn:sha1:c2a6c7813f1ffae636e369b5d7011c9f518d3cd9</id>
<content type='text'>
Huawei's usage of the subclass and protocol fields is not 100%
clear to us, but there appears to be a very strict system.

A device with the "shared" device ID 12d1:1506 and this NCM
function was recently reported (showing only default altsetting):

    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      3
      bInterfaceProtocol     22
      iInterface              8 CDC Network Control Model (NCM)
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  06 24 1a 00 01 1f
      ** UNRECOGNIZED:  0c 24 1b 00 01 00 04 10 14 dc 05 20
      ** UNRECOGNIZED:  0d 24 0f 0a 0f 00 00 00 ea 05 03 00 01
      ** UNRECOGNIZED:  05 24 06 01 01
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               9

Cc: Enrico Mioso &lt;mrkiko.rs@gmail.com&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: huawei_cdc_ncm: increase command buffer size</title>
<updated>2014-06-22T02:33:17Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2014-06-18T12:21:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3acc74619b0175b7a154cf8dc54813f6faf97aa9'/>
<id>urn:sha1:3acc74619b0175b7a154cf8dc54813f6faf97aa9</id>
<content type='text'>
Messages from the modem exceeding 256 bytes cause communication
failure.

The WDM protocol is strictly "read on demand", meaning that we only
poll for unread data after receiving a notification from the modem.
Since we have no way to know how much data the modem has to send,
we must make sure that the buffer we provide is "big enough".
Message truncation does not work. Truncated messages are left unread
until the modem has another message to send.  Which often won't
happen until the userspace application has given up waiting for the
final part of the last message, and therefore sends another command.

With a proper CDC WDM function there is a descriptor telling us
which buffer size the modem uses. But with this vendor specific
implementation there is no known way to calculate the exact "big
enough" number.  It is an unknown property of the modem firmware.
Experience has shown that 256 is too small.  The discussion of
this failure ended up concluding that 512 might be too small as
well. So 1024 seems like a reasonable value for now.

Fixes: 41c47d8cfd68 ("net: huawei_cdc_ncm: Introduce the huawei_cdc_ncm driver")
Cc: Enrico Mioso &lt;mrkiko.rs@gmail.com&gt;
Reported-by: Dan Williams &lt;dcbw@redhat.com&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Acked-By: Enrico Mioso &lt;mrkiko.rs@gmail.com&gt;
Tested-by: Dan Williams &lt;dcbw@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: cdc_ncm: remove redundant "disconnected" flag</title>
<updated>2014-05-17T02:39:02Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2014-05-16T19:48:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fa83dbeee55865678025b6c1637ca08860209f87'/>
<id>urn:sha1:fa83dbeee55865678025b6c1637ca08860209f87</id>
<content type='text'>
Calling netif_carrier_{on,off} is sufficient.  There is no need
to duplicate the carrier state in a driver specific flag.

Acked-by: Enrico Mioso &lt;mrkiko.rs@gmail.com&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: huawei_cdc_ncm: Introduce the huawei_cdc_ncm driver</title>
<updated>2013-11-05T20:21:25Z</updated>
<author>
<name>Enrico Mioso</name>
<email>mrkiko.rs@gmail.com</email>
</author>
<published>2013-11-04T08:50:48Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=41c47d8cfd685cae6b08f9300fef12e602609b26'/>
<id>urn:sha1:41c47d8cfd685cae6b08f9300fef12e602609b26</id>
<content type='text'>
This driver supports devices using the NCM protocol as an encapsulation layer
for other protocols, like the E3131 Huawei 3G modem. This drivers approach was
heavily inspired by the qmi_wwan/cdc_mbim approach &amp; code model.

Signed-off-by: Enrico Mioso &lt;mrkiko.rs@gmail.com&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
