From e11725aa868c8093288d0e1985854e15c7cb46e9 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Tue, 25 Dec 2018 01:18:41 +0700 Subject: host/layer23: rename GSM_SIM_TYPE_READER to GSM_SIM_TYPE_L1PHY Since we have two ways to interact with a physical SIM: - using built-in SIM reader of the L1 PHY (via L1CTL), - using remote reader via (BT)SAP protocol, name 'GSM_SIM_TYPE_READER' looks quite confusing. Let's rename it in order to explicitly indicate the role of L1 PHY. Change-Id: I0f83f365ed50cfd658fdd3a9d6866ed76c8c4009 --- src/host/layer23/src/mobile/app_mobile.c | 2 +- src/host/layer23/src/mobile/settings.c | 2 +- src/host/layer23/src/mobile/subscriber.c | 10 +++++----- src/host/layer23/src/mobile/vty_interface.c | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/host/layer23/src/mobile') diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index 8b5fc915..a2c02c06 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -110,7 +110,7 @@ int mobile_signal_cb(unsigned int subsys, unsigned int signal, /* insert test card, if enabled */ switch (set->sim_type) { - case GSM_SIM_TYPE_READER: + case GSM_SIM_TYPE_L1PHY: /* trigger sim card reader process */ gsm_subscr_simcard(ms); break; diff --git a/src/host/layer23/src/mobile/settings.c b/src/host/layer23/src/mobile/settings.c index a4bb4e36..388c7547 100644 --- a/src/host/layer23/src/mobile/settings.c +++ b/src/host/layer23/src/mobile/settings.c @@ -49,7 +49,7 @@ int gsm_settings_init(struct osmocom_ms *ms) sprintf(set->imeisv, "0000000000000000"); /* SIM type */ - set->sim_type = GSM_SIM_TYPE_READER; + set->sim_type = GSM_SIM_TYPE_L1PHY; /* test SIM */ strcpy(set->test_imsi, "001010000000000"); diff --git a/src/host/layer23/src/mobile/subscriber.c b/src/host/layer23/src/mobile/subscriber.c index 7a011411..097f7859 100644 --- a/src/host/layer23/src/mobile/subscriber.c +++ b/src/host/layer23/src/mobile/subscriber.c @@ -711,7 +711,7 @@ void gsm_subscr_sim_pin(struct osmocom_ms *ms, char *pin1, char *pin2, uint8_t job; /* skip, if no real valid SIM */ - if (subscr->sim_type != GSM_SIM_TYPE_READER) + if (subscr->sim_type != GSM_SIM_TYPE_L1PHY) return; switch (mode) { @@ -764,7 +764,7 @@ int gsm_subscr_simcard(struct osmocom_ms *ms) gsm_subscr_exit(ms); gsm_subscr_init(ms); - subscr->sim_type = GSM_SIM_TYPE_READER; + subscr->sim_type = GSM_SIM_TYPE_L1PHY; sprintf(subscr->sim_name, "sim"); subscr->sim_valid = 1; subscr->ustate = GSM_SIM_U2_NOT_UPDATED; @@ -790,7 +790,7 @@ static int subscr_write_plmn_na(struct osmocom_ms *ms) #endif /* skip, if no real valid SIM */ - if (subscr->sim_type != GSM_SIM_TYPE_READER || !subscr->sim_valid) + if (subscr->sim_type != GSM_SIM_TYPE_L1PHY || !subscr->sim_valid) return 0; /* get tail list from "PLMN not allowed" */ @@ -844,7 +844,7 @@ int gsm_subscr_write_loci(struct osmocom_ms *ms) struct gsm1111_ef_loci *loci; /* skip, if no real valid SIM */ - if (subscr->sim_type != GSM_SIM_TYPE_READER || !subscr->sim_valid) + if (subscr->sim_type != GSM_SIM_TYPE_L1PHY || !subscr->sim_valid) return 0; LOGP(DMM, LOGL_INFO, "Updating LOCI on SIM\n"); @@ -907,7 +907,7 @@ int gsm_subscr_generate_kc(struct osmocom_ms *ms, uint8_t key_seq, struct sim_hdr *nsh; /* not a SIM */ - if ((subscr->sim_type != GSM_SIM_TYPE_READER + if ((subscr->sim_type != GSM_SIM_TYPE_L1PHY && subscr->sim_type != GSM_SIM_TYPE_TEST) || !subscr->sim_valid || no_sim) { struct gsm48_mm_event *nmme; diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index a0ad9937..2001b882 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -1323,7 +1323,7 @@ static void config_write_ms(struct vty *vty, struct osmocom_ms *ms) case GSM_SIM_TYPE_NONE: vty_out(vty, " sim none%s", VTY_NEWLINE); break; - case GSM_SIM_TYPE_READER: + case GSM_SIM_TYPE_L1PHY: vty_out(vty, " sim reader%s", VTY_NEWLINE); break; case GSM_SIM_TYPE_TEST: @@ -1608,7 +1608,7 @@ DEFUN(cfg_ms_sim, cfg_ms_sim_cmd, "sim (none|reader|test|sap)", set->sim_type = GSM_SIM_TYPE_NONE; break; case 'r': - set->sim_type = GSM_SIM_TYPE_READER; + set->sim_type = GSM_SIM_TYPE_L1PHY; break; case 't': set->sim_type = GSM_SIM_TYPE_TEST; -- cgit v1.2.3