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

Aleksander Morgado aleksander at aleksander.es
Tue Oct 9 11:29:58 UTC 2018


Hey!

> > 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?
>

I've seen several "Invalid LSI" errors reported, although not sure if
that would be totally related to the disconnection management here.
What I'm sure is that I've seen the AC313U reported as connected in
MM, with the wwan interface up and with IP settings, and when querying
SCACT? it would tell me that no context was connected (and of course
there was no traffic).

I fail to see if this issue is only seen in the AC313U (this is where
I've seen it) or in all DirectIP modems, so just added it for all.

I do *not* have a AC313U myself, so I'm very limited to what I can
test or try really. I'll try to get one off ebay.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list