aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-06-28 14:45:08 +0200
committerpespin <pespin@sysmocom.de>2021-07-06 07:16:15 +0000
commit52b9912ef95838c0b60fc171984d3157a56fe488 (patch)
tree4d8487a4b43fd55b6a9def50108d1278ffc8b98a
parentcc75145131c19a680049ada58462092f952149ab (diff)
Support SDCCH8 in osmo dyn ts
This feature signals support to configure Osmocom Dynamic Timeslot type as SDCCH8, on top of historically supported TCH/H and TCH/F. The idea is that when unneeded, the TS is configured as PDCH, and as soon as there's need for an SDCCH and there's none available, the TS is dynamically reconfigured to SDCCH8. Once all logical channels in the dynamic TS are released and hence becomes free, the BSC will reconfigure it to PDCH. Related: SYS#5309 Depends: libosmocore.git Change-Id Ifc0ca8916bd3e93e5a60a7dd7391d2588fdb5532 Change-Id: I29ac8b90168dba3ac309daeb0b6cfdbbcb8e9172
-rw-r--r--src/osmo-bsc/gsm_data.c4
-rw-r--r--src/osmo-bsc/lchan_select.c6
-rw-r--r--src/osmo-bsc/timeslot_fsm.c2
3 files changed, 12 insertions, 0 deletions
diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c
index 30590fb8e..7140ad70a 100644
--- a/src/osmo-bsc/gsm_data.c
+++ b/src/osmo-bsc/gsm_data.c
@@ -792,6 +792,8 @@ enum gsm_phys_chan_config gsm_pchan_by_lchan_type(enum gsm_chan_t type)
return GSM_PCHAN_TCH_F;
case GSM_LCHAN_TCH_H:
return GSM_PCHAN_TCH_H;
+ case GSM_LCHAN_SDCCH:
+ return GSM_PCHAN_SDCCH8_SACCH8C;
case GSM_LCHAN_NONE:
case GSM_LCHAN_PDTCH:
/* TODO: so far lchan->type is NONE in PDCH mode. PDTCH is only
@@ -837,6 +839,7 @@ bool ts_is_capable_of_pchan(struct gsm_bts_trx_ts *ts, enum gsm_phys_chan_config
case GSM_PCHAN_TCH_F:
case GSM_PCHAN_TCH_H:
case GSM_PCHAN_PDCH:
+ case GSM_PCHAN_SDCCH8_SACCH8C:
return true;
default:
return false;
@@ -909,6 +912,7 @@ bool ts_is_capable_of_lchant(struct gsm_bts_trx_ts *ts, enum gsm_chan_t type)
case GSM_LCHAN_TCH_F:
case GSM_LCHAN_TCH_H:
case GSM_LCHAN_PDTCH:
+ case GSM_LCHAN_SDCCH:
return true;
default:
return false;
diff --git a/src/osmo-bsc/lchan_select.c b/src/osmo-bsc/lchan_select.c
index 5e9d800ea..efa2ff29b 100644
--- a/src/osmo-bsc/lchan_select.c
+++ b/src/osmo-bsc/lchan_select.c
@@ -216,6 +216,12 @@ struct gsm_lchan *lchan_avail_by_type(struct gsm_bts *bts, enum gsm_chan_t type,
lchan = _lc_find_bts(bts, second, log);
if (lchan == NULL)
lchan = _lc_find_bts(bts, second_cbch, log);
+ /* No dedicated SDCCH available -- try fully dynamic
+ * TCH/F_TCH/H_SDCCH8_PDCH if BTS supports it: */
+ if (lchan == NULL && osmo_bts_has_feature(&bts->features, BTS_FEAT_DYN_TS_SDCCH8))
+ lchan = _lc_dyn_find_bts(bts,
+ GSM_PCHAN_OSMO_DYN,
+ GSM_PCHAN_SDCCH8_SACCH8C, log);
break;
case GSM_LCHAN_TCH_F:
lchan = _lc_find_bts(bts, GSM_PCHAN_TCH_F, log);
diff --git a/src/osmo-bsc/timeslot_fsm.c b/src/osmo-bsc/timeslot_fsm.c
index 266424510..adca31d8c 100644
--- a/src/osmo-bsc/timeslot_fsm.c
+++ b/src/osmo-bsc/timeslot_fsm.c
@@ -86,6 +86,8 @@ static enum lchan_sanity is_lchan_sane(struct gsm_bts_trx_ts *ts, struct gsm_lch
switch (ts->pchan_on_init) {
case GSM_PCHAN_OSMO_DYN:
+ if (lchan->type == GSM_LCHAN_SDCCH)
+ return LCHAN_NEEDS_PCHAN_CHANGE;
if (lchan->type == GSM_LCHAN_TCH_H)
return LCHAN_NEEDS_PCHAN_CHANGE;
/* fall thru */