diff --git a/include/osmocom/bsc/signal.h b/include/osmocom/bsc/signal.h index c787c894e..f775b5b89 100644 --- a/include/osmocom/bsc/signal.h +++ b/include/osmocom/bsc/signal.h @@ -131,8 +131,8 @@ struct nm_statechg_signal_data { struct gsm_bts *bts; uint8_t obj_class; void *obj; - struct gsm_nm_state *old_state; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *old_state; + const struct gsm_nm_state *new_state; /* This pointer is valid for TS 12.21 MO */ struct abis_om_obj_inst *obj_inst; diff --git a/src/ipaccess/ipaccess-config.c b/src/ipaccess/ipaccess-config.c index 8e3da495f..332e349ee 100644 --- a/src/ipaccess/ipaccess-config.c +++ b/src/ipaccess/ipaccess-config.c @@ -340,7 +340,7 @@ static int print_attr_rep(struct msgb *mb) } static int nm_state_event(int evt, uint8_t obj_class, void *obj, - struct gsm_nm_state *old_state, struct gsm_nm_state *new_state, + const struct gsm_nm_state *old_state, const struct gsm_nm_state *new_state, struct abis_om_obj_inst *obj_inst); static int nm_sig_cb(unsigned int subsys, unsigned int signal, @@ -677,7 +677,7 @@ out_err: } static int nm_state_event(int evt, uint8_t obj_class, void *obj, - struct gsm_nm_state *old_state, struct gsm_nm_state *new_state, + const struct gsm_nm_state *old_state, const struct gsm_nm_state *new_state, struct abis_om_obj_inst *obj_inst) { if (obj_class == NM_OC_BASEB_TRANSC) { diff --git a/src/osmo-bsc/nm_bb_transc_fsm.c b/src/osmo-bsc/nm_bb_transc_fsm.c index 9f2a80487..dc8c68228 100644 --- a/src/osmo-bsc/nm_bb_transc_fsm.c +++ b/src/osmo-bsc/nm_bb_transc_fsm.c @@ -57,7 +57,7 @@ static void st_op_disabled_notinstalled_on_enter(struct osmo_fsm_inst *fi, uint3 static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_SW_ACT_REP: @@ -86,7 +86,7 @@ static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event } } -static void configure_loop(struct gsm_bts_bb_trx *bb_transc, struct gsm_nm_state *state, bool allow_opstart) +static void configure_loop(struct gsm_bts_bb_trx *bb_transc, const struct gsm_nm_state *state, bool allow_opstart) { struct gsm_bts_trx *trx = gsm_bts_bb_trx_get_trx(bb_transc); @@ -139,7 +139,7 @@ static void st_op_disabled_dependency(struct osmo_fsm_inst *fi, uint32_t event, { struct gsm_bts_bb_trx *bb_transc = (struct gsm_bts_bb_trx *)fi->priv; struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_GET_ATTR_REP: @@ -189,7 +189,7 @@ static void st_op_disabled_offline(struct osmo_fsm_inst *fi, uint32_t event, voi struct gsm_bts_bb_trx *bb_transc = (struct gsm_bts_bb_trx *)fi->priv; struct gsm_bts_trx *trx = gsm_bts_bb_trx_get_trx(bb_transc); struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_GET_ATTR_REP: @@ -248,7 +248,7 @@ static void st_op_enabled_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state static void st_op_enabled(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_STATE_CHG_REP: diff --git a/src/osmo-bsc/nm_bts_fsm.c b/src/osmo-bsc/nm_bts_fsm.c index 7e8228164..5216ec8a4 100644 --- a/src/osmo-bsc/nm_bts_fsm.c +++ b/src/osmo-bsc/nm_bts_fsm.c @@ -59,7 +59,7 @@ static void st_op_disabled_notinstalled_on_enter(struct osmo_fsm_inst *fi, uint3 static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_SW_ACT_REP: @@ -88,7 +88,7 @@ static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event } } -static void configure_loop(struct gsm_bts *bts, struct gsm_nm_state *state, bool allow_opstart) +static void configure_loop(struct gsm_bts *bts, const struct gsm_nm_state *state, bool allow_opstart) { struct msgb *msgb; @@ -164,7 +164,7 @@ static void st_op_disabled_dependency(struct osmo_fsm_inst *fi, uint32_t event, { struct gsm_bts *bts = (struct gsm_bts *)fi->priv; struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_GET_ATTR_REP: @@ -216,7 +216,7 @@ static void st_op_disabled_offline(struct osmo_fsm_inst *fi, uint32_t event, voi { struct gsm_bts *bts = (struct gsm_bts *)fi->priv; struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_GET_ATTR_REP: @@ -280,7 +280,7 @@ static void st_op_enabled_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state static void st_op_enabled(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_STATE_CHG_REP: diff --git a/src/osmo-bsc/nm_bts_sm_fsm.c b/src/osmo-bsc/nm_bts_sm_fsm.c index 1bb182df2..b99fb53f7 100644 --- a/src/osmo-bsc/nm_bts_sm_fsm.c +++ b/src/osmo-bsc/nm_bts_sm_fsm.c @@ -57,7 +57,7 @@ static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event struct gsm_bts_sm *site_mgr = (struct gsm_bts_sm *)fi->priv; struct gsm_bts *bts = gsm_bts_sm_get_bts(site_mgr); struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_SW_ACT_REP: @@ -102,7 +102,7 @@ static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event static void st_op_disabled_dependency(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_STATE_CHG_REP: @@ -142,7 +142,7 @@ static void st_op_disabled_offline_on_enter(struct osmo_fsm_inst *fi, uint32_t p static void st_op_disabled_offline(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_STATE_CHG_REP: @@ -173,7 +173,7 @@ static void st_op_disabled_offline(struct osmo_fsm_inst *fi, uint32_t event, voi static void st_op_enabled(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_STATE_CHG_REP: diff --git a/src/osmo-bsc/nm_channel_fsm.c b/src/osmo-bsc/nm_channel_fsm.c index 52ff4374f..a4f083937 100644 --- a/src/osmo-bsc/nm_channel_fsm.c +++ b/src/osmo-bsc/nm_channel_fsm.c @@ -58,7 +58,7 @@ static void st_op_disabled_notinstalled_on_enter(struct osmo_fsm_inst *fi, uint3 static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_SW_ACT_REP: @@ -87,7 +87,7 @@ static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event } } -static void configure_loop(struct gsm_bts_trx_ts *ts, struct gsm_nm_state *state, bool allow_opstart) +static void configure_loop(struct gsm_bts_trx_ts *ts, const struct gsm_nm_state *state, bool allow_opstart) { enum abis_nm_chan_comb ccomb; struct gsm_bts_trx *trx = ts->trx; @@ -128,7 +128,7 @@ static void st_op_disabled_dependency(struct osmo_fsm_inst *fi, uint32_t event, { struct gsm_bts_trx_ts *ts = (struct gsm_bts_trx_ts *)fi->priv; struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_SET_ATTR_ACK: @@ -177,7 +177,7 @@ static void st_op_disabled_offline(struct osmo_fsm_inst *fi, uint32_t event, voi { struct gsm_bts_trx_ts *ts = (struct gsm_bts_trx_ts *)fi->priv; struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_SET_ATTR_ACK: @@ -236,7 +236,7 @@ static void st_op_enabled_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state static void st_op_enabled(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_STATE_CHG_REP: diff --git a/src/osmo-bsc/nm_gprs_cell_fsm.c b/src/osmo-bsc/nm_gprs_cell_fsm.c index cc0924e24..cf91397af 100644 --- a/src/osmo-bsc/nm_gprs_cell_fsm.c +++ b/src/osmo-bsc/nm_gprs_cell_fsm.c @@ -57,7 +57,7 @@ static void st_op_disabled_notinstalled_on_enter(struct osmo_fsm_inst *fi, uint3 static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_SW_ACT_REP: @@ -86,7 +86,7 @@ static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event } } -static void configure_loop(struct gsm_gprs_cell *cell, struct gsm_nm_state *state, bool allow_opstart) +static void configure_loop(struct gsm_gprs_cell *cell, const struct gsm_nm_state *state, bool allow_opstart) { struct msgb *msgb; struct gsm_bts *bts = container_of(cell, struct gsm_bts, gprs.cell); @@ -138,7 +138,7 @@ static void st_op_disabled_dependency(struct osmo_fsm_inst *fi, uint32_t event, { struct gsm_gprs_cell *cell = (struct gsm_gprs_cell *)fi->priv; struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_SET_ATTR_ACK: @@ -188,7 +188,7 @@ static void st_op_disabled_offline(struct osmo_fsm_inst *fi, uint32_t event, voi struct gsm_gprs_cell *cell = (struct gsm_gprs_cell *)fi->priv; struct gsm_bts *bts = container_of(cell, struct gsm_bts, gprs.cell); struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_SET_ATTR_ACK: @@ -247,7 +247,7 @@ static void st_op_enabled_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state static void st_op_enabled(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_STATE_CHG_REP: diff --git a/src/osmo-bsc/nm_gprs_nse_fsm.c b/src/osmo-bsc/nm_gprs_nse_fsm.c index 10a774d42..2d6e13bb3 100644 --- a/src/osmo-bsc/nm_gprs_nse_fsm.c +++ b/src/osmo-bsc/nm_gprs_nse_fsm.c @@ -58,7 +58,7 @@ static void st_op_disabled_notinstalled_on_enter(struct osmo_fsm_inst *fi, uint3 static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_SW_ACT_REP: @@ -87,7 +87,7 @@ static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event } } -static void configure_loop(struct gsm_gprs_nse *nse, struct gsm_nm_state *state, bool allow_opstart) +static void configure_loop(struct gsm_gprs_nse *nse, const struct gsm_nm_state *state, bool allow_opstart) { struct msgb *msgb; struct gsm_bts_sm *bts_sm = container_of(nse, struct gsm_bts_sm, gprs.nse); @@ -139,7 +139,7 @@ static void st_op_disabled_dependency(struct osmo_fsm_inst *fi, uint32_t event, { struct gsm_gprs_nse *nse = (struct gsm_gprs_nse *)fi->priv; struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_SET_ATTR_ACK: @@ -189,7 +189,7 @@ static void st_op_disabled_offline(struct osmo_fsm_inst *fi, uint32_t event, voi struct gsm_gprs_nse *nse = (struct gsm_gprs_nse *)fi->priv; struct gsm_bts_sm *bts_sm = container_of(nse, struct gsm_bts_sm, gprs.nse); struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_SET_ATTR_ACK: @@ -248,7 +248,7 @@ static void st_op_enabled_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state static void st_op_enabled(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_STATE_CHG_REP: diff --git a/src/osmo-bsc/nm_gprs_nsvc_fsm.c b/src/osmo-bsc/nm_gprs_nsvc_fsm.c index 081134108..c2b7db3bb 100644 --- a/src/osmo-bsc/nm_gprs_nsvc_fsm.c +++ b/src/osmo-bsc/nm_gprs_nsvc_fsm.c @@ -59,7 +59,7 @@ static void st_op_disabled_notinstalled_on_enter(struct osmo_fsm_inst *fi, uint3 static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_FEATURE_NEGOTIATED: @@ -90,7 +90,7 @@ static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event } } -static void configure_loop(struct gsm_gprs_nsvc *nsvc, struct gsm_nm_state *state, bool allow_opstart) +static void configure_loop(struct gsm_gprs_nsvc *nsvc, const struct gsm_nm_state *state, bool allow_opstart) { struct msgb *msgb; @@ -151,7 +151,7 @@ static void st_op_disabled_dependency(struct osmo_fsm_inst *fi, uint32_t event, { struct gsm_gprs_nsvc *nsvc = (struct gsm_gprs_nsvc *)fi->priv; struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_FEATURE_NEGOTIATED: @@ -203,7 +203,7 @@ static void st_op_disabled_offline(struct osmo_fsm_inst *fi, uint32_t event, voi { struct gsm_gprs_nsvc *nsvc = (struct gsm_gprs_nsvc *)fi->priv; struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_FEATURE_NEGOTIATED: @@ -265,7 +265,7 @@ static void st_op_enabled_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state static void st_op_enabled(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_STATE_CHG_REP: diff --git a/src/osmo-bsc/nm_rcarrier_fsm.c b/src/osmo-bsc/nm_rcarrier_fsm.c index 325ec5617..0cdba681f 100644 --- a/src/osmo-bsc/nm_rcarrier_fsm.c +++ b/src/osmo-bsc/nm_rcarrier_fsm.c @@ -57,7 +57,7 @@ static void st_op_disabled_notinstalled_on_enter(struct osmo_fsm_inst *fi, uint3 static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_SW_ACT_REP: @@ -86,7 +86,7 @@ static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event } } -static void configure_loop(struct gsm_bts_trx *trx, struct gsm_nm_state *state, bool allow_opstart) +static void configure_loop(struct gsm_bts_trx *trx, const struct gsm_nm_state *state, bool allow_opstart) { struct msgb *msgb; @@ -134,7 +134,7 @@ static void st_op_disabled_dependency(struct osmo_fsm_inst *fi, uint32_t event, { struct gsm_bts_trx *trx = (struct gsm_bts_trx *)fi->priv; struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_SET_ATTR_ACK: @@ -183,7 +183,7 @@ static void st_op_disabled_offline(struct osmo_fsm_inst *fi, uint32_t event, voi { struct gsm_bts_trx *trx = (struct gsm_bts_trx *)fi->priv; struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_SET_ATTR_ACK: @@ -233,7 +233,7 @@ static void st_op_enabled_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state static void st_op_enabled(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nm_statechg_signal_data *nsd; - struct gsm_nm_state *new_state; + const struct gsm_nm_state *new_state; switch (event) { case NM_EV_STATE_CHG_REP: