aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2011-07-25 13:40:24 -0500
committerDan Williams <dcbw@redhat.com>2011-07-25 13:53:34 -0500
commit30f848e7007154a33984cf843831955dfbcb25e5 (patch)
treef1307969d8efc0b196b00ef647f6f1521f646878
parentf8934c21ceabef58d096ded41f1b3f3ea7de1800 (diff)
cdma: don't blow away generic EVDO reg state if no specific state is available
Generic code (like the QCDM CM/HDR checks) would determine the EVDO registration state, which would then get blown away by the device-specific registration state query method. Modems that have a more specific check were fine, but generic devices that don't have more specific reg state checks can simply rely on the generic checks done earlier and don't need to update the EVDO state from real_query_registration_state().
-rw-r--r--src/mm-generic-cdma.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/mm-generic-cdma.c b/src/mm-generic-cdma.c
index 4686b85a..11987a2c 100644
--- a/src/mm-generic-cdma.c
+++ b/src/mm-generic-cdma.c
@@ -1700,11 +1700,17 @@ real_query_registration_state (MMGenericCdma *self,
/* Try Sprint-specific commands */
mm_at_serial_port_queue_command (port, "+SPSERVICE?", 3, reg_query_spservice_done, info);
} else {
- /* Assume we're registered on the 1x network if we passed +CAD, +CSS,
- * and QCDM Call Manager checking.
+ /* Assume we're at least registered on the 1x network if we passed
+ * +CAD, +CSS, and QCDM Call Manager checking. But don't override a
+ * more specific registration state passed from a caller.
*/
- mm_generic_cdma_query_reg_state_set_callback_1x_state (info, MM_MODEM_CDMA_REGISTRATION_STATE_REGISTERED);
- mm_generic_cdma_query_reg_state_set_callback_evdo_state (info, MM_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN);
+ if (cur_cdma_state == MM_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN)
+ mm_generic_cdma_query_reg_state_set_callback_1x_state (info, MM_MODEM_CDMA_REGISTRATION_STATE_REGISTERED);
+
+ /* Don't touch EVDO state; it's already either UNKNOWN, or been set
+ * by generic checking earlier.
+ */
+
mm_callback_info_schedule (info);
}
}