This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Vadim Yanitskiy gerrit-no-reply at lists.osmocom.orgVadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/12429 Change subject: mobile/subscriber.c: consider GSM_SIM_TYPE_SAP too ...................................................................... mobile/subscriber.c: consider GSM_SIM_TYPE_SAP too There are several SIM card interfaces, two of which: - GSM_SIM_TYPE_L1PHY (using built-in SIM reader of the L1 PHY), - GSM_SIM_TYPE_SAP (using remote reader via (BT)SAP protocol), can actually deal with a physical SIM card. But, for some reason, only GSM_SIM_TYPE_L1PHY was considered as such. Let's also get along with GSM_SIM_TYPE_SAP for the following procedures: - PIN management and verification, - FPLMN / LOCI updating, - A3 authentication. Change-Id: I4b3080fa7a5332467a449a314ba3cc3a07a9b7df --- M src/host/layer23/include/osmocom/bb/mobile/subscriber.h M src/host/layer23/src/mobile/subscriber.c 2 files changed, 7 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/29/12429/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/subscriber.h b/src/host/layer23/include/osmocom/bb/mobile/subscriber.h index 958700a..c747af9 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/subscriber.h +++ b/src/host/layer23/include/osmocom/bb/mobile/subscriber.h @@ -20,6 +20,9 @@ #define GSM_IMSI_LENGTH 16 +#define GSM_SIM_IS_READER(type) \ + (type == GSM_SIM_TYPE_L1PHY || type == GSM_SIM_TYPE_SAP) + enum { GSM_SIM_TYPE_NONE = 0, GSM_SIM_TYPE_L1PHY, diff --git a/src/host/layer23/src/mobile/subscriber.c b/src/host/layer23/src/mobile/subscriber.c index 097f785..7f24d56 100644 --- a/src/host/layer23/src/mobile/subscriber.c +++ b/src/host/layer23/src/mobile/subscriber.c @@ -711,7 +711,7 @@ uint8_t job; /* skip, if no real valid SIM */ - if (subscr->sim_type != GSM_SIM_TYPE_L1PHY) + if (!GSM_SIM_IS_READER(subscr->sim_type)) return; switch (mode) { @@ -790,7 +790,7 @@ #endif /* skip, if no real valid SIM */ - if (subscr->sim_type != GSM_SIM_TYPE_L1PHY || !subscr->sim_valid) + if (!GSM_SIM_IS_READER(subscr->sim_type) || !subscr->sim_valid) return 0; /* get tail list from "PLMN not allowed" */ @@ -844,7 +844,7 @@ struct gsm1111_ef_loci *loci; /* skip, if no real valid SIM */ - if (subscr->sim_type != GSM_SIM_TYPE_L1PHY || !subscr->sim_valid) + if (!GSM_SIM_IS_READER(subscr->sim_type) || !subscr->sim_valid) return 0; LOGP(DMM, LOGL_INFO, "Updating LOCI on SIM\n"); @@ -907,8 +907,7 @@ struct sim_hdr *nsh; /* not a SIM */ - if ((subscr->sim_type != GSM_SIM_TYPE_L1PHY - && subscr->sim_type != GSM_SIM_TYPE_TEST) + if (!GSM_SIM_IS_READER(subscr->sim_type) || !subscr->sim_valid || no_sim) { struct gsm48_mm_event *nmme; -- To view, visit https://gerrit.osmocom.org/12429 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I4b3080fa7a5332467a449a314ba3cc3a07a9b7df Gerrit-Change-Number: 12429 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181224/e1fcc092/attachment.htm>