diff options
author | Max <msuraev@sysmocom.de> | 2017-09-01 16:13:02 +0200 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2017-09-01 16:13:02 +0200 |
commit | bbf6c435f60083b3e964843a6461df5bdc04fd85 (patch) | |
tree | ddcb64c2e082c5a8fc7c7d25134119ae6dfa98d2 | |
parent | 6384c73fbfd852d45a63b729389afa2f92e02fb2 (diff) |
Support removing SI13 from PCU
If SI13 becomes unavailable in runtime than send 0-length message with
BCCH SAPI to PCU to indicate that SI13 have to be removed.
Change-Id: I72aef8bd98f21c4b5ea6eed21fc56b30d85bfc1b
Related: OS#2400
-rw-r--r-- | include/osmo-bts/pcu_if.h | 2 | ||||
-rw-r--r-- | src/common/pcu_sock.c | 10 | ||||
-rw-r--r-- | src/common/rsl.c | 4 |
3 files changed, 9 insertions, 7 deletions
diff --git a/include/osmo-bts/pcu_if.h b/include/osmo-bts/pcu_if.h index ba3873e1..43778336 100644 --- a/include/osmo-bts/pcu_if.h +++ b/include/osmo-bts/pcu_if.h @@ -6,7 +6,7 @@ extern int pcu_direct; int pcu_tx_info_ind(void); -int pcu_tx_si13(const struct gsm_bts *bts); +int pcu_tx_si13(const struct gsm_bts *bts, bool enable); int pcu_tx_rts_req(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn, uint16_t arfcn, uint8_t block_nr); int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn, diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index 0a9ba2db..e5bcf579 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -535,7 +535,7 @@ static int pcu_rx_data_req(struct gsm_bts *bts, uint8_t msg_type, return rc; } -int pcu_tx_si13(const struct gsm_bts *bts) +int pcu_tx_si13(const struct gsm_bts *bts, bool enable) { /* the SI is per-BTS so it doesn't matter which TRX we use */ struct gsm_bts_trx *trx = gsm_bts_trx_num(bts, 0); @@ -543,7 +543,7 @@ int pcu_tx_si13(const struct gsm_bts *bts) /* The low-level data like FN, ARFCN etc will be ignored but we have to set lqual high enough to bypass the check at lower levels */ int rc = pcu_tx_data_ind(&trx->ts[0], PCU_IF_SAPI_BCCH, 0, 0, 0, GSM_BTS_SI(bts, SYSINFO_TYPE_13), - GSM_MACBLOCK_LEN, 0, 0, 0, INT16_MAX); + enable ? GSM_MACBLOCK_LEN : 0, 0, 0, 0, INT16_MAX); if (rc < 0) LOGP(DPCU, LOGL_NOTICE, "Failed to send SI13 to PCU: %d\n", rc); @@ -561,9 +561,9 @@ static int pcu_rx_txt_ind(struct gsm_bts *bts, osmo_strlcpy(bts->pcu_version, txt->text, MAX_VERSION_LENGTH); if (GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_13)) - return pcu_tx_si13(bts); - else - LOGP(DPCU, LOGL_INFO, "SI13 is not available on PCU connection\n"); + return pcu_tx_si13(bts, true); + + LOGP(DPCU, LOGL_INFO, "SI13 is not available on PCU connection\n"); break; case PCU_OML_ALERT: osmo_signal_dispatch(SS_FAIL, OSMO_EVT_EXT_ALARM, txt->text); diff --git a/src/common/rsl.c b/src/common/rsl.c index 69ecf2e7..28dc2d07 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -308,7 +308,7 @@ static int rsl_rx_bcch_info(struct gsm_bts_trx *trx, struct msgb *msg) } if (SYSINFO_TYPE_13 == osmo_si) - pcu_tx_si13(trx->bts); + pcu_tx_si13(trx->bts, true); if (SYSINFO_TYPE_2quater == osmo_si) { si2q = (struct gsm48_system_information_type_2quater *) TLVP_VAL(&tp, RSL_IE_FULL_BCCH_INFO); @@ -353,6 +353,8 @@ static int rsl_rx_bcch_info(struct gsm_bts_trx *trx, struct msgb *msg) bts->si_valid &= ~(1 << osmo_si); LOGP(DRSL, LOGL_INFO, " RX RSL Disabling BCCH INFO (SI%s)\n", get_value_string(osmo_sitype_strs, osmo_si)); + if (SYSINFO_TYPE_13 == osmo_si) + pcu_tx_si13(trx->bts, false); } osmo_signal_dispatch(SS_GLOBAL, S_NEW_SYSINFO, bts); |