lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

May 2022

  • 2 participants
  • 1343 discussions
Change in osmo-e1-hardware[master]: gateware/common: Unify a bit with other repo
by laforge 03 May '22

03 May '22
Attention is currently required from: tnt. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1-hardware/+/28008 ) Change subject: gateware/common: Unify a bit with other repo ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/28008 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-hardware Gerrit-Branch: master Gerrit-Change-Id: Icb7bea1cf7243e9ace819cd567eb006fcc71c808 Gerrit-Change-Number: 28008 Gerrit-PatchSet: 1 Gerrit-Owner: tnt <tnt(a)246tNt.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: tnt <tnt(a)246tNt.com> Gerrit-Comment-Date: Tue, 03 May 2022 12:48:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[2022q1]: smscb: Always start ETWS timer even in cells without ETWS support
by laforge 03 May '22

03 May '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28017 ) Change subject: smscb: Always start ETWS timer even in cells without ETWS support ...................................................................... smscb: Always start ETWS timer even in cells without ETWS support ETWS is sent over both dedicated channels and broadcast channels. Some BTS models may not support the latter, but it is still useful to start the related timer to ensure bts->etws.active gets set to false after the emergency period has concluded. Change-Id: I448be9fd75b87c1f7333a5bfa4f6ba238569fdc3 (cherry picked from commit bcd0f63dce341878bc3e4e67dd2cb29507ba1f39) --- M src/osmo-bsc/smscb.c 1 file changed, 7 insertions(+), 5 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/smscb.c b/src/osmo-bsc/smscb.c index fc347eb..208c203 100644 --- a/src/osmo-bsc/smscb.c +++ b/src/osmo-bsc/smscb.c @@ -538,13 +538,15 @@ if (osmo_bts_has_feature(&bts->features, BTS_FEAT_ETWS_PN)) { rsl_etws_pn_command(bts, RSL_CHAN_PCH_AGCH, bes->primary, sizeof(bes->primary)); LOG_BTS(bts, DCBS, LOGL_NOTICE, "Sent ETWS Primary Notification via common channel\n"); - if (wrepl->u.emergency.warning_period != 0xffffffff) { - osmo_timer_schedule(&bts->etws.timer, wrepl->u.emergency.warning_period, 0); - } else - LOG_BTS(bts, DCBS, LOGL_NOTICE, "Unlimited ETWS PN broadcast, this breaks " - "normal network operation due to PCH blockage\n"); } else LOG_BTS(bts, DCBS, LOGL_ERROR, "BTS doesn't support RSL command for ETWS PN\n"); + + /* start the expiration timer, if any */ + if (wrepl->u.emergency.warning_period != 0xffffffff) { + osmo_timer_schedule(&bts->etws.timer, wrepl->u.emergency.warning_period, 0); + } else + LOG_BTS(bts, DCBS, LOGL_NOTICE, "Unlimited ETWS PN broadcast, this breaks " + "normal network operation due to PCH blockage\n"); } /*! Try to execute a write-replace operation; roll-back if it fails. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28017 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: 2022q1 Gerrit-Change-Id: I448be9fd75b87c1f7333a5bfa4f6ba238569fdc3 Gerrit-Change-Number: 28017 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-bsc[2022q1]: cbsp: Implement KILL for Emergency Broadcast
by laforge 03 May '22

