Skip to content

_ux_network_driver_link_up not called uppon RNDIS class activation #233

@yames-smile

Description

@yames-smile

Hello,
While trying to use USBX with Netxduo with the RNDIS class for Ethernet over USB I noticed that _ux_network_driver_link_up is never called from the RNDIS class functions. For example for the CDC ECM class it is called in _ux_device_class_cdc_ecm_activate when the layer is up (cdc_ecm -> ux_slave_class_cdc_ecm_link_state == UX_DEVICE_CLASS_CDC_ECM_LINK_STATE_UP). This was preventing the Netx interface associated to the RNDIS interface to go up.
As a workaround, I added these lines near the end of _ux_device_class_rndis_activate :

if (rndis -> ux_slave_class_rndis_link_state == UX_DEVICE_CLASS_RNDIS_LINK_STATE_UP)
{
    /* Communicate the state with the network driver.  */
    _ux_network_driver_link_up(rndis -> ux_slave_class_rndis_network_handle);
}

It works well and I am able to use the Netx interface normally for IP, TCP...
But I guess I'm not the first to use the RNDIS class so this is not a bug in the library. Is the application supposed to do something specific in a callback, like the one given in the parameter ux_slave_class_rndis_instance_activate ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Evaluation

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions