[PATCH V2] altair-lte: mark SIM provisioned in load_subscription_state

Aleksander Morgado aleksander at lanedo.com
Fri Oct 11 12:22:22 PDT 2013


On 11/10/13 19:10, Dan Williams wrote:
> On Thu, 2013-10-10 at 14:31 -0700, Prathmesh Prabhu wrote:
>> > An unknown --> home (roaming) registration state change is not visible to the
>> > plugin until mm_iface_modem_3gpp_reload_current_registration_info completes.
>> > This causes the subscription state check during registration to miss the fact
>> > that registration was successful.
>> > 
>> > load_subscription_state is intended to check subscription state
>> > post-registration. As an initial implementation, mark the SIM provisioned in
>> > absence of more information post-registration.
> Ok, to clarify here, when update_registration_state() gets called in
> response to either a poll or an unsolicited registration state message,
> it only sets the new registration state *after* it calls
> mm_iface_modem_3gpp_reload_current_registration_info().  So the sequence
> is:
> 
> something sets old registration state>
> ... (time passes)
> new registration state read
> update_registration_state() called
> if (home | roaming)
>    mm_iface_modem_3gpp_reload_current_registration_info()
>      loads operator code
>      loads operator name
>      loads subscription state
> <note that nothing here knows about new registration state>
> update_registration_reload_current_registration_info_ready() called
> sets new registration state on skeleton
> updates 3GPP subsystem state
> 
> So yeah, if a plugin overrides load_subscription_state, and the
> registration state changes to home|roaming, there's no way the plugin's
> load_subscription_state can figure out the new registration state.
> 

If load_subscription_state is called, the modem is registered in either
home or a roaming network. Not sure it needs to know anything else.

> I wonder why the new registration state isn't set immediately in
> update_registration_state() before loading the operator stuff?  If we
> fail to load operator name/code/subscription, IMHO we should still set
> the correct registration state for the modem. 

The new registration state is set in the interface after loading
operator code/name, so that clients getting notified about the new
REGISTERED state can read the new operator code/name right away. You
just need to assume that if
load_operator_code/load_operator_name/load_subscription_state is called,
the modem is already registered, even if the interface doesn't say it.

> We could delay the
> mm_iface_modem_update_subsystem_state() until the current registration
> information is loaded if modem state changes might make the call chain
> too complicated.
> 
> Aleksander, what do you think?  If this were done, Prathmesh, would this
> Altair patch still be needed?

I would actually update Prathmesh's patch and make it the default
implementation in MMBroadbandModem. This is, whenever we're registered
in the network, we can safely? say that the subscription state is
PROVISIONED (otherwise it wouldn't have registered, right?). Then,
whenever Altair makes use of the PCO info, they can subclass this
load_subscription_state() method and provide a more detailed value if
needed.

-- 
Aleksander


More information about the ModemManager-devel mailing list