03 May '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28018 ) Change subject: cbsp: Implement KILL for Emergency Broadcast ...................................................................... cbsp: Implement KILL for Emergency Broadcast So far, we only implemented KILL for CBS, but not for Emergency broadcasts. This patch adds KILL support for Emergency, by which a CBC can terminate broadcast of a previously-started Emergency message before its scheduled period ends. Change-Id: Ie91939b93de6847eeb5d00c97a137c43721c2711 Closes: OS#5540 Related: SYS#5906 (cherry picked from commit 7a982712ac258c9b0b1df64fba181a7beaefa5f2) --- M src/osmo-bsc/smscb.c 1 file changed, 49 insertions(+), 13 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/smscb.c b/src/osmo-bsc/smscb.c index 208c203..8ec239a 100644 --- a/src/osmo-bsc/smscb.c +++ b/src/osmo-bsc/smscb.c @@ -243,6 +243,12 @@ llist_add_tail(&cent->list, &r_state->num_completed.list); } +static bool etws_msg_id_matches(uint16_t a, uint16_t b) +{ + /* ETWS messages are identified by the twelve most significant bits of the Message ID */ + return (a & 0xFFF0) == (b & 0xFFF0); +} + /*! Iterate over all BTSs, find matching ones, execute command on BTS, add result * to succeeded/failed lists. * \param[in] net GSM network in which we operate @@ -665,23 +671,53 @@ struct response_state *r_state, void *priv) { const struct osmo_cbsp_kill *kill = &dec->u.kill; - struct bts_smscb_chan_state *chan_state; - struct bts_smscb_message *smscb; - bool extended = false; - if (kill->channel_ind && *kill->channel_ind == 0x01) - extended = true; - chan_state = bts_get_smscb_chan(bts, extended); + if (kill->channel_ind) { + /* KILL for CBS message */ + struct bts_smscb_chan_state *chan_state; + struct bts_smscb_message *smscb; + bool extended = false; - /* Find message by msg_id + old_serial_nr */ - smscb = bts_find_smscb(chan_state, kill->msg_id, kill->old_serial_nr); - if (!smscb) - return -CBSP_CAUSE_MSG_REF_NOT_IDENTIFIED; + if (*kill->channel_ind == 0x01) + extended = true; - append_bcast_compl(r_state, chan_state->bts, smscb); + chan_state = bts_get_smscb_chan(bts, extended); - /* Remove it */ - bts_smscb_del(smscb, chan_state, "KILL"); + /* Find message by msg_id + old_serial_nr */ + smscb = bts_find_smscb(chan_state, kill->msg_id, kill->old_serial_nr); + if (!smscb) + return -CBSP_CAUSE_MSG_REF_NOT_IDENTIFIED; + + append_bcast_compl(r_state, chan_state->bts, smscb); + + /* Remove it */ + bts_smscb_del(smscb, chan_state, "KILL"); + } else { + /* KILL for Emergency */ + struct bts_etws_state *bes = &bts->etws; + + if (!bes->active) { + LOG_BTS(bts, DCBS, LOGL_NOTICE, "Rx CBSP KILL (Emerg) but no emergency " + "broadcast is currently active in this cell\n"); + return -CBSP_CAUSE_MSG_REF_NOT_IDENTIFIED; + } + + if (kill->msg_id != bes->input.msg_id) { + LOG_BTS(bts, DCBS, LOGL_NOTICE, "Rx CBSP KILL (Emerg) for msg_id 0x%04x, but " + "current emergency msg_id is 0x%04x\n", kill->msg_id, bes->input.msg_id); + return -CBSP_CAUSE_MSG_REF_NOT_IDENTIFIED; + } + + if (!etws_msg_id_matches(kill->old_serial_nr, bes->input.serial_nr)) { + LOG_BTS(bts, DCBS, LOGL_NOTICE, "Rx CBSP KILL (Emerg) for old_serial_nr 0x%04x, but " + "current emergency serial_nr is 0x%04x\n", + kill->old_serial_nr, bes->input.serial_nr); + return -CBSP_CAUSE_MSG_REF_NOT_IDENTIFIED; + } + + /* stop broadcasting the PN in this BTS */ + etws_pn_stop(bts, false); + } return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28018 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: 2022q1 Gerrit-Change-Id: Ie91939b93de6847eeb5d00c97a137c43721c2711 Gerrit-Change-Number: 28018 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-bsc[2022q1]: cbsp: Reject CBSP WRITE for emergency if emergency already active
by laforge 03 May '22

