broadband-modem-qmi: Introduce udev flag for reduced facility lock query
The udev flag "ID_MM_QMI_FACILITY_LOCK_QUERY_REDUCED" allows to skip facility lock state query "get_ck_status" on the DMS path for devices where this isn't implemented properly. On devices that have enabled "device locks", this flag won't work well. Skipping the query doesn't disable the locks. Fixes #448
This commit is contained in:
@@ -2314,6 +2314,7 @@ modem_3gpp_load_enabled_facility_locks (MMIfaceModem3gpp *self,
|
||||
LoadEnabledFacilityLocksContext *ctx;
|
||||
GTask *task;
|
||||
QmiClient *client = NULL;
|
||||
MMPort *port;
|
||||
|
||||
if (!MM_BROADBAND_MODEM_QMI (self)->priv->dms_uim_deprecated) {
|
||||
if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self),
|
||||
@@ -2342,8 +2343,20 @@ modem_3gpp_load_enabled_facility_locks (MMIfaceModem3gpp *self,
|
||||
task = g_task_new (self, NULL, callback, user_data);
|
||||
g_task_set_task_data (task, ctx, (GDestroyNotify)load_enabled_facility_locks_context_free);
|
||||
|
||||
/* DMS uses get_ck_status and get_pin_status to probe facilities
|
||||
* UIM uses get_card_status and get_configuration
|
||||
/* If tagged by udev, perform a reduced facility lock query via DMS
|
||||
* by skipping get_ck_status and process get_pin_status only
|
||||
*/
|
||||
port = MM_PORT (mm_broadband_modem_qmi_peek_port_qmi (MM_BROADBAND_MODEM_QMI (self)));
|
||||
if (mm_kernel_device_get_global_property_as_boolean (mm_port_peek_kernel_device (port),
|
||||
"ID_MM_QMI_FACILITY_LOCK_QUERY_REDUCED")) {
|
||||
mm_obj_dbg (self, "performing reduced facility lock query (DMS)");
|
||||
get_sim_lock_status_via_pin_status (task);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Regular facility lock query
|
||||
* DMS uses get_ck_status and get_pin_status to probe facilities
|
||||
* UIM uses get_configuration and get_card_status
|
||||
*/
|
||||
if (!MM_BROADBAND_MODEM_QMI (self)->priv->dms_uim_deprecated)
|
||||
get_next_facility_lock_status_via_dms (task);
|
||||
|
Reference in New Issue
Block a user