mirror of https://gerrit.osmocom.org/libosmocore
bssgp_bvc_fsm: Add a hook to notify when a reset was acknowledged
Change-Id: If240dd13f0f674693018c93390386b2c8afb97af Related: SYS#5908
This commit is contained in:
parent
c17546faff
commit
5a11b46c74
|
@ -9,3 +9,4 @@
|
||||||
#library what description / commit summary line
|
#library what description / commit summary line
|
||||||
libosmogsm ABI BREAKAGE CELL_IDENT_WHOLE_GLOBAL_PS changed enum number
|
libosmogsm ABI BREAKAGE CELL_IDENT_WHOLE_GLOBAL_PS changed enum number
|
||||||
libosmogsm add struct member Add codec_list_bss_supported to gsm0808_handover_request_ack (more_items flag ensures ABI compat)
|
libosmogsm add struct member Add codec_list_bss_supported to gsm0808_handover_request_ack (more_items flag ensures ABI compat)
|
||||||
|
libosmogb ABI BREAKAGE Add reset_ack_notification function pointer to struct bssgp_bvc_fsm_ops
|
||||||
|
|
|
@ -40,6 +40,8 @@ struct bssgp_bvc_fsm_ops {
|
||||||
void (*reset_notification)(uint16_t nsei, uint16_t bvci, const struct gprs_ra_id *ra_id,
|
void (*reset_notification)(uint16_t nsei, uint16_t bvci, const struct gprs_ra_id *ra_id,
|
||||||
uint16_t cell_id, uint8_t cause, void *priv);
|
uint16_t cell_id, uint8_t cause, void *priv);
|
||||||
void (*rx_fc_bvc)(uint16_t nsei, uint16_t bvci, const struct bssgp2_flow_ctrl *fc, void *priv);
|
void (*rx_fc_bvc)(uint16_t nsei, uint16_t bvci, const struct bssgp2_flow_ctrl *fc, void *priv);
|
||||||
|
void (*reset_ack_notification)(uint16_t nsei, uint16_t bvci, const struct gprs_ra_id *ra_id,
|
||||||
|
uint16_t cell_id, uint8_t cause, void *priv);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct osmo_fsm_inst *
|
struct osmo_fsm_inst *
|
||||||
|
|
|
@ -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;
|
struct bvc_fsm_priv *bfp = fi->priv;
|
||||||
const struct tlv_parsed *tp = NULL;
|
const struct tlv_parsed *tp = NULL;
|
||||||
struct msgb *rx = NULL, *tx;
|
struct msgb *rx = NULL, *tx;
|
||||||
|
uint8_t cause;
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case BSSGP_BVCFSM_E_RX_RESET:
|
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 */
|
/* fall-through */
|
||||||
case BSSGP_BVCFSM_E_RX_RESET_ACK:
|
case BSSGP_BVCFSM_E_RX_RESET_ACK:
|
||||||
rx = data;
|
rx = data;
|
||||||
|
cause = bfp->last_reset_cause;
|
||||||
tp = (const struct tlv_parsed *) msgb_bcid(rx);
|
tp = (const struct tlv_parsed *) msgb_bcid(rx);
|
||||||
if (bfp->bvci == 0)
|
if (bfp->bvci == 0)
|
||||||
update_negotiated_features(fi, tp);
|
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);
|
osmo_fsm_inst_state_chg(fi, BSSGP_BVCFSM_S_BLOCKED, T1_SECS, T1);
|
||||||
} else
|
} else
|
||||||
osmo_fsm_inst_state_chg(fi, BSSGP_BVCFSM_S_UNBLOCKED, 0, 0);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue