pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/24785 )

Change subject: Rename osmo dyn ts enums to contain SDCCH8
......................................................................

Rename osmo dyn ts enums to contain SDCCH8

They will gain support to be activated as SDCCH/8 soon too.

Related: OS#5309
Depends: libosmocore.git I56dcfe4d17899630b17f80145c3ced72f1e91e68
Change-Id: Id5b89fe589a52ff88486435ac43809edb4b80f98
---
M TODO-RELEASE
M doc/manuals/chapters/bts.adoc
M include/osmocom/bsc/bts.h
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/abis_nm.c
M src/osmo-bsc/abis_om2000.c
M src/osmo-bsc/abis_rsl.c
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/bts.c
M src/osmo-bsc/bts_trx.c
M src/osmo-bsc/chan_alloc.c
M src/osmo-bsc/codec_pref.c
M src/osmo-bsc/gsm_data.c
M src/osmo-bsc/handover_decision_2.c
M src/osmo-bsc/lchan_select.c
M src/osmo-bsc/timeslot_fsm.c
M tests/ctrl_test_runner.py
M tests/handover/handover_test.c
18 files changed, 81 insertions(+), 76 deletions(-)

Approvals:
  laforge: Looks good to me, but someone else must approve
  daniel: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/TODO-RELEASE b/TODO-RELEASE
index e64aebb..a9bf06c 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -12,3 +12,4 @@
 libosmogsm    >1.5.1            introduced struct needed 
gsm0808_old_bss_to_new_bss_info->last_eutran_plmn_id
 libosmo-mgcp-client >1.8.0     need osmo_mgcpc_ep_ci_get_remote_rtp_info()
 libosmovty     >1.5.1          needs vty_read_config_filep()
+libosmosgsm     >1.5.1          needs GSM_PCHAN_OSMO_DYN
diff --git a/doc/manuals/chapters/bts.adoc b/doc/manuals/chapters/bts.adoc
index 1b33d73..acd2200 100644
--- a/doc/manuals/chapters/bts.adoc
+++ b/doc/manuals/chapters/bts.adoc
@@ -295,7 +295,7 @@
 .Dynamic timeslot support by various BTS models
 [cols="50%,25%,25%"]
 |===
-|                    |`TCH/F_TCH/H_PDCH` |`TCH/F_PDCH`
+|                    |`TCH/F_TCH/H_SDCCH8_PDCH` |`TCH/F_PDCH`
 |ip.access nanoBTS   |-                  |supported
 |Ericsson RBS        |supported          |-
 |sysmoBTS using _osmo-bts-sysmo_ |supported |supported
@@ -310,11 +310,11 @@
 NOTE: Same as for dedicated PDCH timeslots, you need to enable GPRS and operate
 a PCU, SGSN and GGSN to provide the actual data service.

-==== Osmocom Style Dynamic Timeslots (TCH/F_TCH/H_PDCH)
+==== Osmocom Style Dynamic Timeslots (TCH/F_TCH/H_SDCCH8_PDCH)

-Timeslots of the `TCH/F_TCH/H_PDCH` type dynamically switch between TCH/F,
+Timeslots of the `TCH/F_TCH/H_SDCCH8_PDCH` type dynamically switch between 
TCH/F,
 TCH/H and PDCH, depending on the channel kind requested by the MSC. The RSL
-messaging for `TCH/F_TCH/H_PDCH` timeslots is compatible with Ericsson RBS.
+messaging for `TCH/F_TCH/H_SDCCH8_PDCH` timeslots is compatible with Ericsson 
RBS.

 BTS models supporting this timeslot kind are shown in <<dyn_ts_compat>>.

@@ -361,15 +361,15 @@
    timeslot 1
     phys_chan_config SDCCH8
    timeslot 2
-    phys_chan_config TCH/F_TCH/H_PDCH
+    phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH
    timeslot 3
-    phys_chan_config TCH/F_TCH/H_PDCH
+    phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH
    timeslot 4
-    phys_chan_config TCH/F_TCH/H_PDCH
+    phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH
    timeslot 5
-    phys_chan_config TCH/F_TCH/H_PDCH
+    phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH
    timeslot 6
-    phys_chan_config TCH/F_TCH/H_PDCH
+    phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH
    timeslot 7
     phys_chan_config PDCH
 ----
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index 65c3be5..2e88129 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -166,8 +166,8 @@
        BTS_STAT_CHAN_CCCH_SDCCH4_CBCH_TOTAL,
        BTS_STAT_CHAN_SDCCH8_CBCH_USED,
        BTS_STAT_CHAN_SDCCH8_CBCH_TOTAL,
