sierra: too many timeout errors during custom init means non-AT port
Reduces probing time of the modem in ~10s.
This commit is contained in:
@@ -80,6 +80,13 @@ gcap_ready (MMAtSerialPort *port,
|
||||
SierraCustomInitContext *ctx)
|
||||
{
|
||||
if (error) {
|
||||
/* If consumed all tries and the last error was a timeout, assume the
|
||||
* port is not AT */
|
||||
if (ctx->retries == 0 &&
|
||||
g_error_matches (error, MM_SERIAL_ERROR, MM_SERIAL_ERROR_RESPONSE_TIMEOUT)) {
|
||||
mm_port_probe_set_result_at (ctx->probe, FALSE);
|
||||
}
|
||||
|
||||
/* Just retry... */
|
||||
sierra_custom_init_step (ctx);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user