From faba73a81230db1e549aa43b6a5ee7902b45f919 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 25 Jan 2013 11:07:12 +0100 Subject: sysmobts: Improve the shutdown of the DSP on exit Issue the RfDeactivate.REQ before sending the MphClose.REQ. Ideally we would issue MphClose.REQ after the RfDeactivate.CNF but this is not possible right now. The current approach makes the following warning of the DSP go away on shutdown. This was tested with my E71 and an active silent-call using a SDCCH. DSP Warning: [ERROR] : DeviceMng_ValidateL1Handle() => Invalid layer 1 handle --- src/common/bts.c | 4 +++- src/osmo-bts-sysmo/oml.c | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/common/bts.c b/src/common/bts.c index 8f6dc694..db58e12f 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -126,8 +126,10 @@ void bts_shutdown(struct gsm_bts *bts, const char *reason) LOGP(DOML, LOGL_NOTICE, "Shutting down BTS %u, Reason %s\n", bts->nr, reason); - llist_for_each_entry(trx, &bts->trx_list, list) + llist_for_each_entry(trx, &bts->trx_list, list) { bts_model_trx_deact_rf(trx); + bts_model_trx_close(trx); + } /* shedule a timer to make sure select loop logic can run again * to dispatch any pending primitives */ diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c index bf4fe158..9e2ac8ee 100644 --- a/src/osmo-bts-sysmo/oml.c +++ b/src/osmo-bts-sysmo/oml.c @@ -310,7 +310,7 @@ static int trx_close_compl_cb(struct gsm_bts_trx *trx, struct msgb *l1_msg) return 0; } -static int trx_close(struct gsm_bts_trx *trx) +int bts_model_trx_close(struct gsm_bts_trx *trx) { struct femtol1_hdl *fl1h = trx_femtol1_hdl(trx); struct msgb *msg; @@ -1149,6 +1149,5 @@ int bts_model_trx_deact_rf(struct gsm_bts_trx *trx) { struct femtol1_hdl *fl1 = trx_femtol1_hdl(trx); - trx_close(trx); return l1if_activate_rf(fl1, 0); } -- cgit v1.2.3