-       BTS_STAT_CHAN_TCH_F_TCH_H_PDCH_USED,
-       BTS_STAT_CHAN_TCH_F_TCH_H_PDCH_TOTAL,
+       BTS_STAT_CHAN_OSMO_DYN_USED,
+       BTS_STAT_CHAN_OSMO_DYN_TOTAL,
        BTS_STAT_T3122,
        BTS_STAT_RACH_BUSY,
        BTS_STAT_RACH_ACCESS,
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 31759cc..b07345d 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -796,7 +796,7 @@
         * vty after OML activation. Gets written on vty 'write file'. */
        enum gsm_phys_chan_config pchan_from_config;
        /* When the timeslot OML is established, pchan_from_config is copied 
here. This is the pchan
-        * currently in effect; for dynamic ts, this is the dyn kind 
(GSM_PCHAN_TCH_F_TCH_H_PDCH or
+        * currently in effect; for dynamic ts, this is the dyn kind 
(GSM_PCHAN_OSMO_DYN or
         * GSM_PCHAN_TCH_F_PDCH) and does not show the pchan type currently 
active. */
        enum gsm_phys_chan_config pchan_on_init;
        /* This is the *actual* pchan type currently active. For dynamic 
timeslots, this reflects either
@@ -1302,7 +1302,7 @@
        /* control interface */
        struct ctrl_handle *ctrl;

-       /* Allow or disallow TCH/F on dynamic TCH/F_TCH/H_PDCH; OS#1778 */
+       /* Allow or disallow TCH/F on dynamic TCH/F_TCH/H_SDCCH8_PDCH; OS#1778 
*/
        bool dyn_ts_allow_tch_f;

        /* all active subscriber connections. */
diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c
index c98d225..7c04394 100644
--- a/src/osmo-bsc/abis_nm.c
+++ b/src/osmo-bsc/abis_nm.c
@@ -1892,7 +1892,7 @@
                switch (chan_comb) {
                case NM_CHANC_TCHHalf:
                case NM_CHANC_TCHHalf2:
-               case NM_CHANC_OSMO_TCHFull_TCHHalf_PDCH:
+               case NM_CHANC_OSMO_DYN:
                        /* not supported */
                        *reason = "TCH/H is not supported.";
                        return -EINVAL;
@@ -1990,7 +1990,7 @@
                                case NM_CHANC_TCHHalf:
                                case NM_CHANC_IPAC_TCHFull_TCHHalf:
                                case NM_CHANC_IPAC_TCHFull_PDCH:
-                               case NM_CHANC_OSMO_TCHFull_TCHHalf_PDCH:
+                               case NM_CHANC_OSMO_DYN:
                                        return 0;
                                default:
                                        *reason = "TS1 must carry a CBCH, SDCCH 
or TCH.";
@@ -2022,7 +2022,7 @@
                                return 0;
                        case NM_CHANC_IPAC_PDCH:
                        case NM_CHANC_IPAC_TCHFull_PDCH:
-                       case NM_CHANC_OSMO_TCHFull_TCHHalf_PDCH:
+                       case NM_CHANC_OSMO_DYN:
                                if (ts->trx->nr == 0)
                                        return 0;
                                else {
diff --git a/src/osmo-bsc/abis_om2000.c b/src/osmo-bsc/abis_om2000.c
index 61db437..8ee6371 100644
--- a/src/osmo-bsc/abis_om2000.c
+++ b/src/osmo-bsc/abis_om2000.c
@@ -1411,7 +1411,7 @@
        case GSM_PCHAN_TCH_H:
        case GSM_PCHAN_PDCH:
        case GSM_PCHAN_TCH_F_PDCH:
-       case GSM_PCHAN_TCH_F_TCH_H_PDCH:
+       case GSM_PCHAN_OSMO_DYN:
                return 8;
        default:
                return 0;
@@ -1423,7 +1423,7 @@
        if (ts->pchan_on_init == GSM_PCHAN_TCH_F_PDCH) {
                LOGP(DNM, LOGL_ERROR, "%s pchan %s not intended for use with 
OM2000, use %s instead\n",
                     gsm_ts_and_pchan_name(ts), 
gsm_pchan_name(GSM_PCHAN_TCH_F_PDCH),
-                    gsm_pchan_name(GSM_PCHAN_TCH_F_TCH_H_PDCH));
+                    gsm_pchan_name(GSM_PCHAN_OSMO_DYN));
                /* If we allowed initialization of TCH/F_PDCH, it would fail
                 * when we try to send the ip.access specific RSL PDCH Act
                 * message for it. Rather fail completely right now: */
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 809cd9b..f0adc56 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -1054,7 +1054,7 @@
 static bool msg_for_osmocom_dyn_ts(struct msgb *msg)
 {
        struct abis_rsl_dchan_hdr *rslh = msgb_l2(msg);
-       if (msg->lchan->ts->pchan_on_init != GSM_PCHAN_TCH_F_TCH_H_PDCH)
+       if (msg->lchan->ts->pchan_on_init != GSM_PCHAN_OSMO_DYN)
                return false;
        /* dyn TS messages always come in on the first lchan of a timeslot */
        if (msg->lchan->nr != 0)
@@ -2676,7 +2676,7 @@
        const char *act;

        switch (ts->pchan_on_init) {
-       case GSM_PCHAN_TCH_F_TCH_H_PDCH:
+       case GSM_PCHAN_OSMO_DYN:
                what = "Osmocom dyn TS";
                act = activate? "PDCH Chan Activ" : "PDCH Chan RF Release";

diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index efa59d3..070b660 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -1484,7 +1484,7 @@
 {
        /* show dyn TS details, if applicable */
        switch (ts->pchan_on_init) {
-       case GSM_PCHAN_TCH_F_TCH_H_PDCH:
+       case GSM_PCHAN_OSMO_DYN:
                vty_out(vty, "  Osmocom Dyn TS:");
                vty_out_dyn_ts_status(vty, ts);
                vty_out(vty, VTY_NEWLINE);
@@ -5648,7 +5648,7 @@
 }

 /* used for backwards compatibility with old config files that still
- * have uppercase pchan type names */
+ * have uppercase pchan type names. Also match older names for existing types. 
 */
 DEFUN_HIDDEN(cfg_ts_pchan_compat,
       cfg_ts_pchan_compat_cmd,
       "phys_chan_config PCHAN",
@@ -5659,8 +5659,12 @@

        pchanc = gsm_pchan_parse(argv[0]);
        if (pchanc < 0) {
-               vty_out(vty, "Unknown physical channel name '%s'%s", argv[0], 
VTY_NEWLINE);
-               return CMD_ERR_NO_MATCH;
+               if (strcasecmp(argv[0], "tch/f_tch/h_pdch") == 0) {
+                       pchanc = GSM_PCHAN_OSMO_DYN;
+               } else {
+                       vty_out(vty, "Unknown physical channel name '%s'%s", 
argv[0], VTY_NEWLINE);
+                       return CMD_ERR_NO_MATCH;
+               }
        }

        ts->pchan_from_config = pchanc;
@@ -6155,9 +6159,9 @@
                return CMD_WARNING;
        }

-       if (ts->pchan_on_init != GSM_PCHAN_TCH_F_TCH_H_PDCH
+       if (ts->pchan_on_init != GSM_PCHAN_OSMO_DYN
            && ts->pchan_on_init != GSM_PCHAN_TCH_F_PDCH) {
-               vty_out(vty, "%% Timeslot %u is not dynamic TCH/F_TCH/H_PDCH or 
TCH/F_PDCH%s",
+               vty_out(vty, "%% Timeslot %u is not dynamic 
TCH/F_TCH/H_SDCCH8_PDCH or TCH/F_PDCH%s",
                        ts->nr, VTY_NEWLINE);
                return CMD_WARNING;
        }
@@ -6217,10 +6221,10 @@
                if (lchan_t < 0) {
                        if (lchan->ts->pchan_on_init == GSM_PCHAN_TCH_F_PDCH && 
!strcmp(codec_str, "fr"))
                                lchan_t = GSM_LCHAN_TCH_F;
-                       else if (lchan->ts->pchan_on_init == 
GSM_PCHAN_TCH_F_TCH_H_PDCH && !strcmp(codec_str, "hr"))
+                       else if (lchan->ts->pchan_on_init == GSM_PCHAN_OSMO_DYN 
&& !strcmp(codec_str, "hr"))
                                lchan_t = GSM_LCHAN_TCH_H;
                        else if ((lchan->ts->pchan_on_init == 
GSM_PCHAN_TCH_F_PDCH
-                                 || lchan->ts->pchan_on_init == 
GSM_PCHAN_TCH_F_TCH_H_PDCH)
+                                 || lchan->ts->pchan_on_init == 
GSM_PCHAN_OSMO_DYN)
                                 && !strcmp(codec_str, "fr"))
                                lchan_t = GSM_LCHAN_TCH_F;
                        else {
@@ -6323,7 +6327,7 @@
                                break;
                        case GSM_PCHAN_TCH_F:
                        case GSM_PCHAN_TCH_F_PDCH:
-                       case GSM_PCHAN_TCH_F_TCH_H_PDCH:
+                       case GSM_PCHAN_OSMO_DYN:
                                codec_str = "fr";
                                break;
                        case GSM_PCHAN_TCH_H:
@@ -6336,9 +6340,9 @@
                        if (codec_str && skip_next == false) {
                                lchan_act_single(vty, lchan, codec_str, -1, 
activate);

-                               /* We use GSM_PCHAN_TCH_F_TCH_H_PDCH slots as 
TCH_F for this test, so we
+                               /* We use GSM_PCHAN_OSMO_DYN slots as TCH_F for 
this test, so we
                                 * must not use the TCH_H reserved lchan in 
subslot 1. */
-                               if (ts->pchan_on_init == 
GSM_PCHAN_TCH_F_TCH_H_PDCH)
+                               if (ts->pchan_on_init == GSM_PCHAN_OSMO_DYN)
                                        skip_next = true;
                        }
                        else {
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index 8608767..cf3a6b8 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -1256,13 +1256,13 @@
                { "chan_sdcch8_cbch:total",
                  "Number of SDCCH8+CBCH channels total",
                  "", 60, 0 },
-       [BTS_STAT_CHAN_TCH_F_TCH_H_PDCH_USED] = \
-               { "chan_tch_f_tch_h_pdch:used",
-                 "Number of TCH/F_TCH/H_PDCH channels used",
+       [BTS_STAT_CHAN_OSMO_DYN_USED] = \
+               { "chan_osmo_dyn:used",
+                 "Number of TCH/F_TCH/H_SDCCH8_PDCH channels used",
                  "", 60, 0 },
-       [BTS_STAT_CHAN_TCH_F_TCH_H_PDCH_TOTAL] = \
-               { "chan_tch_f_tch_h_pdch:total",
-                 "Number of TCH/F_TCH/H_PDCH channels total",
+       [BTS_STAT_CHAN_OSMO_DYN_TOTAL] = \
+               { "chan_osmo_dyn:total",
+                 "Number of TCH/F_TCH/H_SDCCH8_PDCH channels total",
                  "", 60, 0 },
        [BTS_STAT_T3122] = \
                { "T3122",
diff --git a/src/osmo-bsc/bts_trx.c b/src/osmo-bsc/bts_trx.c
index bef98c0..f183d4b 100644
--- a/src/osmo-bsc/bts_trx.c
+++ b/src/osmo-bsc/bts_trx.c
@@ -216,7 +216,7 @@
                break;
        case ABIS_RSL_CHAN_NR_CBITS_OSMO_PDCH:
                lch_idx = 0;
-               ok = (ts->pchan_on_init == GSM_PCHAN_TCH_F_TCH_H_PDCH);
+               ok = (ts->pchan_on_init == GSM_PCHAN_OSMO_DYN);
                break;
        default:
                return NULL;
@@ -296,7 +296,7 @@
                                        count++;
                                continue;

-                       case GSM_PCHAN_TCH_F_TCH_H_PDCH:
+                       case GSM_PCHAN_OSMO_DYN:
                                if (pchan == GSM_PCHAN_TCH_F)
                                        count++;
                                else if (pchan == GSM_PCHAN_TCH_H)
diff --git a/src/osmo-bsc/chan_alloc.c b/src/osmo-bsc/chan_alloc.c
index f2a41b7..fea4efd 100644
--- a/src/osmo-bsc/chan_alloc.c
+++ b/src/osmo-bsc/chan_alloc.c
@@ -59,10 +59,10 @@
                        if (!nm_is_running(&ts->mo.nm_state))
                                continue;

-                       /* A dynamic timeslot currently in PDCH mode are 
available as TCH, beause they can be switched
-                        * to TCH mode at any moment. Count TCH/F_TCH/H_PDCH as 
one total timeslot, even though it may
+                       /* A dynamic timeslot currently in PDCH mode are 
available as TCH or SDCCH8, beause they can be switched
+                        * to TCH or SDCCH mode at any moment. Count 
TCH/F_TCH/H_SDCCH8_PDCH as one total timeslot, even though it may
                         * be switched to TCH/H and would then count as two -- 
hence opt for pessimistic load. */
-                       if ((ts->pchan_on_init == GSM_PCHAN_TCH_F_TCH_H_PDCH ||
+                       if ((ts->pchan_on_init == GSM_PCHAN_OSMO_DYN ||
                             ts->pchan_on_init == GSM_PCHAN_TCH_F_PDCH) &&
                            (ts->pchan_is == GSM_PCHAN_NONE ||
                             ts->pchan_is == GSM_PCHAN_PDCH)) {
@@ -147,9 +147,9 @@
                
osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, 
BTS_STAT_CHAN_SDCCH8_CBCH_USED), lc->used);
                
osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, 
BTS_STAT_CHAN_SDCCH8_CBCH_TOTAL), lc->total);
                break;
-       case GSM_PCHAN_TCH_F_TCH_H_PDCH:
-               
osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, 
BTS_STAT_CHAN_TCH_F_TCH_H_PDCH_USED), lc->used);
-               
osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, 
BTS_STAT_CHAN_TCH_F_TCH_H_PDCH_TOTAL), lc->total);
+       case GSM_PCHAN_OSMO_DYN:
+               
osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, 
BTS_STAT_CHAN_OSMO_DYN_USED), lc->used);
+               
osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, 
BTS_STAT_CHAN_OSMO_DYN_TOTAL), lc->total);
                break;
        default:
                LOG_BTS(bts, DRLL, LOGL_NOTICE, "Unknown channel type %d\n", 
pchan);
diff --git a/src/osmo-bsc/codec_pref.c b/src/osmo-bsc/codec_pref.c
index 58a7867..9b4b37f 100644
--- a/src/osmo-bsc/codec_pref.c
+++ b/src/osmo-bsc/codec_pref.c
@@ -197,7 +197,7 @@
        llist_for_each_entry(trx, &bts->trx_list, list) {
                for (i = 0; i < TRX_NR_TS; i++) {
                        pchan = trx->ts[i].pchan_from_config;
-                       if (pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH)
+                       if (pchan == GSM_PCHAN_OSMO_DYN)
                                rate_match = true;
                        else if (full_rate && pchan == GSM_PCHAN_TCH_F)
                                rate_match = true;
diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c
index 0d1395c..30590fb 100644
--- a/src/osmo-bsc/gsm_data.c
+++ b/src/osmo-bsc/gsm_data.c
@@ -191,7 +191,7 @@
        { GSM_PCHAN_UNKNOWN,    "UNKNOWN" },
        { GSM_PCHAN_CCCH_SDCCH4_CBCH, "CCCH+SDCCH4+CBCH" },
        { GSM_PCHAN_SDCCH8_SACCH8C_CBCH, "SDCCH8+CBCH" },
-       { GSM_PCHAN_TCH_F_TCH_H_PDCH, "TCH/F_TCH/H_PDCH" },
+       { GSM_PCHAN_OSMO_DYN, "TCH/F_TCH/H_SDCCH8_PDCH" },
        { 0,                    NULL }
 };

@@ -207,7 +207,7 @@
        { GSM_PCHAN_UNKNOWN,    "UNKNOWN" },
        { GSM_PCHAN_CCCH_SDCCH4_CBCH, "CCCH_SDCCH4_CBCH" },
        { GSM_PCHAN_SDCCH8_SACCH8C_CBCH, "SDCCH8_CBCH" },
-       { GSM_PCHAN_TCH_F_TCH_H_PDCH, "TCH_F_TCH_H_PDCH" },
+       { GSM_PCHAN_OSMO_DYN, "OSMO_DYN" },
        { 0,                    NULL }
 };

@@ -224,7 +224,7 @@
        { GSM_PCHAN_UNKNOWN,    "Unknown / Unsupported channel combination" },
        { GSM_PCHAN_CCCH_SDCCH4_CBCH, "FCCH + SCH + BCCH + CCCH + CBCH + 3 
SDCCH + 2 SACCH (Comb. V)" },
        { GSM_PCHAN_SDCCH8_SACCH8C_CBCH, "7 SDCCH + 4 SACCH + CBCH (Comb. VII)" 
},
-       { GSM_PCHAN_TCH_F_TCH_H_PDCH, "Dynamic TCH/F or TCH/H or GPRS PDCH" },
+       { GSM_PCHAN_OSMO_DYN, "Dynamic TCH/F or TCH/H or SDCCH/8 or GPRS PDCH" 
},
        { 0,                    NULL }
 };

@@ -604,7 +604,7 @@
        [GSM_PCHAN_CCCH_SDCCH4_CBCH] = 4,
        [GSM_PCHAN_SDCCH8_SACCH8C_CBCH] = 8,
        /* Dyn TS: maximum allowed subslots */
-       [GSM_PCHAN_TCH_F_TCH_H_PDCH] = 2,
+       [GSM_PCHAN_OSMO_DYN] = 2,
        [GSM_PCHAN_TCH_F_PDCH] = 1,
 };

@@ -628,7 +628,7 @@
        [GSM_PCHAN_SDCCH8_SACCH8C] = 0,
        [GSM_PCHAN_CCCH_SDCCH4_CBCH] = 0,
        [GSM_PCHAN_SDCCH8_SACCH8C_CBCH] = 0,
-       [GSM_PCHAN_TCH_F_TCH_H_PDCH] = 2,
+       [GSM_PCHAN_OSMO_DYN] = 2,
        [GSM_PCHAN_TCH_F_PDCH] = 2,
 };

@@ -832,7 +832,7 @@
                        return false;
                }