03 May '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28019 ) Change subject: cbsp: Reject CBSP WRITE for emergency if emergency already active ...................................................................... cbsp: Reject CBSP WRITE for emergency if emergency already active From 3GPP TS 48.018: If only the New Serial Number IE, and not the Old Serial Number IE, is included in the WRITE-REPLACE message,then the BSC shall interpret the message as a write request, i.e. a broadcast request of a new emergency message without replacing an ongoing emergency message broadcast. Only one emergency message at the time can be broadcasted in a cell. If a write request is received for a cell where an emergency message broadcast is currently ongoing, the write request is considered as failed. Change-Id: I376c9e796f3a2d26b22d0451f15ef1debbd7f656 Closes: OS#5539 Related: SYS#5906 (cherry picked from commit 24567cfeed0ba9c0422e88f65cd1a9a489a197b6) --- M src/osmo-bsc/smscb.c 1 file changed, 28 insertions(+), 3 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/smscb.c b/src/osmo-bsc/smscb.c index 8ec239a..8a6a705 100644 --- a/src/osmo-bsc/smscb.c +++ b/src/osmo-bsc/smscb.c @@ -494,13 +494,37 @@ etws_pn_stop(bts, true); } -static void etws_primary_to_bts(struct gsm_bts *bts, const struct osmo_cbsp_write_replace *wrepl) +static int etws_primary_to_bts(struct gsm_bts *bts, const struct osmo_cbsp_write_replace *wrepl) { struct bts_etws_state *bes = &bts->etws; struct gsm_bts_trx *trx; unsigned int count = 0; int i, j; + if (bes->active) { + /* we were already broadcasting emergency before receiving this WRITE-REPLACE */ + + /* If only the New Serial Number IE, and not the Old Serial Number IE, is included in the + * WRITE-REPLACE message, then the BSC shall interpret the message as a write request, i.e. a + * broadcast request of a new emergency message without replacing an ongoing emergency message + * broadcast. */ + if (!wrepl->old_serial_nr) { + /* If a write request is received for a cell where an emergency message broadcast is + * currently ongoing, the write request is considered as failed */ + LOG_BTS(bts, DCBS, LOGL_NOTICE, "Rx CBSP WRITE rejected due to ongoing emergency " + "while no Old Serial Nr IE present in CBSP WRITE\n"); + return -CBSP_CAUSE_BSC_CAPACITY_EXCEEDED; + } + + if (!etws_msg_id_matches(*wrepl->old_serial_nr, bes->input.serial_nr)) { + LOG_BTS(bts, DCBS, LOGL_NOTICE, "Rx CBSP WRITE-REPLACE old_serial 0x%04x doesn't match " + "current serial 0x%04x. Is the CBC confused?\n", + *wrepl->old_serial_nr, bes->input.serial_nr); + /* we allow the WRITE-REPLACE to continue, TS 48.049 doesn't specify how to + * handle situations like this */ + } + } + if (bes->input.sec_info) { talloc_free(bes->input.sec_info); bes->input.sec_info = NULL; @@ -553,6 +577,8 @@ } else LOG_BTS(bts, DCBS, LOGL_NOTICE, "Unlimited ETWS PN broadcast, this breaks " "normal network operation due to PCH blockage\n"); + + return 0; } /*! Try to execute a write-replace operation; roll-back if it fails. @@ -624,8 +650,7 @@ int rc; if (!wrepl->is_cbs) { - etws_primary_to_bts(bts, wrepl); - return 0; + return etws_primary_to_bts(bts, wrepl); } /* check if cell has a CBCH at all */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28019 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: 2022q1 Gerrit-Change-Id: I376c9e796f3a2d26b22d0451f15ef1debbd7f656 Gerrit-Change-Number: 28019 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-bsc[2022q1]: smscb: Don't include extraneous IEs in CBSP KILL COMPLETE / FAILURE
by laforge 03 May '22

