From f71852c5b93b365c21c8b1ea2f8c236da2e70899 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 9 Jan 2013 12:02:18 -0600 Subject: [PATCH] iface-modem-cdma: get CDMA1x Serving System during QCDM registration We want the SID/NID even when AT Serving System checks are disabled, otherwise the SID/NID don't get filled at all. QCDM doesn't need the SID/NID to determine registration, so the values are informational only and don't affect registration state. But we still want to export them via the API. --- src/mm-iface-modem-cdma.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/mm-iface-modem-cdma.c b/src/mm-iface-modem-cdma.c index ff3183a2..f5206727 100644 --- a/src/mm-iface-modem-cdma.c +++ b/src/mm-iface-modem-cdma.c @@ -418,6 +418,7 @@ typedef enum { REGISTRATION_CHECK_STEP_QCDM_CALL_MANAGER_STATE, REGISTRATION_CHECK_STEP_QCDM_HDR_STATE, + REGISTRATION_CHECK_STEP_QCDM_CDMA1X_SERVING_SYSTEM, REGISTRATION_CHECK_STEP_QCDM_LAST, REGISTRATION_CHECK_STEP_AT_CDMA_SERVICE_STATUS, @@ -630,6 +631,8 @@ get_cdma1x_serving_system_ready (MMIfaceModemCdma *self, { GError *error = NULL; + /* Note: used for *both* AT and QCDM serving system checks */ + if (!MM_IFACE_MODEM_CDMA_GET_INTERFACE (self)->get_cdma1x_serving_system_finish ( self, res, @@ -764,6 +767,22 @@ registration_check_step (RunRegistrationChecksContext *ctx) /* Fall down to next step */ ctx->step++; + case REGISTRATION_CHECK_STEP_QCDM_CDMA1X_SERVING_SYSTEM: + /* We only care about SID/NID here; nothing to do with registration + * state. + */ + if (MM_IFACE_MODEM_CDMA_GET_INTERFACE (ctx->self)->get_cdma1x_serving_system && + MM_IFACE_MODEM_CDMA_GET_INTERFACE (ctx->self)->get_cdma1x_serving_system_finish) { + MM_IFACE_MODEM_CDMA_GET_INTERFACE (ctx->self)->get_cdma1x_serving_system ( + ctx->self, + (GAsyncReadyCallback)get_cdma1x_serving_system_ready, + ctx); + return; + } + mm_dbg (" Skipping CDMA1x Serving System check"); + /* Fall down to next step */ + ctx->step++; + case REGISTRATION_CHECK_STEP_QCDM_LAST: /* When we get all QCDM results, parse them */ parse_qcdm_results (ctx);