-       case GSM_PCHAN_TCH_F_TCH_H_PDCH:
+       case GSM_PCHAN_OSMO_DYN:
                switch (pchan) {
                case GSM_PCHAN_TCH_F:
                case GSM_PCHAN_TCH_H:
@@ -904,7 +904,7 @@
                        return false;
                }

-       case GSM_PCHAN_TCH_F_TCH_H_PDCH:
+       case GSM_PCHAN_OSMO_DYN:
                switch (type) {
                case GSM_LCHAN_TCH_F:
                case GSM_LCHAN_TCH_H:
diff --git a/src/osmo-bsc/handover_decision_2.c 
b/src/osmo-bsc/handover_decision_2.c
index 0966583..d778876 100644
--- a/src/osmo-bsc/handover_decision_2.c
+++ b/src/osmo-bsc/handover_decision_2.c
@@ -1005,7 +1005,7 @@
                c->current.free_tch = c->current.free_tchf;
                c->current.min_free_tch = c->current.min_free_tchf;
                c->current.lchan_frees_tchf = 1;
-               if (c->current.lchan->ts->pchan_on_init == 
GSM_PCHAN_TCH_F_TCH_H_PDCH)
+               if (c->current.lchan->ts->pchan_on_init == GSM_PCHAN_OSMO_DYN)
                        c->current.lchan_frees_tchh = 2;
                else
                        c->current.lchan_frees_tchh = 0;
@@ -1017,7 +1017,7 @@
                /* Freeing one of two TCH/H does not free a dyn TS and would 
not free a TCH/F. It has to be the last
                 * TCH/H of a dynamic timeslot that is freed to get a new TCH/F 
in the current cell from the handover.
                 * Hence the ts_usage_count() condition. */
-               if (c->current.lchan->ts->pchan_on_init == 
GSM_PCHAN_TCH_F_TCH_H_PDCH
+               if (c->current.lchan->ts->pchan_on_init == GSM_PCHAN_OSMO_DYN
                    && ts_usage_count(c->current.lchan->ts) == 1)
                        c->current.lchan_frees_tchf = 1;
                else
@@ -1034,7 +1034,7 @@

        /* Would the next TCH/F lchan occupy a dynamic timeslot that currently 
counts for free TCH/H timeslots? */
        next_lchan = lchan_avail_by_type(c->target.bts, GSM_LCHAN_TCH_F, false);
-       if (next_lchan && next_lchan->ts->pchan_on_init == 
GSM_PCHAN_TCH_F_TCH_H_PDCH)
+       if (next_lchan && next_lchan->ts->pchan_on_init == GSM_PCHAN_OSMO_DYN)
                c->target.next_tchf_reduces_tchh = 2;
        else
                c->target.next_tchf_reduces_tchh = 0;
@@ -1042,7 +1042,7 @@
        /* Would the next TCH/H lchan occupy a dynamic timeslot that currently 
counts for free TCH/F timeslots?
         * Note that a dyn TS already in TCH/H mode (half occupied) would not 
reduce free TCH/F. */
        next_lchan = lchan_avail_by_type(c->target.bts, GSM_LCHAN_TCH_H, false);
-       if (next_lchan && next_lchan->ts->pchan_on_init == 
GSM_PCHAN_TCH_F_TCH_H_PDCH
+       if (next_lchan && next_lchan->ts->pchan_on_init == GSM_PCHAN_OSMO_DYN
            && next_lchan->ts->pchan_is != GSM_PCHAN_TCH_H)
                c->target.next_tchh_reduces_tchf = 1;
        else
@@ -1568,7 +1568,7 @@

 static bool lchan_is_on_dynamic_ts(struct gsm_lchan *lchan)
 {
-       return lchan->ts->pchan_on_init == GSM_PCHAN_TCH_F_TCH_H_PDCH
+       return lchan->ts->pchan_on_init == GSM_PCHAN_OSMO_DYN
                || lchan->ts->pchan_on_init == GSM_PCHAN_TCH_F_PDCH;
 }

diff --git a/src/osmo-bsc/lchan_select.c b/src/osmo-bsc/lchan_select.c
index a1f6c82..5e9d800 100644
--- a/src/osmo-bsc/lchan_select.c
+++ b/src/osmo-bsc/lchan_select.c
@@ -70,7 +70,7 @@
                if (!ts_is_usable(ts))
                        continue;
                /* The caller first selects what kind of TS to search in, e.g. 
looking for exact
-                * GSM_PCHAN_TCH_F, or maybe among dynamic 
GSM_PCHAN_TCH_F_TCH_H_PDCH... */
+                * GSM_PCHAN_TCH_F, or maybe among dynamic 
GSM_PCHAN_OSMO_DYN... */
                if (ts->pchan_on_init != pchan) {
                        LOGPLCHANALLOC("%s is != %s\n", 
gsm_ts_and_pchan_name(ts),
                                       gsm_pchan_name(pchan));
@@ -227,7 +227,7 @@
                /* Try fully dynamic TCH/F_TCH/H_PDCH as TCH/F... */
                if (!lchan && bts->network->dyn_ts_allow_tch_f)
                        lchan = _lc_dyn_find_bts(bts,
-                                                GSM_PCHAN_TCH_F_TCH_H_PDCH,
+                                                GSM_PCHAN_OSMO_DYN,
                                                 GSM_PCHAN_TCH_F, log);
                break;
        case GSM_LCHAN_TCH_H:
@@ -236,7 +236,7 @@
                 * TCH/F_TCH/H_PDCH */
                if (!lchan)
                        lchan = _lc_dyn_find_bts(bts,
-                                                GSM_PCHAN_TCH_F_TCH_H_PDCH,
+                                                GSM_PCHAN_OSMO_DYN,
                                                 GSM_PCHAN_TCH_H, log);
                break;
        default:
diff --git a/src/osmo-bsc/timeslot_fsm.c b/src/osmo-bsc/timeslot_fsm.c
index b9c86df..2664245 100644
--- a/src/osmo-bsc/timeslot_fsm.c
+++ b/src/osmo-bsc/timeslot_fsm.c
@@ -85,7 +85,7 @@
                return LCHAN_IS_READY_TO_GO;

        switch (ts->pchan_on_init) {
-       case GSM_PCHAN_TCH_F_TCH_H_PDCH:
+       case GSM_PCHAN_OSMO_DYN:
                if (lchan->type == GSM_LCHAN_TCH_H)
                        return LCHAN_NEEDS_PCHAN_CHANGE;
                /* fall thru */
@@ -241,7 +241,7 @@
        }

        switch (ts->pchan_on_init) {
-       case GSM_PCHAN_TCH_F_TCH_H_PDCH:
+       case GSM_PCHAN_OSMO_DYN:
                ts_set_pchan_is(ts, GSM_PCHAN_NONE);
                break;
        case GSM_PCHAN_TCH_F_PDCH:
@@ -314,7 +314,7 @@
        }

        switch (ts->pchan_on_init) {
-       case GSM_PCHAN_TCH_F_TCH_H_PDCH:
+       case GSM_PCHAN_OSMO_DYN:
        case GSM_PCHAN_TCH_F_PDCH:
                if (bts->gprs.mode == BTS_GPRS_NONE) {
                        LOG_TS(ts, LOGL_DEBUG, "GPRS mode is 'none': not 
activating PDCH.\n");
@@ -451,7 +451,7 @@

        /* Set pchan = PDCH status, but double check. */
        switch (ts->pchan_on_init) {
-       case GSM_PCHAN_TCH_F_TCH_H_PDCH:
+       case GSM_PCHAN_OSMO_DYN:
        case GSM_PCHAN_TCH_F_PDCH:
        case GSM_PCHAN_PDCH:
                ts_set_pchan_is(ts, GSM_PCHAN_PDCH);
@@ -526,7 +526,7 @@
        case TS_EV_PDCH_DEACT_ACK:
                /* Remove pchan = PDCH status, but double check. */
                switch (ts->pchan_on_init) {
-               case GSM_PCHAN_TCH_F_TCH_H_PDCH:
+               case GSM_PCHAN_OSMO_DYN:
                        ts_set_pchan_is(ts, GSM_PCHAN_NONE);
                        break;
                case GSM_PCHAN_TCH_F_PDCH:
@@ -650,8 +650,8 @@
        }

        /* Make sure dyn TS pchan_is is updated. For TCH/F_PDCH, there are only 
PDCH or TCH/F modes, but
-        * for Osmocom style TCH/F_TCH/H_PDCH the pchan_is == NONE until an 
lchan is activated. */
-       if (ts->pchan_on_init == GSM_PCHAN_TCH_F_TCH_H_PDCH)
+        * for Osmocom style TCH/F_TCH/H_SDCCH8_PDCH the pchan_is == NONE until 
an lchan is activated. */
+       if (ts->pchan_on_init == GSM_PCHAN_OSMO_DYN)
                ts_set_pchan_is(ts, gsm_pchan_by_lchan_type(activating_type));
        ts_lchans_dispatch(ts, LCHAN_ST_WAIT_TS_READY, LCHAN_EV_TS_READY);
 }
@@ -1019,7 +1019,7 @@
                 * waiting for PDCH DEACT (N)ACK */
                if (target_pchan) {
                        switch (ts->pchan_on_init) {
-                       case GSM_PCHAN_TCH_F_TCH_H_PDCH:
+                       case GSM_PCHAN_OSMO_DYN:
                                if (target_pchan)
                                        *target_pchan = GSM_PCHAN_NONE;
                                break;
diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py
index 64f93fc..bd2cb10 100755
--- a/tests/ctrl_test_runner.py
+++ b/tests/ctrl_test_runner.py
@@ -234,7 +234,7 @@
         self.assertEqual(r['value'],
                'CCCH+SDCCH4,0,0 TCH/F,0,0 TCH/H,0,0 SDCCH8,0,0'
                + ' TCH/F_PDCH,0,0 CCCH+SDCCH4+CBCH,0,0'
-               + ' SDCCH8+CBCH,0,0 TCH/F_TCH/H_PDCH,0,0')
+               + ' SDCCH8+CBCH,0,0 TCH/F_TCH/H_SDCCH8_PDCH,0,0')

     def testBtsOmlConnectionState(self):
         """Check OML state. It will not be connected"""
diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index bcf9019..2ff9f31 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -187,7 +187,7 @@
 {
        enum gsm_phys_chan_config pchan;
        if (!strcmp(str, "dyn"))
-               return GSM_PCHAN_TCH_F_TCH_H_PDCH;
+               return GSM_PCHAN_OSMO_DYN;
        if (!strcmp(str, "c+s4"))
                return GSM_PCHAN_CCCH_SDCCH4;
        if (!strcmp(str, "-"))
@@ -270,7 +270,7 @@

                        /* Unused dyn TS start out as used for PDCH */
                        switch (trx->ts[i].pchan_on_init) {
-                       case GSM_PCHAN_TCH_F_TCH_H_PDCH:
+                       case GSM_PCHAN_OSMO_DYN:
                        case GSM_PCHAN_TCH_F_PDCH:
                                ts_set_pchan_is(&trx->ts[i], GSM_PCHAN_PDCH);
                                break;
@@ -392,7 +392,7 @@
        /* Fake osmo_mgcpc_ep_ci to indicate that the lchan is used for voice */
        lchan->mgw_endpoint_ci_bts = (void*)1;

-       if (lchan->ts->pchan_on_init == GSM_PCHAN_TCH_F_TCH_H_PDCH)
+       if (lchan->ts->pchan_on_init == GSM_PCHAN_OSMO_DYN)
                ts_set_pchan_is(lchan->ts, full_rate ? GSM_PCHAN_TCH_F : 
GSM_PCHAN_TCH_H);
        if (lchan->ts->pchan_on_init == GSM_PCHAN_TCH_F_PDCH) {
                OSMO_ASSERT(full_rate);
@@ -722,7 +722,7 @@

                /* send dyn TS back to PDCH if unused */
                switch (lchan->ts->pchan_on_init) {
-               case GSM_PCHAN_TCH_F_TCH_H_PDCH:
+               case GSM_PCHAN_OSMO_DYN:
                case GSM_PCHAN_TCH_F_PDCH:
                        switch (lchan->ts->pchan_is) {
                        case GSM_PCHAN_TCH_H:
@@ -884,8 +884,8 @@
       "Create N TRX in the new BTS\n"
       "TRX count\n"
       "Timeslot config\n"
-      "Timeslot types for 8 * trx-count, each being one of 
CCCH+SDCCH4|SDCCH8|TCH/F|TCH/H|TCH/F_TCH/H_PDCH|...;"
-      " shorthands: cs+4 = CCCH+SDCCH4; dyn = TCH/F_TCH/H_PDCH\n")
+      "Timeslot types for 8 * trx-count, each being one of 
CCCH+SDCCH4|SDCCH8|TCH/F|TCH/H|TCH/F_TCH/H_SDCCH8_PDCH|...;"
+      " shorthands: cs+4 = CCCH+SDCCH4; dyn = TCH/F_TCH/H_SDCCH8_PDCH\n")
 {
        int num_trx = atoi(argv[0]);
        VTY_ECHO();

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/24785
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Id5b89fe589a52ff88486435ac43809edb4b80f98
Gerrit-Change-Number: 24785
Gerrit-PatchSet: 5
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <[email protected]>
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: neels <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to