OML: Include a pointer to the BTS in NM STATE CHANGE signals
... this allows the BTS driver to decide if it should handle the event at all
This commit is contained in:
parent
d529db6e50
commit
f38ca9aec7
|
@ -175,6 +175,7 @@ struct ipacc_ack_signal_data {
|
|||
struct abis_om2k_mo;
|
||||
|
||||
struct nm_statechg_signal_data {
|
||||
struct gsm_bts *bts;
|
||||
u_int8_t obj_class;
|
||||
void *obj;
|
||||
struct gsm_nm_state *old_state;
|
||||
|
|
|
@ -697,6 +697,7 @@ static int update_admstate(struct gsm_bts *bts, u_int8_t obj_class,
|
|||
new_state = *nm_state;
|
||||
new_state.administrative = adm_state;
|
||||
|
||||
nsd.bts = bts;
|
||||
nsd.obj_class = obj_class;
|
||||
nsd.old_state = nm_state;
|
||||
nsd.new_state = &new_state;
|
||||
|
@ -759,6 +760,7 @@ static int abis_nm_rx_statechg_rep(struct msgb *mb)
|
|||
nsd.old_state = nm_state;
|
||||
nsd.new_state = &new_state;
|
||||
nsd.obj_inst = &foh->obj_inst;
|
||||
nsd.bts = bts;
|
||||
dispatch_signal(SS_NM, S_NM_STATECHG_OPER, &nsd);
|
||||
nm_state->operational = new_state.operational;
|
||||
nm_state->availability = new_state.availability;
|
||||
|
|
|
@ -258,6 +258,9 @@ static int nm_statechg_event(int evt, struct nm_statechg_signal_data *nsd)
|
|||
struct gsm_bts_trx_ts *ts;
|
||||
struct gsm_bts_gprs_nsvc *nsvc;
|
||||
|
||||
if (nsd->bts->type != GSM_BTS_TYPE_NANOBTS)
|
||||
return 0;
|
||||
|
||||
/* This event-driven BTS setup is currently only required on nanoBTS */
|
||||
|
||||
/* S_NM_STATECHG_ADM is called after we call chg_adm_state() and would create
|
||||
|
|
Loading…
Reference in New Issue