aboutsummaryrefslogtreecommitdiffstats
path: root/src/gb
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2022-03-30 11:34:36 +0200
committerDaniel Willmann <dwillmann@sysmocom.de>2022-03-30 18:00:56 +0200
commit767bfd8c8718475b1a75f3f6b1383ac24eb94800 (patch)
tree210257f3bd88939eee9f4ab5754511e4eef3b2bd /src/gb
parentc17546faff2ecdc688cdcb25875a26492d43733e (diff)
bssgp_bvc_fsm: Add a hook to notify when a reset was acknowledged
There are cases where we want to be notified of a successful BVC reset, e.g. for a signalling because we can then start resetting the PtP-BVCs. With this hook it's now possible to do that. Change-Id: If240dd13f0f674693018c93390386b2c8afb97af Related: SYS#5908
Diffstat (limited to 'src/gb')
-rw-r--r--src/gb/bssgp_bvc_fsm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gb/bssgp_bvc_fsm.c b/src/gb/bssgp_bvc_fsm.c
index 664ad092..3a36c7dc 100644
--- a/src/gb/bssgp_bvc_fsm.c
+++ b/src/gb/bssgp_bvc_fsm.c
@@ -375,6 +375,7 @@ static void bssgp_bvc_fsm_wait_reset_ack(struct osmo_fsm_inst *fi, uint32_t even
struct bvc_fsm_priv *bfp = fi->priv;
const struct tlv_parsed *tp = NULL;
struct msgb *rx = NULL, *tx;
+ uint8_t cause;
switch (event) {
case BSSGP_BVCFSM_E_RX_RESET:
@@ -385,6 +386,7 @@ static void bssgp_bvc_fsm_wait_reset_ack(struct osmo_fsm_inst *fi, uint32_t even
/* fall-through */
case BSSGP_BVCFSM_E_RX_RESET_ACK:
rx = data;
+ cause = bfp->last_reset_cause;
tp = (const struct tlv_parsed *) msgb_bcid(rx);
if (bfp->bvci == 0)
update_negotiated_features(fi, tp);
@@ -398,6 +400,8 @@ static void bssgp_bvc_fsm_wait_reset_ack(struct osmo_fsm_inst *fi, uint32_t even
osmo_fsm_inst_state_chg(fi, BSSGP_BVCFSM_S_BLOCKED, T1_SECS, T1);
} else
osmo_fsm_inst_state_chg(fi, BSSGP_BVCFSM_S_UNBLOCKED, 0, 0);
+ if (bfp->ops && bfp->ops->reset_ack_notification)
+ bfp->ops->reset_ack_notification(bfp->nsei, bfp->bvci, &bfp->ra_id, bfp->cell_id, cause, bfp->ops_priv);
break;
}
}