bts_model_apply_oml(): Improve definition of parameter
The param is usually called obj_class, but here it is called kind. In any case, change the param to pass the related struct gsm_abis_mo (which still contains mo->obj_class), similar to what's done in other bts_model functions such as bts_model_opstart(). Change-Id: Ife2e98a791455d5f7e7052356d559af2f1d4d185
This commit is contained in:
parent
8894fe6f4c
commit
91a1295a5a
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include <osmocom/gsm/tlv.h>
|
||||
#include <osmocom/gsm/gsm_utils.h>
|
||||
#include <osmocom/gsm/protocol/gsm_12_21.h>
|
||||
|
||||
#include <osmo-bts/gsm_data.h>
|
||||
|
||||
|
@ -20,7 +21,8 @@ int bts_model_check_oml(struct gsm_bts *bts, uint8_t msg_type,
|
|||
struct tlv_parsed *old_attr, struct tlv_parsed *new_attr,
|
||||
void *obj);
|
||||
|
||||
int bts_model_apply_oml(struct gsm_bts *bts, const struct msgb *msg, int obj_kind, void *obj);
|
||||
int bts_model_apply_oml(struct gsm_bts *bts, const struct msgb *msg,
|
||||
struct gsm_abis_mo *mo, void *obj);
|
||||
|
||||
int bts_model_opstart(struct gsm_bts *bts, struct gsm_abis_mo *mo,
|
||||
void *obj);
|
||||
|
|
|
@ -128,7 +128,7 @@ static void st_op_disabled_offline(struct osmo_fsm_inst *fi, uint32_t event, voi
|
|||
case NM_EV_RX_SETATTR:
|
||||
setattr_data = (struct nm_fsm_ev_setattr_data *)data;
|
||||
rc = bts_model_apply_oml(trx->bts, setattr_data->msg,
|
||||
NM_OC_BASEB_TRANSC, bb_transc);
|
||||
&bb_transc->mo, bb_transc);
|
||||
bb_transc->mo.setattr_success = rc == 0;
|
||||
oml_fom_ack_nack_copy_msg(setattr_data->msg, rc);
|
||||
break;
|
||||
|
|
|
@ -116,7 +116,7 @@ static void st_op_disabled_offline(struct osmo_fsm_inst *fi, uint32_t event, voi
|
|||
switch (event) {
|
||||
case NM_EV_RX_SETATTR:
|
||||
setattr_data = (struct nm_fsm_ev_setattr_data *)data;
|
||||
rc = bts_model_apply_oml(bts, setattr_data->msg, NM_OC_BTS, bts);
|
||||
rc = bts_model_apply_oml(bts, setattr_data->msg, &bts->mo, bts);
|
||||
bts->mo.setattr_success = rc == 0;
|
||||
oml_fom_ack_nack_copy_msg(setattr_data->msg, rc);
|
||||
break;
|
||||
|
|
|
@ -100,7 +100,7 @@ static void st_op_disabled_dependency(struct osmo_fsm_inst *fi, uint32_t event,
|
|||
case NM_EV_RX_SETATTR:
|
||||
setattr_data = (struct nm_fsm_ev_setattr_data *)data;
|
||||
rc = bts_model_apply_oml(ts->trx->bts, setattr_data->msg,
|
||||
NM_OC_CHANNEL, ts);
|
||||
&ts->mo, ts);
|
||||
ts->mo.setattr_success = rc == 0;
|
||||
oml_fom_ack_nack_copy_msg(setattr_data->msg, rc);
|
||||
break;
|
||||
|
@ -146,7 +146,7 @@ static void st_op_disabled_offline(struct osmo_fsm_inst *fi, uint32_t event, voi
|
|||
case NM_EV_RX_SETATTR:
|
||||
setattr_data = (struct nm_fsm_ev_setattr_data *)data;
|
||||
rc = bts_model_apply_oml(ts->trx->bts, setattr_data->msg,
|
||||
NM_OC_CHANNEL, ts);
|
||||
&ts->mo, ts);
|
||||
ts->mo.setattr_success = rc == 0;
|
||||
oml_fom_ack_nack_copy_msg(setattr_data->msg, rc);
|
||||
break;
|
||||
|
|
|
@ -109,7 +109,7 @@ static void st_op_disabled_offline(struct osmo_fsm_inst *fi, uint32_t event, voi
|
|||
case NM_EV_RX_SETATTR:
|
||||
setattr_data = (struct nm_fsm_ev_setattr_data *)data;
|
||||
rc = bts_model_apply_oml(trx->bts, setattr_data->msg,
|
||||
NM_OC_RADIO_CARRIER, trx);
|
||||
&trx->mo, trx);
|
||||
trx->mo.setattr_success = rc == 0;
|
||||
oml_fom_ack_nack_copy_msg(setattr_data->msg, rc);
|
||||
break;
|
||||
|
|
|
@ -1801,7 +1801,8 @@ int bts_model_check_oml(struct gsm_bts *bts, uint8_t msg_type,
|
|||
}
|
||||
|
||||
/* callback from OML */
|
||||
int bts_model_apply_oml(struct gsm_bts *bts, const struct msgb *msg, int kind, void *obj)
|
||||
int bts_model_apply_oml(struct gsm_bts *bts, const struct msgb *msg,
|
||||
struct gsm_abis_mo *mo, void *obj)
|
||||
{
|
||||
struct abis_om_fom_hdr *foh = msgb_l3(msg);
|
||||
struct gsm_bts_trx *trx;
|
||||
|
|
|
@ -1810,7 +1810,8 @@ int bts_model_check_oml(struct gsm_bts *bts, uint8_t msg_type,
|
|||
}
|
||||
|
||||
/* callback from OML */
|
||||
int bts_model_apply_oml(struct gsm_bts *bts, const struct msgb *msg, int kind, void *obj)
|
||||
int bts_model_apply_oml(struct gsm_bts *bts, const struct msgb *msg,
|
||||
struct gsm_abis_mo *mo, void *obj)
|
||||
{
|
||||
struct abis_om_fom_hdr *foh = msgb_l3(msg);
|
||||
struct gsm_bts_trx *trx;
|
||||
|
|
|
@ -1742,7 +1742,8 @@ int bts_model_check_oml(struct gsm_bts *bts, uint8_t msg_type,
|
|||
}
|
||||
|
||||
/* callback from OML */
|
||||
int bts_model_apply_oml(struct gsm_bts *bts, const struct msgb *msg, int kind, void *obj)
|
||||
int bts_model_apply_oml(struct gsm_bts *bts, const struct msgb *msg,
|
||||
struct gsm_abis_mo *mo, void *obj)
|
||||
{
|
||||
struct abis_om_fom_hdr *foh = msgb_l3(msg);
|
||||
struct gsm_bts_trx *trx;
|
||||
|
|
|
@ -93,7 +93,8 @@ static uint8_t vbts_set_ts(struct gsm_bts_trx_ts *ts)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int bts_model_apply_oml(struct gsm_bts *bts, const struct msgb *msg, int kind, void *obj)
|
||||
int bts_model_apply_oml(struct gsm_bts *bts, const struct msgb *msg,
|
||||
struct gsm_abis_mo *mo, void *obj)
|
||||
{
|
||||
struct abis_om_fom_hdr *foh = msgb_l3(msg);
|
||||
int rc;
|
||||
|
|
|
@ -1714,7 +1714,8 @@ int bts_model_check_oml(struct gsm_bts *bts, uint8_t msg_type,
|
|||
}
|
||||
|
||||
/* callback from OML */
|
||||
int bts_model_apply_oml(struct gsm_bts *bts, const struct msgb *msg, int kind, void *obj)
|
||||
int bts_model_apply_oml(struct gsm_bts *bts, const struct msgb *msg,
|
||||
struct gsm_abis_mo *mo, void *obj)
|
||||
{
|
||||
struct abis_om_fom_hdr *foh = msgb_l3(msg);
|
||||
struct gsm_bts_trx *trx;
|
||||
|
|
|
@ -548,7 +548,8 @@ int bts_model_check_oml(struct gsm_bts *bts, uint8_t msg_type,
|
|||
}
|
||||
|
||||
/* callback from OML */
|
||||
int bts_model_apply_oml(struct gsm_bts *bts, const struct msgb *msg, int kind, void *obj)
|
||||
int bts_model_apply_oml(struct gsm_bts *bts, const struct msgb *msg,
|
||||
struct gsm_abis_mo *mo, void *obj)
|
||||
{
|
||||
struct abis_om_fom_hdr *foh = msgb_l3(msg);
|
||||
int rc;
|
||||
|
|
|
@ -128,7 +128,8 @@ static uint8_t vbts_set_ts(struct gsm_bts_trx_ts *ts)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int bts_model_apply_oml(struct gsm_bts *bts, const struct msgb *msg, int kind, void *obj)
|
||||
int bts_model_apply_oml(struct gsm_bts *bts, const struct msgb *msg,
|
||||
struct gsm_abis_mo *mo, void *obj)
|
||||
{
|
||||
struct abis_om_fom_hdr *foh = msgb_l3(msg);
|
||||
int rc;
|
||||
|
|
|
@ -18,7 +18,8 @@ int bts_model_init(struct gsm_bts *bts)
|
|||
{ return 0; }
|
||||
int bts_model_trx_init(struct gsm_bts_trx *trx)
|
||||
{ return 0; }
|
||||
int bts_model_apply_oml(struct gsm_bts *bts, const struct msgb *msg, int kind, void *obj)
|
||||
int bts_model_apply_oml(struct gsm_bts *bts, const struct msgb *msg,
|
||||
struct gsm_abis_mo *mo, void *obj)
|
||||
{ return 0; }
|
||||
|
||||
int bts_model_trx_deact_rf(struct gsm_bts_trx *trx)
|
||||
|
|
Loading…
Reference in New Issue