summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2016-12-01 02:51:11 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2017-02-24 15:18:21 +0100
commited0bf2931f4c30d70cd5858348bf8d589b80a1a6 (patch)
treeee7ffa363bc050a8712a24ed0bfbc44cb2656a8e
parenta5a958e9ade68ae872cb26474ce9288d9b693ddb (diff)
libbsc/rbs2000: delay the ALTRQ request by 3 sec
-rw-r--r--openbsc/include/openbsc/gsm_data_shared.h1
-rw-r--r--openbsc/src/libbsc/abis_om2000.c13
2 files changed, 12 insertions, 2 deletions
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index 90f0bcd..69c016a 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -709,6 +709,7 @@ struct gsm_bts {
struct om2k_mo om2k_mo;
struct gsm_abis_mo mo;
struct llist_head conn_groups;
+ struct osmo_timer_list delay_superchannel;
} is;
struct {
struct om2k_mo om2k_mo;
diff --git a/openbsc/src/libbsc/abis_om2000.c b/openbsc/src/libbsc/abis_om2000.c
index 53b3375..8d4a277 100644
--- a/openbsc/src/libbsc/abis_om2000.c
+++ b/openbsc/src/libbsc/abis_om2000.c
@@ -1652,6 +1652,11 @@ static void om2k_mo_st_wait_cfg_res(struct osmo_fsm_inst *fi, uint32_t event, vo
abis_om2k_tx_enable_req(omfp->trx->bts, &omfp->mo->addr);
}
+static void om2k_delay_superchannel_wait_enable_res(void *data) {
+ struct gsm_bts *bts = data;
+ e1inp_ericsson_set_altc(bts->oml_link->ts->line, 1);
+}
+
static void om2k_mo_st_wait_enable_accept(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
struct om2k_mo_fsm_priv *omfp = fi->priv;
@@ -1663,8 +1668,12 @@ static void om2k_mo_st_wait_enable_accept(struct osmo_fsm_inst *fi, uint32_t eve
break;
case OM2K_MSGT_ENABLE_REQ_ACK:
if (omfp->mo->addr.class == OM2K_MO_CLS_IS &&
- omfp->trx->bts->rbs2000.use_superchannel)
- e1inp_ericsson_set_altc(omfp->trx->bts->oml_link->ts->line, 1);
+ omfp->trx->bts->rbs2000.use_superchannel) {
+ omfp->trx->bts->rbs2000.is.delay_superchannel.data = omfp->trx->bts;
+ omfp->trx->bts->rbs2000.is.delay_superchannel.cb = om2k_delay_superchannel_wait_enable_res;
+ osmo_timer_add(&omfp->trx->bts->rbs2000.is.delay_superchannel);
+ osmo_timer_schedule(&omfp->trx->bts->rbs2000.is.delay_superchannel, 3, 0);
+ }
osmo_fsm_inst_state_chg(fi, OM2K_ST_WAIT_ENABLE_RES,
OM2K_TIMEOUT, 0);
}