From c1658762234fa8593348760c6f20e6a10a13d6e6 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Sat, 23 Jul 2016 16:14:06 +0200 Subject: [PATCH] dyn TS: add ts->dyn state Add state fields osmo_bts_trx_ts->dyn.* to record dynamic timeslot state. Initialize in gsm_bts_trx_alloc(). Change-Id: I0a4049df8500b4f7c864f1355c4e9238932d1b8f --- openbsc/include/openbsc/gsm_data_shared.h | 6 ++++++ openbsc/src/libcommon/gsm_data_shared.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index f3a8c3226..8743c8033 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -348,6 +348,12 @@ struct gsm_bts_trx_ts { enum gsm_phys_chan_config pchan; + struct { + enum gsm_phys_chan_config pchan_is; + enum gsm_phys_chan_config pchan_want; + struct msgb *pending_chan_activ; + } dyn; + unsigned int flags; struct gsm_abis_mo mo; struct tlv_parsed nm_attr; diff --git a/openbsc/src/libcommon/gsm_data_shared.c b/openbsc/src/libcommon/gsm_data_shared.c index 1c4ade246..8264e420e 100644 --- a/openbsc/src/libcommon/gsm_data_shared.c +++ b/openbsc/src/libcommon/gsm_data_shared.c @@ -169,6 +169,8 @@ struct gsm_bts_trx *gsm_bts_trx_alloc(struct gsm_bts *bts) ts->trx = trx; ts->nr = k; ts->pchan = GSM_PCHAN_NONE; + ts->dyn.pchan_is = GSM_PCHAN_NONE; + ts->dyn.pchan_want = GSM_PCHAN_NONE; ts->tsc = -1; gsm_mo_init(&ts->mo, bts, NM_OC_CHANNEL,