[PATCH] libmbim: Add mbim-proxy support
Bjørn Mork
bjorn at mork.no
Fri May 30 01:41:02 PDT 2014
Aleksander Morgado <aleksander at aleksander.es> writes:
>> So what I'm doing is if a client has sent the
>> MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST
>> it will only receive indications from that list.
>
> Yes, unless there is an indication coming which isn't by default
> enabled in any client. If there is an indication not configured by any
> client, then it should go to all.
I'm not sure about this. You will probably hit this due to races
between disconnecting clients and proxy<->modem communication. Avoiding
that is going to be hard, because the indications can already be
buffered in both modem and driver at the time you attempt to disable
them. OK, it can be fixed using a grace period. But it's going to be a
mess... And I don't think it's worth messing up stuff for spec
compliant modems and clients, just to paper over a possible(?) modem
firmware bug.
> Clients need to be prepared to receive indications they didn't ask
> for (as in no crash, just ignore them).
Yes, given that your clients are going to be written for your API, I
think it's reasonable to assume that all clients will ignore any
indications they didn't request. Anything else will be a client bug,
which can be fixed. Which means that you might as well just drop any
unconfigured indications in the proxy, or?
>> A client will receive all indications if the client has never sent the
>> MBIM_CID_BASIC_CONNECT_DEVICE_SERVICE_SUBSCRIBE_LIST
>> command or sends the command with no elements, which clears out the list.
>
> If the client has never sent the SUBSCRIBE_LIST command, it should
> always get the indications for the standard services. If it sends the
> command with no elements, shouldn't we assume that it is trying to
> disable all indications?
Depends on what "no elements" means :-)
Yes, if ElementCount (EC) is 0 then the client is disabling all
indications for all services. But if CidCount is 0 for a specific
service, then that means "enable unsolicited events for all CIDs defined
for this device service".
And there is no exception for vendor specific services, so using an
empty CidList should enable all CIDs for such services as well.
Bjørn
More information about the libmbim-devel
mailing list