[PATCH v2 1/2] bearer: replace mm_bearer_report_disconnection with mm_bearer_report_status

Aleksander Morgado aleksander at lanedo.com
Thu Sep 19 11:44:19 PDT 2013


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.

-- 
Aleksander


More information about the ModemManager-devel mailing list