diff --git a/TODO-RELEASE b/TODO-RELEASE index e64aebbac..a9bf06c4d 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -12,3 +12,4 @@ libosmogsm >1.5.1 enum entry GSM0808_FE_IE_LAST_USED_EUTRAN_PLMN_I 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 1b33d7395..acd22000c 100644 --- a/doc/manuals/chapters/bts.adoc +++ b/doc/manuals/chapters/bts.adoc @@ -295,7 +295,7 @@ all BTS models support dynamic channels. .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 @@ non-standard RSL messages used for these timeslot kinds. 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 <>. @@ -361,15 +361,15 @@ network 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 65c3be511..2e88129dd 100644 --- a/include/osmocom/bsc/bts.h +++ b/include/osmocom/bsc/bts.h @@ -166,8 +166,8 @@ enum { 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 31759cc58..b07345de0 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -796,7 +796,7 @@ struct gsm_bts_trx_ts { * 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 @@ struct gsm_network { /* 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 c98d2258f..7c0439413 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -1892,7 +1892,7 @@ static int verify_chan_comb(struct gsm_bts_trx_ts *ts, uint8_t chan_comb, 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 @@ static int verify_chan_comb(struct gsm_bts_trx_ts *ts, uint8_t chan_comb, 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 @@ static int verify_chan_comb(struct gsm_bts_trx_ts *ts, uint8_t chan_comb, 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 61db4373a..8ee6371c0 100644 --- a/src/osmo-bsc/abis_om2000.c +++ b/src/osmo-bsc/abis_om2000.c @@ -1411,7 +1411,7 @@ static uint8_t pchan2comb(enum gsm_phys_chan_config pchan) 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 @@ static uint8_t ts2comb(struct gsm_bts_trx_ts *ts) 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 809cd9bc0..f0adc566f 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -1054,7 +1054,7 @@ int rsl_release_request(struct gsm_lchan *lchan, uint8_t link_id, 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 @@ int rsl_tx_dyn_ts_pdch_act_deact(struct gsm_bts_trx_ts *ts, bool activate) 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 efa59d3e1..070b66081 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -1484,7 +1484,7 @@ static void vty_out_dyn_ts_details(struct vty *vty, struct gsm_bts_trx_ts *ts) { /* 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 @@ DEFUN_USRATTR(cfg_ts_pchan, } /* 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 @@ DEFUN_HIDDEN(cfg_ts_pchan_compat, 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 @@ DEFUN(pdch_act, pdch_act_cmd, 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 @@ static int lchan_act_single(struct vty *vty, struct gsm_lchan *lchan, const char 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 @@ static int lchan_act_trx(struct vty *vty, struct gsm_bts_trx *trx, int activate) 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 @@ static int lchan_act_trx(struct vty *vty, struct gsm_bts_trx *trx, int activate) 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 8608767ec..cf3a6b8cd 100644 --- a/src/osmo-bsc/bts.c +++ b/src/osmo-bsc/bts.c @@ -1256,13 +1256,13 @@ const struct osmo_stat_item_desc bts_stat_desc[] = { { "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 bef98c029..f183d4ba3 100644 --- a/src/osmo-bsc/bts_trx.c +++ b/src/osmo-bsc/bts_trx.c @@ -216,7 +216,7 @@ struct gsm_lchan *rsl_lchan_lookup(struct gsm_bts_trx *trx, uint8_t chan_nr, 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 @@ int trx_count_free_ts(struct gsm_bts_trx *trx, enum gsm_phys_chan_config pchan) 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 f2a41b77f..fea4efd9f 100644 --- a/src/osmo-bsc/chan_alloc.c +++ b/src/osmo-bsc/chan_alloc.c @@ -59,10 +59,10 @@ void bts_chan_load(struct pchan_load *cl, const struct gsm_bts *bts) 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 @@ static void chan_load_stat_set(enum gsm_phys_chan_config pchan, 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 58a7867c5..9b4b37f8d 100644 --- a/src/osmo-bsc/codec_pref.c +++ b/src/osmo-bsc/codec_pref.c @@ -197,7 +197,7 @@ static bool test_codec_support_bts(const struct gsm_bts *bts, uint8_t perm_spch) 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 0d1395c70..30590fb8e 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -191,7 +191,7 @@ const struct value_string gsm_pchant_names[] = { { 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 @@ const struct value_string gsm_pchan_ids[] = { { 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 @@ const struct value_string gsm_pchant_descs[13] = { { 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 @@ static const uint8_t subslots_per_pchan[] = { [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 @@ static const uint8_t subslots_per_pchan_vamos[] = { [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 @@ bool ts_is_capable_of_pchan(struct gsm_bts_trx_ts *ts, enum gsm_phys_chan_config 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 @@ bool ts_is_capable_of_lchant(struct gsm_bts_trx_ts *ts, enum gsm_chan_t type) 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 0966583eb..d77887618 100644 --- a/src/osmo-bsc/handover_decision_2.c +++ b/src/osmo-bsc/handover_decision_2.c @@ -1005,7 +1005,7 @@ static void candidate_set_free_tch(struct ho_candidate *c) 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 @@ static void candidate_set_free_tch(struct ho_candidate *c) /* 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 @@ static void candidate_set_free_tch(struct ho_candidate *c) /* 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 @@ static void candidate_set_free_tch(struct ho_candidate *c) /* 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 void on_measurement_report(struct gsm_meas_rep *mr) 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 a1f6c8266..5e9d800ea 100644 --- a/src/osmo-bsc/lchan_select.c +++ b/src/osmo-bsc/lchan_select.c @@ -70,7 +70,7 @@ _lc_find_trx(struct gsm_bts_trx *trx, enum gsm_phys_chan_config pchan, 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 @@ struct gsm_lchan *lchan_avail_by_type(struct gsm_bts *bts, enum gsm_chan_t type, /* 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 @@ struct gsm_lchan *lchan_avail_by_type(struct gsm_bts *bts, enum gsm_chan_t type, * 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 b9c86df96..266424510 100644 --- a/src/osmo-bsc/timeslot_fsm.c +++ b/src/osmo-bsc/timeslot_fsm.c @@ -85,7 +85,7 @@ static enum lchan_sanity is_lchan_sane(struct gsm_bts_trx_ts *ts, struct gsm_lch 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 @@ static void ts_setup_lchans(struct gsm_bts_trx_ts *ts) } 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 @@ static void ts_fsm_unused_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) } 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 @@ static void ts_fsm_pdch_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) /* 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 @@ static void ts_fsm_wait_pdch_deact(struct osmo_fsm_inst *fi, uint32_t event, voi 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 @@ static void ts_fsm_in_use_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) } /* 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 @@ bool ts_is_pchan_switching(struct gsm_bts_trx_ts *ts, enum gsm_phys_chan_config * 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 64f93fc1d..bd2cb1061 100755 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -234,7 +234,7 @@ class TestCtrlBSC(TestCtrlBase): 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 bcf9019c9..2ff9f31df 100644 --- a/tests/handover/handover_test.c +++ b/tests/handover/handover_test.c @@ -187,7 +187,7 @@ enum gsm_phys_chan_config pchan_from_str(const char *str) { 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 @@ static struct gsm_bts *_create_bts(int num_trx, const char * const *ts_args, int /* 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 @@ struct gsm_lchan *lchan_act(struct gsm_lchan *lchan, int full_rate, const char * /* 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 @@ int __wrap_abis_rsl_sendmsg(struct msgb *msg) /* 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 @@ DEFUN(create_bts, create_bts_cmd, "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();