03 May '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28015 ) Change subject: smscb: Don't include extraneous IEs in CBSP KILL COMPLETE / FAILURE ...................................................................... smscb: Don't include extraneous IEs in CBSP KILL COMPLETE / FAILURE TS 48.049 states the following rules for the KILL COMPLETE / FAILURE messages: The Number of Broadcasts Completed List IE, if present, contains for each cell the total number of broadcasts of the killed CBS message. The Cell List IE, if present, contains the cells in which the emergency message is successfully terminated. As any message can only be either emergency or CBS, this means that we can (at maximum) have only one of those two IEs in the message. As there is no explicit indication in the KILL whether it relates to CBS or Emergency, we use the "Channel Indicator" IE, which is specified as "only included if the message refers to a CBS message". Related: SYS#5906 Closes: OS#5541 Change-Id: I9a43d386da01f085663d231a555b8b5acc99faca (cherry picked from commit 5e7458cbd8d38b3a2d8f3444c79aa03e82104ade) --- M src/osmo-bsc/smscb.c 1 file changed, 20 insertions(+), 10 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/smscb.c b/src/osmo-bsc/smscb.c index 5fe6345..c89bedb 100644 --- a/src/osmo-bsc/smscb.c +++ b/src/osmo-bsc/smscb.c @@ -791,11 +791,16 @@ fail->channel_ind = kill->channel_ind; llist_replace_head(&fail->fail_list, &r_state->fail); - fail->cell_list.id_discr = r_state->success.id_discr; - llist_replace_head(&fail->cell_list.list, &r_state->success.list); - - fail->num_compl_list.id_discr = r_state->num_completed.id_discr; - llist_replace_head(&fail->num_compl_list.list, &r_state->num_completed.list); + /* if the KILL relates to CBS, the "Channel Indicator" IE is present */ + if (kill->channel_ind) { + /* only if it was CBS */ + fail->num_compl_list.id_discr = r_state->num_completed.id_discr; + llist_replace_head(&fail->num_compl_list.list, &r_state->num_completed.list); + } else { + /* only if it was emergency */ + fail->cell_list.id_discr = r_state->success.id_discr; + llist_replace_head(&fail->cell_list.list, &r_state->success.list); + } } else { resp = osmo_cbsp_decoded_alloc(cbc, CBSP_MSGT_KILL_COMPL); struct osmo_cbsp_kill_complete *compl = &resp->u.kill_compl; @@ -803,11 +808,16 @@ compl->old_serial_nr = kill->old_serial_nr; compl->channel_ind = kill->channel_ind; - compl->cell_list.id_discr = r_state->success.id_discr; - llist_replace_head(&compl->cell_list.list, &r_state->success.list); - - compl->num_compl_list.id_discr = r_state->num_completed.id_discr; - llist_replace_head(&compl->num_compl_list.list, &r_state->num_completed.list); + /* if the KILL relates to CBS, the "Channel Indicator" IE is present */ + if (kill->channel_ind) { + /* only if it was CBS */ + compl->num_compl_list.id_discr = r_state->num_completed.id_discr; + llist_replace_head(&compl->num_compl_list.list, &r_state->num_completed.list); + } else { + /* only if it was emergency */ + compl->cell_list.id_discr = r_state->success.id_discr; + llist_replace_head(&compl->cell_list.list, &r_state->success.list); + } } cbsp_tx_decoded(cbc, resp); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28015 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: 2022q1 Gerrit-Change-Id: I9a43d386da01f085663d231a555b8b5acc99faca Gerrit-Change-Number: 28015 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-bsc[2022q1]: smscb: Store ETWS input state from CBSP
by laforge 03 May '22

