From dddafa60ea6e8168e5733d6c360f8e1f941a2d3b Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Fri, 14 Jan 2022 17:08:18 +0100 Subject: [PATCH] hbgw_hnbap: use osmo_plmn_from_bcd instead of gsm48_mcc_mnc_from_bcd The function gsm48_mcc_mnc_from_bcd is deprecated. Lets use osmo_plmn_from_bcd instead. Change-Id: I01406a4cf86d4f3ed162c9df55880941e54d654e --- src/osmo-hnbgw/hnbgw_hnbap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/osmo-hnbgw/hnbgw_hnbap.c b/src/osmo-hnbgw/hnbgw_hnbap.c index 5b92e4e..4c3a5c0 100644 --- a/src/osmo-hnbgw/hnbgw_hnbap.c +++ b/src/osmo-hnbgw/hnbgw_hnbap.c @@ -398,6 +398,7 @@ static int hnbgw_rx_hnb_register_req(struct hnb_context *ctx, ANY_t *in) struct hnb_context *hnb; HNBAP_HNBRegisterRequestIEs_t ies; int rc; + struct osmo_plmn_id plmn; rc = hnbap_decode_hnbregisterrequesties(&ies, in); if (rc < 0) { @@ -413,7 +414,9 @@ static int hnbgw_rx_hnb_register_req(struct hnb_context *ctx, ANY_t *in) ctx->id.sac = asn1str_to_u16(&ies.sac); ctx->id.rac = asn1str_to_u8(&ies.rac); ctx->id.cid = asn1bitstr_to_u28(&ies.cellIdentity); - gsm48_mcc_mnc_from_bcd(ies.plmNidentity.buf, &ctx->id.mcc, &ctx->id.mnc); + osmo_plmn_from_bcd(ies.plmNidentity.buf, &plmn); + ctx->id.mcc = plmn.mcc; + ctx->id.mnc = plmn.mnc; llist_for_each_entry(hnb, &ctx->gw->hnb_list, list) { if (hnb->hnb_registered && ctx != hnb && memcmp(&ctx->id, &hnb->id, sizeof(ctx->id)) == 0) {