broadband-modem: check if modem implements MBIM_CID_USSD
This commit is contained in:
committed by
Dan Williams
parent
cf500014b6
commit
ff6a82f5b7
@@ -78,11 +78,14 @@ struct _MMBroadbandModemMbimPrivate {
|
|||||||
gchar *caps_firmware_info;
|
gchar *caps_firmware_info;
|
||||||
gchar *caps_hardware_info;
|
gchar *caps_hardware_info;
|
||||||
|
|
||||||
|
/* Supported features */
|
||||||
|
gboolean is_pco_supported;
|
||||||
|
gboolean is_ussd_supported;
|
||||||
|
|
||||||
/* Process unsolicited notifications */
|
/* Process unsolicited notifications */
|
||||||
guint notification_id;
|
guint notification_id;
|
||||||
ProcessNotificationFlag setup_flags;
|
ProcessNotificationFlag setup_flags;
|
||||||
ProcessNotificationFlag enable_flags;
|
ProcessNotificationFlag enable_flags;
|
||||||
gboolean is_pco_supported;
|
|
||||||
|
|
||||||
/* 3GPP registration helpers */
|
/* 3GPP registration helpers */
|
||||||
gchar *current_operator_id;
|
gchar *current_operator_id;
|
||||||
@@ -1751,7 +1754,6 @@ query_device_services_ready (MbimDevice *device,
|
|||||||
guint32 device_services_count;
|
guint32 device_services_count;
|
||||||
|
|
||||||
self = g_task_get_source_object (task);
|
self = g_task_get_source_object (task);
|
||||||
self->priv->is_pco_supported = FALSE;
|
|
||||||
|
|
||||||
response = mbim_device_command_finish (device, res, &error);
|
response = mbim_device_command_finish (device, res, &error);
|
||||||
if (response &&
|
if (response &&
|
||||||
@@ -1769,18 +1771,29 @@ query_device_services_ready (MbimDevice *device,
|
|||||||
guint32 j;
|
guint32 j;
|
||||||
|
|
||||||
service = mbim_uuid_to_service (&device_services[i]->device_service_id);
|
service = mbim_uuid_to_service (&device_services[i]->device_service_id);
|
||||||
if (service != MBIM_SERVICE_BASIC_CONNECT_EXTENSIONS)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
for (j = 0; j < device_services[i]->cids_count; j++) {
|
switch (service) {
|
||||||
if (device_services[i]->cids[j] == MBIM_CID_BASIC_CONNECT_EXTENSIONS_PCO) {
|
case MBIM_SERVICE_BASIC_CONNECT_EXTENSIONS:
|
||||||
mm_dbg ("PCO is supported");
|
for (j = 0; j < device_services[i]->cids_count; j++) {
|
||||||
self->priv->is_pco_supported = TRUE;
|
if (device_services[i]->cids[j] == MBIM_CID_BASIC_CONNECT_EXTENSIONS_PCO) {
|
||||||
|
mm_dbg ("PCO is supported");
|
||||||
|
self->priv->is_pco_supported = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MBIM_SERVICE_USSD:
|
||||||
|
for (j = 0; j < device_services[i]->cids_count; j++) {
|
||||||
|
if (device_services[i]->cids[j] == MBIM_CID_USSD) {
|
||||||
|
mm_dbg ("USSD is supported");
|
||||||
|
self->priv->is_ussd_supported = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
mbim_device_service_element_array_free (device_services);
|
mbim_device_service_element_array_free (device_services);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user