03 May '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28016 ) Change subject: smscb: Store ETWS input state from CBSP ...................................................................... smscb: Store ETWS input state from CBSP Only if we store data like the CBSP message_id and serial_number we are able to later (in a subsequent patch) match a CBSP KILL for ETWS/PWS and stop emergency broadcast. Change-Id: Ide74638880d7e3c6a7c774bf6320d3dce4b11c74 Related: OS#5540 (cherry picked from commit 484f535c5091e3ca62547f8bbb6e06844c2ce8ae) --- M include/osmocom/bsc/bts.h M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/smscb.h M src/osmo-bsc/bts.c M src/osmo-bsc/smscb.c 5 files changed, 73 insertions(+), 15 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h index cd0f8cb..d3c2ba7 100644 --- a/include/osmocom/bsc/bts.h +++ b/include/osmocom/bsc/bts.h @@ -586,7 +586,7 @@ struct osmo_timer_list cbch_timer; struct bts_smscb_chan_state cbch_basic; struct bts_smscb_chan_state cbch_extended; - struct osmo_timer_list etws_timer; /* when to stop ETWS PN */ + struct bts_etws_state etws; struct llist_head oml_fail_rep; struct llist_head chan_rqd_queue; diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 4a58c2b..b69ebf4 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -1106,6 +1106,27 @@ uint8_t overflow; }; +#define ETWS_PRIM_NOTIF_SIZE 56 +#define ETWS_SEC_INFO_SIZE (ETWS_PRIM_NOTIF_SIZE - sizeof(struct gsm341_etws_message)) + +/* per-BTS ETWS/PWS (Emergency) state */ +struct bts_etws_state { + /* are we actively broadcasting emergency in this cell? */ + bool active; + /* input parameters received from CBC */ + struct { + uint16_t msg_id; + uint16_t serial_nr; + uint16_t warn_type; + uint8_t *sec_info; + } input; + /* encoded ETWS primary notification */ + uint8_t primary[ETWS_PRIM_NOTIF_SIZE]; + + /* timer running for the duration of the ETWS Primary Notification (PN) */ + struct osmo_timer_list timer; +}; + struct bts_oml_fail_rep { struct llist_head list; time_t time; diff --git a/include/osmocom/bsc/smscb.h b/include/osmocom/bsc/smscb.h index f48c1a1..5b0905b 100644 --- a/include/osmocom/bsc/smscb.h +++ b/include/osmocom/bsc/smscb.h @@ -64,3 +64,5 @@ void cbc_vty_init(void); int bsc_cbc_link_restart(void); int cbsp_tx_decoded(struct bsc_cbc_link *cbc, struct osmo_cbsp_decoded *decoded); + +void bts_etws_init(struct gsm_bts *bts); diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c index 843d711..1024cfe 100644 --- a/src/osmo-bsc/bts.c +++ b/src/osmo-bsc/bts.c @@ -24,6 +24,7 @@ #include <osmocom/bsc/bts.h> #include <osmocom/bsc/debug.h> #include <osmocom/bsc/nm_common_fsm.h> +#include <osmocom/bsc/smscb.h> const struct value_string bts_attribute_names[] = { OSMO_VALUE_STRING(BTS_TYPE_VARIANT), @@ -393,6 +394,7 @@ bts_init_cbch_state(&bts->cbch_basic, bts); bts_init_cbch_state(&bts->cbch_extended, bts); + bts_etws_init(bts); acc_mgr_init(&bts->acc_mgr, bts); acc_ramp_init(&bts->acc_ramp, bts); diff --git a/src/osmo-bsc/smscb.c b/src/osmo-bsc/smscb.c index c89bedb..fc347eb 100644 --- a/src/osmo-bsc/smscb.c +++ b/src/osmo-bsc/smscb.c @@ -59,8 +59,6 @@ INIT_LLIST_HEAD(old); } -#define ETWS_PRIM_NOTIF_SIZE 56 - /* Build a ETWS Primary Notification message as per TS 23.041 9.4.1.3 */ static int gen_etws_primary_notification(uint8_t *out, uint16_t serial_nr, uint16_t msg_id, uint16_t warn_type, const uint8_t *sec_info) @@ -471,24 +469,52 @@ * Per-BTS Processing of CBSP from CBC, called via cbsp_per_bts() *********************************************************************************/ +static void etws_pn_stop(struct gsm_bts *bts, bool timeout) +{ + if (osmo_bts_has_feature(&bts->features, BTS_FEAT_ETWS_PN)) { + LOG_BTS(bts, DCBS, LOGL_NOTICE, "ETWS PN broadcast via PCH disabled (cause=%s)\n", + timeout ? "timeout" : "request"); + rsl_etws_pn_command(bts, RSL_CHAN_PCH_AGCH, NULL, 0); + } + bts->etws.active = false; + if (!timeout) + osmo_timer_del(&bts->etws.timer); +} + /* timer call-back once ETWS warning period has expired */ static void etws_pn_cb(void *data) { struct gsm_bts *bts = (struct gsm_bts *)data; - LOG_BTS(bts, DCBS, LOGL_NOTICE, "ETWS PN Timeout; disabling broadcast via PCH\n"); - rsl_etws_pn_command(bts, RSL_CHAN_PCH_AGCH, NULL, 0); + etws_pn_stop(bts, true); } static void etws_primary_to_bts(struct gsm_bts *bts, const struct osmo_cbsp_write_replace *wrepl) { - uint8_t etws_primary[ETWS_PRIM_NOTIF_SIZE]; + struct bts_etws_state *bes = &bts->etws; struct gsm_bts_trx *trx; unsigned int count = 0; int i, j; - gen_etws_primary_notification(etws_primary, wrepl->new_serial_nr, wrepl->msg_id, - wrepl->u.emergency.warning_type, - wrepl->u.emergency.warning_sec_info); + if (bes->input.sec_info) { + talloc_free(bes->input.sec_info); + bes->input.sec_info = NULL; + } + + /* copy over all the data to per-BTS private state */ + bes->input.msg_id = wrepl->msg_id; + bes->input.serial_nr = wrepl->new_serial_nr; + bes->input.warn_type = wrepl->u.emergency.warning_type; + if (wrepl->u.emergency.warning_sec_info) { + bes->input.sec_info = talloc_named_const(bts, ETWS_SEC_INFO_SIZE, "etws_sec_info"); + if (bes->input.sec_info) + memcpy(bes->input.sec_info, wrepl->u.emergency.warning_sec_info, ETWS_SEC_INFO_SIZE); + } + + /* generate the encoded ETWS PN */ + gen_etws_primary_notification(bes->primary, bes->input.serial_nr, bes->input.msg_id, + bes->input.warn_type, bes->input.sec_info); + + bes->active = true; /* iterate over all lchan in each TS in each TRX of this BTS */ llist_for_each_entry(trx, &bts->trx_list, list) { @@ -498,8 +524,8 @@ struct gsm_lchan *lchan = &ts->lchan[j]; if (!lchan_may_receive_data(lchan)) continue; - gsm48_send_rr_app_info(lchan, 0x1, 0x0, etws_primary, - sizeof(etws_primary)); + gsm48_send_rr_app_info(lchan, 0x1, 0x0, bes->primary, + sizeof(bes->primary)); count++; } } @@ -510,11 +536,10 @@ /* Notify BTS of primary ETWS notification via vendor-specific Abis message */ if (osmo_bts_has_feature(&bts->features, BTS_FEAT_ETWS_PN)) { - rsl_etws_pn_command(bts, RSL_CHAN_PCH_AGCH, etws_primary, sizeof(etws_primary)); + rsl_etws_pn_command(bts, RSL_CHAN_PCH_AGCH, bes->primary, sizeof(bes->primary)); LOG_BTS(bts, DCBS, LOGL_NOTICE, "Sent ETWS Primary Notification via common channel\n"); if (wrepl->u.emergency.warning_period != 0xffffffff) { - osmo_timer_setup(&bts->etws_timer, etws_pn_cb, bts); - osmo_timer_schedule(&bts->etws_timer, wrepl->u.emergency.warning_period, 0); + osmo_timer_schedule(&bts->etws.timer, wrepl->u.emergency.warning_period, 0); } else LOG_BTS(bts, DCBS, LOGL_NOTICE, "Unlimited ETWS PN broadcast, this breaks " "normal network operation due to PCH blockage\n"); @@ -676,7 +701,7 @@ llist_for_each_entry_safe(smscb, smscb2, &chan_state->messages, list) bts_smscb_del(smscb, chan_state, "RESET"); - osmo_timer_del(&bts->etws_timer); + osmo_timer_del(&bts->etws.timer); /* Make sure that broadcast is disabled */ rsl_etws_pn_command(bts, RSL_CHAN_PCH_AGCH, NULL, 0); @@ -991,3 +1016,11 @@ { install_element_ve(&bts_show_cbs_cmd); } + + +/* initialize the ETWS state of a BTS */ +void bts_etws_init(struct gsm_bts *bts) +{ + bts->etws.active = false; + osmo_timer_setup(&bts->etws.timer, etws_pn_cb, bts); +} -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28016 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: 2022q1 Gerrit-Change-Id: Ide74638880d7e3c6a7c774bf6320d3dce4b11c74 Gerrit-Change-Number: 28016 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-bsc[2022q1]: cbsp: Reject CBSP WRITE for emergency if emergency already active
by laforge 03 May '22

