base-modem: support non-serial ports when peeking the best AT port

When we don't care about the type of AT port to use, prefer the QMI or
MBIM based ones if any available.
This commit is contained in:
Aleksander Morgado
2024-04-23 07:25:12 +00:00
committed by Aleksander Morgado
parent 480e12c34e
commit 939be0fbf8
8 changed files with 60 additions and 27 deletions
@@ -138,7 +138,7 @@ load_connection_status (MMBaseBearer *self,
g_task_set_task_data (task, GUINT_TO_POINTER ((guint)profile_id), NULL);
/* If no control port available, error out */
port = MM_IFACE_PORT_AT (mm_base_modem_peek_best_at_port (modem, NULL));
port = mm_base_modem_peek_best_at_port (modem, NULL);
if (!port) {
g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
"Couldn't load connection status: no control port available");