summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/src/mobile
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-12-25 01:18:41 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-12-26 20:52:18 +0000
commite11725aa868c8093288d0e1985854e15c7cb46e9 (patch)
treefd60d677eb3128820a702fb040ce47908f8bcd85 /src/host/layer23/src/mobile
parentb9073067c67196b4281ed57d5385a273fdab0406 (diff)
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
Diffstat (limited to 'src/host/layer23/src/mobile')
-rw-r--r--src/host/layer23/src/mobile/app_mobile.c2
-rw-r--r--src/host/layer23/src/mobile/settings.c2
-rw-r--r--src/host/layer23/src/mobile/subscriber.c10
-rw-r--r--src/host/layer23/src/mobile/vty_interface.c4
4 files changed, 9 insertions, 9 deletions
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;