3gpp: update registration state enumeration with CSFB related states
Introduce "sms only" and "CSFB not preferred" home/roaming states to be reported for the CS context, while already registered on LTE. Based on 3GPP TS 27.007 v13.5.0.
This commit is contained in:
@@ -1428,7 +1428,7 @@ mm_3gpp_parse_creg_response (GMatchInfo *info,
|
||||
|
||||
/* Status */
|
||||
str = g_match_info_fetch (info, istat);
|
||||
stat = parse_uint (str, 10, 0, 5, &success);
|
||||
stat = parse_uint (str, 10, 0, G_MAXUINT, &success);
|
||||
g_free (str);
|
||||
if (!success) {
|
||||
g_set_error_literal (error,
|
||||
@@ -1437,6 +1437,12 @@ mm_3gpp_parse_creg_response (GMatchInfo *info,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* 'roaming (csfb not preferred)' is the last valid state */
|
||||
if (stat > MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING_CSFB_NOT_PREFERRED) {
|
||||
mm_warn ("Registration State '%lu' is unknown", stat);
|
||||
stat = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
|
||||
}
|
||||
|
||||
/* Location Area Code */
|
||||
if (ilac) {
|
||||
/* FIXME: some phones apparently swap the LAC bytes (LG, SonyEricsson,
|
||||
@@ -1463,12 +1469,6 @@ mm_3gpp_parse_creg_response (GMatchInfo *info,
|
||||
act = -1;
|
||||
}
|
||||
|
||||
/* 'roaming' is the last valid state */
|
||||
if (stat > MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING) {
|
||||
mm_warn ("Registration State '%lu' is unknown", stat);
|
||||
stat = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
|
||||
}
|
||||
|
||||
*out_reg_state = (MMModem3gppRegistrationState) stat;
|
||||
if (stat != MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN) {
|
||||
/* Don't fill in lac/ci/act if the device's state is unknown */
|
||||
|
Reference in New Issue
Block a user