[PATCH v2] mbim-proxy: Don't enable all the CID's in global device service subscribe list.

Roshan Pius rpius at google.com
Mon Feb 9 09:03:35 PST 2015


Hey Aleks,

You're right. Looks like the modem we're working on currently is not fully
MBIM spec compliant because we're only getting notifications from the modem
if there is an explicit device service subscribe set request after
OPEN_DONE. That also explains why the modem works without MBIM proxy
because we seem to be explicitly sending the device service subscribe
request after OPEN_DONE without the proxy enabled.

We'll follow up with the vendor for the issue.

Thanks,
Roshan Pius

On Sat Feb 07 2015 at 3:31:30 AM Aleksander Morgado <
aleksander at aleksander.es> wrote:

> Hey,
>
> On Fri, Feb 6, 2015 at 11:33 PM, Roshan Pius <rpius at chromium.org> wrote:
> > Since we're enabling all the CID's in the global device service
> > subscribe list during init, any new clients connecting to the proxy and
> > requesting a change in the device subscribe list doesn't take effect
> > since all the CID's are always enabled. This results in mbim-proxy
> > never sending the device-service-subscribe set command to the device
> > after bootup.
> >
> > Change-Id: I028ba5f8d6801374022a5c93d985e59fbc3ad93a
>
> The MBIM spec says, in the MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST
> description:
>
> "Upon OPEN_DONE completion, notifications for CIDs defined in this
> specification are enabled (aka
> subscribed to) by default, and vendor extension notifications are off
> by default"
>
> Isn't this what we already had in the proxy?
>
> When a new client connects to the proxy, and they request only a
> specific subset of the default services, there will be no messages
> sent to the device because all the requested items in the subset were
> already enabled by default. The proxy should just take care of only
> forwarding to each client the specific subset each client asked for.
>
> > ---
> >  src/libmbim-glib/mbim-proxy.c | 12 ++++--------
> >  1 file changed, 4 insertions(+), 8 deletions(-)
> >
> > diff --git a/src/libmbim-glib/mbim-proxy.c
> b/src/libmbim-glib/mbim-proxy.c
> > index fdbc7d9..892e980 100644
> > --- a/src/libmbim-glib/mbim-proxy.c
> > +++ b/src/libmbim-glib/mbim-proxy.c
> > @@ -853,16 +853,11 @@ merge_client_service_subscribe_lists (MbimProxy
> *self,
> >                                        gsize     *out_size)
> >  {
> >      GList *l;
> > -    MbimEventEntry **updated;
> > +    MbimEventEntry **updated = NULL;
> >      gsize updated_size = 0;
> >
> >      g_assert (out_size != NULL);
> >
> > -    /* Add previous global list */
> > -    updated = _mbim_proxy_helper_service_subscribe_list_merge (NULL, 0,
> > -
>  self->priv->mbim_event_entry_array, self->priv->mbim_event_entry_
> array_size,
> > -
>  &updated_size);
> > -
> >      for (l = self->priv->clients; l; l = g_list_next (l)) {
> >          Client *client;
> >
> > @@ -1362,8 +1357,9 @@ mbim_proxy_init (MbimProxy *self)
> >                                                MBIM_TYPE_PROXY,
> >                                                MbimProxyPrivate);
> >
> > -    /* By default, we assume we have all default services enabled */
> > -    self->priv->mbim_event_entry_array = _mbim_proxy_helper_service_subscribe_standard_list_new
> (&self->priv->mbim_event_entry_array_size);
> > +    /* By default, all services are disabled untill a client makes a
> service-subscribe request */
> > +    self->priv->mbim_event_entry_array = NULL;
> > +    self->priv->mbim_event_entry_array_size = 0;
> >  }
> >
> >  static void
> > --
> > 2.2.0.rc0.207.ga3a616c
> >
>
>
>
> --
> Aleksander
> https://aleksander.es
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libmbim-devel/attachments/20150209/88c4c2b4/attachment.html>


More information about the libmbim-devel mailing list