From d92774b4ac9360235e822387a097dbcb886fbbed Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 30 Jun 2013 21:19:27 +0200 Subject: abis: delay l1if_reset() until OML link is established --- include/osmo-bts/bts_model.h | 2 ++ src/common/bts.c | 2 +- src/osmo-bts-sysmo/main.c | 11 +++++++++-- tests/stubs.c | 3 +++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/include/osmo-bts/bts_model.h b/include/osmo-bts/bts_model.h index bfa6bd8d..2f6ae98d 100644 --- a/include/osmo-bts/bts_model.h +++ b/include/osmo-bts/bts_model.h @@ -43,4 +43,6 @@ int bts_model_vty_init(struct gsm_bts *bts); void bts_model_config_write_bts(struct vty *vty, struct gsm_bts *bts); void bts_model_config_write_trx(struct vty *vty, struct gsm_bts_trx *trx); +int bts_model_oml_estab(struct gsm_bts *bts); + #endif diff --git a/src/common/bts.c b/src/common/bts.c index 63560c2f..2ac411d0 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -176,7 +176,7 @@ int bts_link_estab(struct gsm_bts *bts) } } - return 0; + return bts_model_oml_estab(bts); } /* RSL link is established, send status report */ diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c index bf0d79a7..15b1f1c0 100644 --- a/src/osmo-bts-sysmo/main.c +++ b/src/osmo-bts-sysmo/main.c @@ -74,13 +74,20 @@ int bts_model_init(struct gsm_bts *bts) bts->c0->role_bts.l1h = fl1h; bts->c0->nominal_power = 23; - l1if_reset(fl1h); - bts_model_vty_init(bts); return 0; } +int bts_model_oml_estab(struct gsm_bts *bts) +{ + struct femtol1_hdl *fl1h = bts->c0->role_bts.l1h; + + l1if_reset(fl1h); + + return 0; +} + /* Set the clock calibration to the value * read from the eeprom. */ diff --git a/tests/stubs.c b/tests/stubs.c index c46bb4ad..c0955f3a 100644 --- a/tests/stubs.c +++ b/tests/stubs.c @@ -46,3 +46,6 @@ int l1if_pdch_req(struct gsm_bts_trx_ts *ts, int is_ptcch, uint32_t fn, uint32_t trx_get_hlayer1(struct gsm_bts_trx *trx) { return 0; } + +int bts_model_oml_estab(struct gsm_bts *bts) +{ return 0; } -- cgit v1.2.3