aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-02-22 06:15:58 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-03-11 00:45:45 +0100
commit4ac7763bc7c861e7f28e8eead6f2327387f6e2a9 (patch)
treee02027e999ac74036653288af16207c49f659f04
parentcea3b51e2c2de9fea6d6cbd168edfa476d13b417 (diff)
pcu_if: implement support for 3-digit MNC
Add the mnc_3_digits member to the info_ind. Instead of changing to e.g. osmo_plmn_id, add the flag separately, and instead of bool use a uint8_t, to not raise any struct packing issues and clarify the flag's size beyond any doubt. Bump the PCU interface version to 9. This is one part of the three identical pcuif_proto.h patches: - I49cd762c3c9d7ee6a82451bdf3ffa2a060767947 (osmo-bts) - I787fed84a7b613158a5618dd5cffafe4e4927234 (osmo-pcu) - I78f30aef7aa224b2e9db54c3a844d8f520b3aee0 (osmo-bsc) Depends: Id2240f7f518494c9df6c8bda52c0d5092f90f221 (libosmocore) Change-Id: I78f30aef7aa224b2e9db54c3a844d8f520b3aee0
-rw-r--r--include/osmocom/bsc/pcuif_proto.h6
-rw-r--r--src/libbsc/pcu_sock.c2
2 files changed, 5 insertions, 3 deletions
diff --git a/include/osmocom/bsc/pcuif_proto.h b/include/osmocom/bsc/pcuif_proto.h
index ced783eec..b9f61b6f1 100644
--- a/include/osmocom/bsc/pcuif_proto.h
+++ b/include/osmocom/bsc/pcuif_proto.h
@@ -3,7 +3,7 @@
#include <osmocom/gsm/l1sap.h>
-#define PCU_IF_VERSION 0x08
+#define PCU_IF_VERSION 0x09
#define TXT_MAX_LEN 128
/* msg_type */
@@ -120,7 +120,9 @@ struct gsm_pcu_if_info_ind {
struct gsm_pcu_if_info_trx trx[8]; /* TRX infos per BTS */
uint8_t bsic;
/* RAI */
- uint16_t mcc, mnc, lac, rac;
+ uint16_t mcc, mnc;
+ uint8_t mnc_3_digits;
+ uint16_t lac, rac;
/* NSE */
uint16_t nsei;
uint8_t nse_timer[7];
diff --git a/src/libbsc/pcu_sock.c b/src/libbsc/pcu_sock.c
index 85af59842..caec40d20 100644
--- a/src/libbsc/pcu_sock.c
+++ b/src/libbsc/pcu_sock.c
@@ -154,7 +154,7 @@ static int pcu_tx_info_ind(struct gsm_bts *bts)
/* RAI */
info_ind->mcc = bts->network->plmn.mcc;
info_ind->mnc = bts->network->plmn.mnc;
- /* TODO: plmn.mnc_3_digits */
+ info_ind->mnc_3_digits = bts->network->plmn.mnc_3_digits;
info_ind->lac = bts->location_area_code;
info_ind->rac = bts->gprs.rac;