03 May '22
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28019 ) Change subject: cbsp: Reject CBSP WRITE for emergency if emergency already active ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28019 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: 2022q1 Gerrit-Change-Id: I376c9e796f3a2d26b22d0451f15ef1debbd7f656 Gerrit-Change-Number: 28019 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Tue, 03 May 2022 12:06:58 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[2022q1]: cbsp: Implement KILL for Emergency Broadcast
by laforge 03 May '22

03 May '22
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28018 ) Change subject: cbsp: Implement KILL for Emergency Broadcast ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28018 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: 2022q1 Gerrit-Change-Id: Ie91939b93de6847eeb5d00c97a137c43721c2711 Gerrit-Change-Number: 28018 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Tue, 03 May 2022 12:06:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[2022q1]: smscb: Always start ETWS timer even in cells without ETWS support
by laforge 03 May '22

03 May '22
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28017 ) Change subject: smscb: Always start ETWS timer even in cells without ETWS support ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28017 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: 2022q1 Gerrit-Change-Id: I448be9fd75b87c1f7333a5bfa4f6ba238569fdc3 Gerrit-Change-Number: 28017 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Tue, 03 May 2022 12:06:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[2022q1]: smscb: Store ETWS input state from CBSP
by laforge 03 May '22

03 May '22
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28016 ) Change subject: smscb: Store ETWS input state from CBSP ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28016 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: 2022q1 Gerrit-Change-Id: Ide74638880d7e3c6a7c774bf6320d3dce4b11c74 Gerrit-Change-Number: 28016 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Tue, 03 May 2022 12:06:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • ...
  • 135
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.