mirror of git://git.sysmocom.de/ofono
Refactor: Preserve Phase obtained from the SIM
This commit is contained in:
parent
b4c3e1c1cc
commit
beb3e032e4
|
@ -58,9 +58,10 @@ enum ofono_sim_password_type {
|
|||
};
|
||||
|
||||
enum ofono_sim_phase {
|
||||
OFONO_SIM_PHASE_G1,
|
||||
OFONO_SIM_PHASE_G2,
|
||||
OFONO_SIM_PHASE_G3,
|
||||
OFONO_SIM_PHASE_1G,
|
||||
OFONO_SIM_PHASE_2G,
|
||||
OFONO_SIM_PHASE_2G_PLUS,
|
||||
OFONO_SIM_PHASE_3G,
|
||||
};
|
||||
|
||||
typedef void (*ofono_sim_file_info_cb_t)(const struct ofono_error *error,
|
||||
|
|
|
@ -1226,11 +1226,9 @@ static void sim_efphase_read_cb(const struct ofono_error *error,
|
|||
struct ofono_sim *sim = user;
|
||||
|
||||
if (!error || error->type != OFONO_ERROR_TYPE_NO_ERROR || len != 1)
|
||||
sim->phase = OFONO_SIM_PHASE_G3;
|
||||
else if (data[0] != 0x00)
|
||||
sim->phase = OFONO_SIM_PHASE_G2;
|
||||
sim->phase = OFONO_SIM_PHASE_3G;
|
||||
else
|
||||
sim->phase = OFONO_SIM_PHASE_G1;
|
||||
sim->phase = data[0];
|
||||
|
||||
/* Proceed with SIM initialization */
|
||||
sim_retrieve_efli_and_efpl(sim);
|
||||
|
|
Loading…
Reference in New Issue