[review] Support connection checks in DirectIP (sierra-legacy plugin)

Bjørn Mork bjorn at mork.no
Tue Oct 9 10:27:12 UTC 2018


Aleksander Morgado <aleksander at aleksander.es> writes:

> Devices like the AC313U require explicit context monitoring with !SCACT?.
> Otherwise, we may end up with the modem reported as connected in MM, with
> IP settings in the network interface and all, but without a real connection
> inside the modem.

Really?  I must admit that it's been 5 years or more since the last time
I tested DirectIP, but reading the driver suggests that it should react
to link down events from the firmware:


static void sierra_net_handle_lsi(struct usbnet *dev, char *data,
                struct hip_hdr  *hh)
{
        struct sierra_net_data *priv = sierra_net_get_private(dev);
        int link_up;

        link_up = sierra_net_parse_lsi(dev, data + hh->hdrlen,
                                        hh->payload_len.word);
        if (link_up < 0) {
                netdev_err(dev->net, "Invalid LSI\n");
                return;
        }
        if (link_up) {
                sierra_net_set_ctx_index(priv, hh->msgspecific.byte);
                priv->link_up = 1;
        } else {
                priv->link_up = 0;
        }
        usbnet_link_change(dev, link_up, 0);
}


Doesn't this work? If so, is the event missing or do we fail to parse
it?  Or is the problem that MM doesn't consider the netdev link state?

> This MR implements the support for this periodic !SCACT checks:
> https://gitlab.freedesktop.org/mobile-broadband/ModemManager/merge_requests/45

Yes, that will work too of course



Bjørn


More information about the ModemManager-devel mailing list