From 9fa0cce100d25585f5a1baff3353cd54a5a58d5f Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 1 Jul 2011 18:09:34 +0200 Subject: fix BTS initialization order The sequence is as follows: 0) start osmo-bts 1) start connection attempts to BTS 2) issue L1-RESET.req 3) receive L1-RESET.conf 4) issue RF-ACTIVATE.req 5) receive RF-ACTIVATE.conf 6) receive attributes for TRX 7) receive opstart for TRX 8) issue MPH-INIT.req [...] The important point here is: We don't want the BSC to set TRX attributes or do TRX opstart before our RF related hardware is initialized. --- src/common/oml.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/common/oml.c') diff --git a/src/common/oml.c b/src/common/oml.c index 26363321..ca19490a 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -207,8 +207,7 @@ char *gsm_abis_mo_name(const struct gsm_abis_mo *mo) } /* 8.8.1 sending State Changed Event Report */ -int oml_tx_state_changed(struct gsm_abis_mo *mo, - uint8_t op_state, uint8_t avail_status) +int oml_tx_state_changed(struct gsm_abis_mo *mo) { struct msgb *nmsg; @@ -219,10 +218,10 @@ int oml_tx_state_changed(struct gsm_abis_mo *mo, return -ENOMEM; /* 9.4.38 Operational State */ - msgb_tv_put(nmsg, NM_ATT_OPER_STATE, op_state); + msgb_tv_put(nmsg, NM_ATT_OPER_STATE, mo->nm_state.operational); /* 9.4.7 Availability Status */ - msgb_tl16v_put(nmsg, NM_ATT_AVAIL_STATUS, 1, &avail_status); + msgb_tl16v_put(nmsg, NM_ATT_AVAIL_STATUS, 1, &mo->nm_state.availability); return oml_mo_send_msg(mo, nmsg, NM_MT_STATECHG_EVENT_REP); } @@ -249,7 +248,7 @@ int oml_mo_state_chg(struct gsm_abis_mo *mo, int op_state, int avail_state) } /* send state change report */ - rc = oml_tx_state_changed(mo, op_state, avail_state); + rc = oml_tx_state_changed(mo); } return rc; } -- cgit v1.2.3