[PATCH v2 1/2] bearer: replace mm_bearer_report_disconnection with mm_bearer_report_status
Ben Chan
benchan at chromium.org
Thu Sep 19 22:18:46 PDT 2013
On Thu, Sep 19, 2013 at 11:44 AM, Aleksander Morgado
<aleksander at lanedo.com>wrote:
> On 19/09/13 19:24, Ben Chan wrote:
> >
> > Instead of passing a MMBearerStatus value; it probably is a good
> idea to
> > have a new enumeration considering other things. E.g. in the
> option/hso
> > bearer we have report_connection_status() which is the method used by
> > the modem object to notify about unsolicited messages received during
> > connection/disconnection sequence. This method uses a new enum with
> the
> > following values:
> >
> > typedef enum {
> > MM_BROADBAND_BEARER_HSO_CONNECTION_STATUS_UNKNOWN,
> > MM_BROADBAND_BEARER_HSO_CONNECTION_STATUS_CONNECTED,
> > MM_BROADBAND_BEARER_HSO_CONNECTION_STATUS_CONNECTION_FAILED,
> > MM_BROADBAND_BEARER_HSO_CONNECTION_STATUS_DISCONNECTED
> > } MMBroadbandBearerHsoConnectionStatus;
> >
> > The generic report_status() could handle all these. Something like:
> >
> > typedef enum {
> > MM_BEARER_CONNECTION_STATUS_UNKNOWN,
> > MM_BEARER_CONNECTION_STATUS_CONNECTED,
> > MM_BEARER_CONNECTION_STATUS_CONNECTION_FAILED,
> > MM_BEARER_CONNECTION_STATUS_DISCONNECTING,
> > MM_BEARER_CONNECTION_STATUS_DISCONNECTED,
> > } MMBearerConnectionStatus.
> >
> > The 'disconnecting' case could be used by the Huawei plugin to notify
> > about a disconnection that will need further plugin action to finally
> > report disconnected (see the other email).
> >
> >
> > I guess you're proposing:
> > - getting rid of those custom connection status enum in mbm/hso/icera
> > - converting those custom mm_broadband_*_report_connection_status() in
> > mbm/hso/icera to report_connection_status()
> > - instead of calling mm_bearer_report_* in those custom
> > mm_broadband_*_report_connection_status(), call parent's
> > report_connection_status
> >
>
> Exactly, yes.
>
> > I think the changes make sense, but don't have those modems to verify
> > such changes. Do you have those modems?
> >
> >
>
> I do yes. Your Samsung modems are also Icera based, IIRC. Do you want me
> to try to do it? Or, otherwise, if you do it I can test it with those
> modems.
>
>
Uploaded patch v3. I'm testing with an Icera Y3400 and a Huawei MU736.
As it's not a small change, more testing would be good. Could you try the
patchs with the modems you have? Thanks.
> --
> Aleksander
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/modemmanager-devel/attachments/20130919/f576543e/attachment.html>
More information about the ModemManager-devel
mailing list