aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/bts_nokia_site.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-06-11 02:40:30 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-06-16 15:56:14 +0200
commitc10a77af68c231a026b4f0aa2faf86c584e08eb6 (patch)
tree75e1b15068d2f25054c5a84ee16cdae957508059 /src/osmo-bsc/bts_nokia_site.c
parent73e028416e82f5f6b21d7f323fd907110ae02d74 (diff)
code bomb: refactor just about everything for inter-bsc HOneels/inter_bsc_ho_saved
This is way too large, yet the typical tangle of modification onto modifications needs to be squashed to make sensible bits of them later for code review... Change-Id: I82e3f918295daa83274a4cf803f046979f284366
Diffstat (limited to 'src/osmo-bsc/bts_nokia_site.c')
-rw-r--r--src/osmo-bsc/bts_nokia_site.c35
1 files changed, 22 insertions, 13 deletions
diff --git a/src/osmo-bsc/bts_nokia_site.c b/src/osmo-bsc/bts_nokia_site.c
index 4a24c3931..052741ed1 100644
--- a/src/osmo-bsc/bts_nokia_site.c
+++ b/src/osmo-bsc/bts_nokia_site.c
@@ -35,6 +35,7 @@
#include <osmocom/bsc/abis_nm.h>
#include <osmocom/abis/e1_input.h>
#include <osmocom/bsc/signal.h>
+#include <osmocom/bsc/timeslot_fsm.h>
#include <osmocom/core/timer.h>
@@ -55,13 +56,13 @@ static void bootstrap_om_bts(struct gsm_bts *bts)
{
LOGP(DNM, LOGL_NOTICE, "bootstrapping OML for BTS %u\n", bts->nr);
- gsm_bts_mark_all_ts_uninitialized(bts);
-
if (!bts->nokia.skip_reset) {
if (!bts->nokia.did_reset)
abis_nm_reset(bts, 1);
} else
bts->nokia.did_reset = 1;
+
+ gsm_bts_all_ts_dispatch(bts, TS_EV_OML_READY, NULL);
}
static void bootstrap_om_trx(struct gsm_bts_trx *trx)
@@ -69,7 +70,7 @@ static void bootstrap_om_trx(struct gsm_bts_trx *trx)
LOGP(DNM, LOGL_NOTICE, "bootstrapping OML for TRX %u/%u\n",
trx->bts->nr, trx->nr);
- gsm_trx_mark_all_ts_uninitialized(trx);
+ gsm_trx_all_ts_dispatch(trx, TS_EV_OML_READY, NULL);
}
static int shutdown_om(struct gsm_bts *bts)
@@ -779,24 +780,32 @@ static int make_fu_config(struct gsm_bts_trx *trx, uint8_t id,
0xFF = spare TS
*/
- if (ts->pchan == GSM_PCHAN_NONE)
+ switch (ts->pchan_from_config) {
+ case GSM_PCHAN_NONE:
chan_config = 0xFF;
- else if (ts->pchan == GSM_PCHAN_CCCH)
+ break;
+ case GSM_PCHAN_CCCH:
chan_config = 0;
- else if (ts->pchan == GSM_PCHAN_CCCH_SDCCH4)
+ break;
+ case GSM_PCHAN_CCCH_SDCCH4:
chan_config = 1;
- else if (ts->pchan == GSM_PCHAN_TCH_F)
+ break;
+ case GSM_PCHAN_TCH_F:
chan_config = 6; /* 9 should work too */
- else if (ts->pchan == GSM_PCHAN_TCH_H)
+ break;
+ case GSM_PCHAN_TCH_H:
chan_config = 9;
- else if (ts->pchan == GSM_PCHAN_SDCCH8_SACCH8C)
+ break;
+ case GSM_PCHAN_SDCCH8_SACCH8C:
chan_config = 4;
- else if (ts->pchan == GSM_PCHAN_PDCH)
+ break;
+ case GSM_PCHAN_PDCH:
chan_config = 11;
- else {
+ break;
+ default:
fprintf(stderr,
- "unsupported channel config %d for timeslot %d\n",
- ts->pchan, i);
+ "unsupported channel config %s for timeslot %d\n",
+ gsm_pchan_name(ts->pchan_from_config), i);
return 0;
}