diff options
author | Harald Welte <laforge@gnumonks.org> | 2014-12-28 15:18:09 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2014-12-30 00:28:31 +0100 |
commit | b15d2c9d2f8ebe56672ab2191a4dc39d22fa0ab8 (patch) | |
tree | da13c97da8e99f5012c5eb7f4ead00a59398c026 /src/osmo-bts-sysmo/oml.c | |
parent | 50dc96507caba9480938eb3d9d0db9236f877b49 (diff) |
Initial CBCH support
This should handle OML channel combinations with CBCH and activate the
CBCH SAPI towards the DSP correspondingly. What is still missing is
sending any actual information over the CBCH in respons to the
PH-RTS.ind coming up from L1.
Diffstat (limited to 'src/osmo-bts-sysmo/oml.c')
-rw-r--r-- | src/osmo-bts-sysmo/oml.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c index f2aabb9f..2bfc241c 100644 --- a/src/osmo-bts-sysmo/oml.c +++ b/src/osmo-bts-sysmo/oml.c @@ -63,9 +63,11 @@ static const enum GsmL1_LogChComb_t pchan_to_logChComb[_GSM_PCHAN_MAX] = { [GSM_PCHAN_NONE] = GsmL1_LogChComb_0, [GSM_PCHAN_CCCH] = GsmL1_LogChComb_IV, [GSM_PCHAN_CCCH_SDCCH4] = GsmL1_LogChComb_V, + [GSM_PCHAN_CCCH_SDCCH4_CBCH] = GsmL1_LogChComb_V, [GSM_PCHAN_TCH_F] = GsmL1_LogChComb_I, [GSM_PCHAN_TCH_H] = GsmL1_LogChComb_II, [GSM_PCHAN_SDCCH8_SACCH8C] = GsmL1_LogChComb_VII, + [GSM_PCHAN_SDCCH8_SACCH8C_CBCH] = GsmL1_LogChComb_VII, [GSM_PCHAN_PDCH] = GsmL1_LogChComb_XIII, //[GSM_PCHAN_TCH_F_PDCH] = FIXME, [GSM_PCHAN_UNKNOWN] = GsmL1_LogChComb_0, @@ -207,9 +209,12 @@ static int opstart_compl(struct gsm_abis_mo *mo, struct msgb *l1_msg) /* ugly hack to auto-activate all SAPIs for the BCCH/CCCH on TS0 */ if (mo->obj_class == NM_OC_CHANNEL && mo->obj_inst.trx_nr == 0 && mo->obj_inst.ts_nr == 0) { + struct gsm_lchan *cbch = gsm_bts_get_cbch(mo->bts); DEBUGP(DL1C, "====> trying to activate lchans of BCCH\n"); mo->bts->c0->ts[0].lchan[4].rel_act_kind = LCHAN_REL_ACT_OML; lchan_activate(&mo->bts->c0->ts[0].lchan[4]); + if (cbch) + lchan_activate(cbch); } /* Send OPSTART ack */ @@ -430,11 +435,13 @@ GsmL1_SubCh_t lchan_to_GsmL1_SubCh_t(const struct gsm_lchan *lchan) { switch (lchan->ts->pchan) { case GSM_PCHAN_CCCH_SDCCH4: + case GSM_PCHAN_CCCH_SDCCH4_CBCH: if (lchan->type == GSM_LCHAN_CCCH) return GsmL1_SubCh_NA; /* fall-through */ case GSM_PCHAN_TCH_H: case GSM_PCHAN_SDCCH8_SACCH8C: + case GSM_PCHAN_SDCCH8_SACCH8C_CBCH: return lchan->nr; case GSM_PCHAN_NONE: case GSM_PCHAN_CCCH: @@ -487,6 +494,12 @@ static const struct sapi_dir sdcch_sapis[] = { { GsmL1_Sapi_Sacch, GsmL1_Dir_RxUplink }, }; +static const struct sapi_dir cbch_sapis[] = { + { GsmL1_Sapi_Cbch, GsmL1_Dir_TxDownlink }, + /* Does the CBCH really have a SACCH in Downlink? */ + { GsmL1_Sapi_Sacch, GsmL1_Dir_TxDownlink }, +}; + static const struct sapi_dir pdtch_sapis[] = { { GsmL1_Sapi_Pdtch, GsmL1_Dir_TxDownlink }, { GsmL1_Sapi_Pdtch, GsmL1_Dir_RxUplink }, @@ -528,6 +541,10 @@ static const struct lchan_sapis sapis_for_lchan[_GSM_LCHAN_MAX] = { .sapis = pdtch_sapis, .num_sapis = ARRAY_SIZE(pdtch_sapis), }, + [GSM_LCHAN_CBCH] = { + .sapis = cbch_sapis, + .num_sapis = ARRAY_SIZE(cbch_sapis), + }, }; static const struct lchan_sapis sapis_for_ho = { |