#
9fea037d |
| 04-Nov-2013 |
Enrico Mioso <mrkiko.rs@gmail.com> |
net: cdc_ncm: remove non-standard NCM device IDs
Remove device IDs of NCM-like (but not NCM-conformant) devices, that are handled by the huawwei_cdc_ncm driver now.
Signed-off-by: Enrico Mioso <mrk
net: cdc_ncm: remove non-standard NCM device IDs
Remove device IDs of NCM-like (but not NCM-conformant) devices, that are handled by the huawwei_cdc_ncm driver now.
Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
2f69702c |
| 04-Nov-2013 |
Enrico Mioso <mrkiko.rs@gmail.com> |
net: cdc_ncm: Export cdc_ncm_{tx, rx}_fixup functions for re-use
Some drivers implementing NCM-like protocols, may re-use those functions, as is the case in the huawei_cdc_ncm driver. Export them vi
net: cdc_ncm: Export cdc_ncm_{tx, rx}_fixup functions for re-use
Some drivers implementing NCM-like protocols, may re-use those functions, as is the case in the huawei_cdc_ncm driver. Export them via EXPORT_SYMBOL_GPL, in accordance with how other functions have been exported.
Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v3.12 |
|
#
a6fe6708 |
| 01-Nov-2013 |
Bjørn Mork <bjorn@mork.no> |
net: cdc_ncm: no not set tx_max higher than the device supports
There are MBIM devices out there reporting
dwNtbInMaxSize=2048 dwNtbOutMaxSize=2048
and since the spec require a datagram max size
net: cdc_ncm: no not set tx_max higher than the device supports
There are MBIM devices out there reporting
dwNtbInMaxSize=2048 dwNtbOutMaxSize=2048
and since the spec require a datagram max size of at least 2048, this means that a full sized datagram will never fit.
Still, sending larger NTBs than the device supports is not going to help. We do not have any other options than either a) refusing to bindi, or b) respect the insanely low value.
Alternative b will at least make these devices work, so go for it.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
296e81f8 |
| 01-Nov-2013 |
Bjørn Mork <bjorn@mork.no> |
net: cdc_ncm: improve bind error debug messages
Make it a bit easier for users to figure out what goes wrong when bind fails.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork
net: cdc_ncm: improve bind error debug messages
Make it a bit easier for users to figure out what goes wrong when bind fails.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
59ede316 |
| 01-Nov-2013 |
Bjørn Mork <bjorn@mork.no> |
net: cdc_ncm: return proper error if setup fails
Most setup errors are ignored to ensure maximum firmware compatibilty. But GET_NTB_PARAMETERS and the functional descriptors are required. Use prop
net: cdc_ncm: return proper error if setup fails
Most setup errors are ignored to ensure maximum firmware compatibilty. But GET_NTB_PARAMETERS and the functional descriptors are required. Use proper error codes and log level if these fail.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
47175e5f |
| 01-Nov-2013 |
Bjørn Mork <bjorn@mork.no> |
net: cdc_ncm: refactoring cdc_ncm_setup
Rewriting the "set max datagram" part of dc_ncm_setup to separate the selection and validatation of the size from the code which optionally informs the device
net: cdc_ncm: refactoring cdc_ncm_setup
Rewriting the "set max datagram" part of dc_ncm_setup to separate the selection and validatation of the size from the code which optionally informs the device of this value. This ensures that we use the correct value regardless of device support for the get and set commands.
Removing some of the many indent levels while doing this to make the code more readable.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
986e10d6 |
| 01-Nov-2013 |
Bjørn Mork <bjorn@mork.no> |
net: cdc_ncm: endian convert constants instead of variables
Converting the constants used in these comparisons at build time instead of converting the variables for every received frame at run time.
net: cdc_ncm: endian convert constants instead of variables
Converting the constants used in these comparisons at build time instead of converting the variables for every received frame at run time.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
5448d75f |
| 01-Nov-2013 |
Bjørn Mork <bjorn@mork.no> |
net: cdc_ncm: log signatures in hex
These signatures are well known bit patterns, mostly made up of ascii characters. Mentally parsing works best if they are printed in hex.
Cc: Alexey Orishko <al
net: cdc_ncm: log signatures in hex
These signatures are well known bit patterns, mostly made up of ascii characters. Mentally parsing works best if they are printed in hex.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
ae223cd4 |
| 01-Nov-2013 |
Bjørn Mork <bjorn@mork.no> |
net: cdc_ncm: use netif_* and dev_* instead of pr_*
Take advantage of standard device name prefixing and netdevice msglvl control where possible.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signe
net: cdc_ncm: use netif_* and dev_* instead of pr_*
Take advantage of standard device name prefixing and netdevice msglvl control where possible.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
a26fd05d |
| 01-Nov-2013 |
Bjørn Mork <bjorn@mork.no> |
net: cdc_ncm: log the length we warn about
Fix cut'n'paste typo. Log the bogus length and not the irrelevant signature.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjo
net: cdc_ncm: log the length we warn about
Fix cut'n'paste typo. Log the bogus length and not the irrelevant signature.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
43c87f78 |
| 01-Nov-2013 |
Bjørn Mork <bjorn@mork.no> |
net: cdc_ncm: set correct dev->hard_mtu
usbnet use the hard_mtu value for sizing the tx queue and nothing else. We will be transmitting buffers of up to tx_max size, so that's the proper value to g
net: cdc_ncm: set correct dev->hard_mtu
usbnet use the hard_mtu value for sizing the tx queue and nothing else. We will be transmitting buffers of up to tx_max size, so that's the proper value to give usbnet.
The individual datagram size is completely irrelevant here.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
0e2c4a00 |
| 01-Nov-2013 |
Bjørn Mork <bjorn@mork.no> |
net: cdc_ncm: remove ethtool ops
No need to keep this code duplicated from usbnet.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Mi
net: cdc_ncm: remove ethtool ops
No need to keep this code duplicated from usbnet.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
085e50e1 |
| 01-Nov-2013 |
Bjørn Mork <bjorn@mork.no> |
net: cdc_ncm: remove probe and disconnect wrappers
These functions were merely wrappers around the usbnet variants. Remove them.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn
net: cdc_ncm: remove probe and disconnect wrappers
These functions were merely wrappers around the usbnet variants. Remove them.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
4d619f62 |
| 01-Nov-2013 |
Bjørn Mork <bjorn@mork.no> |
net: cdc_ncm: no point in filling up the NTBs if we send ZLPs
Padding NTBs to max size is part of the support for devices optimizing their DMA transfers. This optimization depends on max sized NTBs
net: cdc_ncm: no point in filling up the NTBs if we send ZLPs
Padding NTBs to max size is part of the support for devices optimizing their DMA transfers. This optimization depends on max sized NTBs not being ZLP terminated. So we are much better off dropping the padding if we are going to send a ZLP anyway.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
9fe0234c |
| 01-Nov-2013 |
Bjørn Mork <bjorn@mork.no> |
net: cdc_ncm: only the control intf can be probed
The probed interface must be the master/control interface of the function. Make this explicit and simplify redundant tests.
Cc: Alexey Orishko <al
net: cdc_ncm: only the control intf can be probed
The probed interface must be the master/control interface of the function. Make this explicit and simplify redundant tests.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
83292236 |
| 01-Nov-2013 |
Bjørn Mork <bjorn@mork.no> |
net: cdc_ncm: remove descriptor pointers
header_desc was completely unused and union_desc was never used outside cdc_ncm_bind_common.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bj
net: cdc_ncm: remove descriptor pointers
header_desc was completely unused and union_desc was never used outside cdc_ncm_bind_common.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
1b5287a7 |
| 01-Nov-2013 |
Bjørn Mork <bjorn@mork.no> |
net: cdc_ncm: fix SET_MAX_DATAGRAM_SIZE
We need to inform the device about the *new* value, not the old one.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no>
net: cdc_ncm: fix SET_MAX_DATAGRAM_SIZE
We need to inform the device about the *new* value, not the old one.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
6a9612e2 |
| 01-Nov-2013 |
Bjørn Mork <bjorn@mork.no> |
net: cdc_ncm: remove ncm_parm field
Moving the call to cdc_ncm_setup() after the endpoint setup removes the last remaining reference to ncm_parm outside cdc_ncm_setup.
Collecting all the ncm_parm b
net: cdc_ncm: remove ncm_parm field
Moving the call to cdc_ncm_setup() after the endpoint setup removes the last remaining reference to ncm_parm outside cdc_ncm_setup.
Collecting all the ncm_parm based calculations in cdc_ncm_setup improves readability.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
f3028c52 |
| 01-Nov-2013 |
Bjørn Mork <bjorn@mork.no> |
net: cdc_ncm: remove tx_speed and rx_speed fields
These fields are only used to prevent printing the same speeds multiple times if we receive multiple identical speed notifications.
The value of th
net: cdc_ncm: remove tx_speed and rx_speed fields
These fields are only used to prevent printing the same speeds multiple times if we receive multiple identical speed notifications.
The value of these printk's is questionable, and even more so when we filter out some of the notifications sent us by the firmware. If we are going to print any of these, then we should print them all.
Removing little used fields is a bonus.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
de5bee27 |
| 01-Nov-2013 |
Bjørn Mork <bjorn@mork.no> |
net: cdc_ncm: remove unused udev field
We already use the usbnet udev field everywhere this could have been used.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork
net: cdc_ncm: remove unused udev field
We already use the usbnet udev field everywhere this could have been used.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
bed6f762 |
| 01-Nov-2013 |
Bjørn Mork <bjorn@mork.no> |
net: cdc_ncm: remove redundant netdev field
Too many pointers back and forth are likely to confuse developers, creating subtle bugs whenever we forget to syncronize them all.
As a usbnet driver, we
net: cdc_ncm: remove redundant netdev field
Too many pointers back and forth are likely to confuse developers, creating subtle bugs whenever we forget to syncronize them all.
As a usbnet driver, we should stick with the standard struct usbnet fields as much as possible. The netdevice is one such field.
Cc: Greg Suarez <gsuarez@smithmicro.com> Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
ff1632aa |
| 01-Nov-2013 |
Bjørn Mork <bjorn@mork.no> |
net: cdc_ncm: remove redundant endpoint pointers
No need to duplicate stuff already in the common usbnet struct. We still need to keep our special find_endpoints function because we need explicit c
net: cdc_ncm: remove redundant endpoint pointers
No need to duplicate stuff already in the common usbnet struct. We still need to keep our special find_endpoints function because we need explicit control over the selected altsetting.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
3e515665 |
| 01-Nov-2013 |
Bjørn Mork <bjorn@mork.no> |
net: cdc_ncm: remove redundant "intf" field
This is always a duplicate of the "control" field. It causes confusion wrt intf_data updates and cleanups.
Cc: Alexey Orishko <alexey.orishko@gmail.com>
net: cdc_ncm: remove redundant "intf" field
This is always a duplicate of the "control" field. It causes confusion wrt intf_data updates and cleanups.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
20572226 |
| 01-Nov-2013 |
Bjørn Mork <bjorn@mork.no> |
net: cdc_ncm: simplify and optimize frame padding
We can avoid the costly division for the common case where we pad the frame to tx_max size as long as we ensure that tx_max is either the device spe
net: cdc_ncm: simplify and optimize frame padding
We can avoid the costly division for the common case where we pad the frame to tx_max size as long as we ensure that tx_max is either the device specified dwNtbOutMaxSize or not a multiplum of wMaxPacketSize.
Using the preconverted 'maxpacket' field avoids converting wMaxPacketSize to CPU endianness for every transmitted frame
And since we only will hit the one byte padding rule for short frames, we can drop testing the skb for tailroom.
The change means that tx_max now represents the real maximum skb size, enabling us to allocate the correct size instead of always making room for one extra byte.
Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v3.12-rc7, v3.12-rc6, v3.12-rc5, v3.12-rc4, v3.12-rc3, v3.12-rc2, v3.12-rc1, v3.11, v3.11-rc7, v3.11-rc6, v3.11-rc5, v3.11-rc4, v3.11-rc3, v3.11-rc2, v3.11-rc1, v3.10, v3.10-rc7, v3.10-rc6, v3.10-rc5, v3.10-rc4, v3.10-rc3, v3.10-rc2, v3.10-rc1, v3.9, v3.9-rc8, v3.9-rc7 |
|
#
8a34b0ae |
| 10-Apr-2013 |
Ming Lei <ming.lei@canonical.com> |
usbnet: cdc_ncm: apply usbnet_link_change
Use the introduced usbnet_link_change to handle link change.
Signed-off-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: David S. Miller <davem@davemlo
usbnet: cdc_ncm: apply usbnet_link_change
Use the introduced usbnet_link_change to handle link change.
Signed-off-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|