Move ECM functionality from netusb to function_ecm making defines not
needed in many cases.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
usb_dc_status_callback() parameters are interface or configuration
numbers and should be const.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Remove all CONFIG_*_EP_ADDR options but keep the default
values for it, as they are necessary to find ep_addr in
usb_ep_cfg_data associated with bEndpointAddress in
interface descriptor.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Adapt functions for new composite interface.
Assign bInterfaceNumber and similar variables of a Interface
default values, these should be valid values for non-composite
configuration. For the case of the composite configuration,
these variables must be set by the interface configuration
function (interface_config) accordingly.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Add CDC Ethernet Emulation Model function driver. This usb network
function can be used for ethernet over USB. Ethernet packet are
encapsulated within EEM packets. An EEM pkt contains 2-byte header
and 4-byte sentinel (or crc).
Note that EEM packets can be split across USB packets but shall not
be split across USB transfers.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
netusb endpoint config is specific to the function (ECM, RNDIS, EEM..).
Move this config to the function interface.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Move class_handler and send_pkt to netusb function interface.
This makes netusb 'function' agnostic.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>