base-modem-at: switch to use the MMIfacePortAt by default
The whole codebase is updated to assume the MMBaseModem AT operations require an object implementing the MMIfacePortAt interface, instead of a MMPortSerialAt object. In the places where we know the port is a MMPortSerialAt, e.g. when we query explicitly for the primary or secondary serial AT port, we will use an explicit MM_IFACE_PORT_AT() cast when calling the AT command method. In the places where we get_best_at_port() we're going to assume that we don't know the port type. This method will be updated in a follow up commit to support the MMIfacePortAt interface as well.
This commit is contained in:
committed by
Aleksander Morgado
parent
67a0af3575
commit
480e12c34e
@@ -359,7 +359,7 @@ handle_cancel_dial (GTask *task)
|
||||
command = g_strdup_printf ("^SWWAN=0,%u,%u",
|
||||
ctx->cid, usb_interface_configs[ctx->usb_interface_config_index].swwan_index);
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
command,
|
||||
3,
|
||||
FALSE,
|
||||
@@ -409,7 +409,7 @@ dial_3gpp_context_step (GTask *task)
|
||||
/* Send SGAUTH write, if User & Pass are provided.
|
||||
* advance to next state by callback */
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
command,
|
||||
10,
|
||||
FALSE,
|
||||
@@ -435,7 +435,7 @@ dial_3gpp_context_step (GTask *task)
|
||||
|
||||
if (default_swwan_behavior) {
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
command,
|
||||
MM_BASE_BEARER_DEFAULT_CONNECTION_TIMEOUT,
|
||||
FALSE,
|
||||
@@ -451,7 +451,7 @@ dial_3gpp_context_step (GTask *task)
|
||||
* we'll mark the bearer disconnected later in the callback.
|
||||
*/
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
command,
|
||||
MM_BASE_BEARER_DEFAULT_CONNECTION_TIMEOUT,
|
||||
FALSE,
|
||||
@@ -652,7 +652,7 @@ disconnect_3gpp_context_step (GTask *task)
|
||||
mm_obj_dbg (self, "disconnect step %u/%u: disconnecting PDP CID %u...",
|
||||
ctx->step, DISCONNECT_3GPP_CONTEXT_STEP_LAST, ctx->cid);
|
||||
mm_base_modem_at_command_full (ctx->modem,
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
command,
|
||||
MM_BASE_BEARER_DEFAULT_DISCONNECTION_TIMEOUT,
|
||||
FALSE,
|
||||
|
||||
@@ -730,7 +730,7 @@ modem_power_off (MMIfaceModem *self,
|
||||
* fires */
|
||||
g_assert (MAX_POWER_OFF_WAIT_TIME_SECS > 5);
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
ctx->primary,
|
||||
MM_IFACE_PORT_AT (ctx->primary),
|
||||
"^SMSO",
|
||||
5,
|
||||
FALSE, /* allow_cached */
|
||||
|
||||
@@ -988,7 +988,7 @@ run_voice_enable_disable_unsolicited_events (GTask *task)
|
||||
|
||||
if (port) {
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
port,
|
||||
MM_IFACE_PORT_AT (port),
|
||||
ctx->slcc_command,
|
||||
3,
|
||||
FALSE,
|
||||
|
||||
Reference in New Issue
Block a user