osmo-bsc/src/osmo-bsc
Neels Hofmeyr 526b4a5f35 ts,lchan_fsm: do not attempt to allocate CBCH subslots
In case a given channel combination contains a CBCH, it replaces sub-slot 2
with a CBCH, i.e. we must not attempt to allocate the same for SDCCH.

On timeslot initialization, immediately place such an lchan FSM into new state
LCHAN_ST_CBCH, so that it never appears unused and never is picked during
lchan_select(). Also set lchan->type = GSM_LCHAN_CBCH.

Verified by configuring CBCH timeslots and watching 'show lchan summary'.

Immediately after RSL and OML are up, these pchan types show lchan 2 in state
CBCH:

  BTS 0, TRX 0, Timeslot 0 CCCH+SDCCH4+CBCH, Lchan 2, Type CBCH, State CBCH - L1 MS Power: 0 dBm RXL-FULL-dl: -110 dBm RXL-FULL-ul: -110 dBm
  BTS 0, TRX 0, Timeslot 1 SDCCH8+CBCH, Lchan 2, Type CBCH, State CBCH - L1 MS Power: 0 dBm RXL-FULL-dl: -110 dBm RXL-FULL-ul: -110 dBm

With a 'phys_chan_config ccch+sdcch4+cbch' and three phones simultaneously
requesting USSD, I see:

  BTS 0, TRX 0, Timeslot 0 CCCH+SDCCH4+CBCH, Lchan 0, Type SDCCH, State ESTABLISHED - L1 MS Power: 14 dBm RXL-FULL-dl:  -53 dBm RXL-FULL-ul:  -47 dBm
  BTS 0, TRX 0, Timeslot 0 CCCH+SDCCH4+CBCH, Lchan 1, Type SDCCH, State ESTABLISHED - L1 MS Power: 30 dBm RXL-FULL-dl:  -47 dBm RXL-FULL-ul:  -47 dBm
  BTS 0, TRX 0, Timeslot 0 CCCH+SDCCH4+CBCH, Lchan 2, Type CBCH, State CBCH - L1 MS Power: 0 dBm RXL-FULL-dl: -110 dBm RXL-FULL-ul: -110 dBm
  BTS 0, TRX 0, Timeslot 0 CCCH+SDCCH4+CBCH, Lchan 3, Type SDCCH, State ESTABLISHED - L1 MS Power: 16 dBm RXL-FULL-dl:  -47 dBm RXL-FULL-ul:  -47 dBm

With 'phys_chan_config SDCCH8+CBCH' and three phones simultaneously attaching,
I see:

  BTS 0, TRX 0, Timeslot 1 SDCCH8+CBCH, Lchan 0, Type SDCCH, State WAIT_RLL_RTP_ESTABLISH - L1 MS Power: 0 dBm RXL-FULL-dl: -110 dBm RXL-FULL-ul: -110 dBm
  BTS 0, TRX 0, Timeslot 1 SDCCH8+CBCH, Lchan 1, Type SDCCH, State WAIT_RLL_RTP_ESTABLISH - L1 MS Power: 0 dBm RXL-FULL-dl: -110 dBm RXL-FULL-ul: -110 dBm
  BTS 0, TRX 0, Timeslot 1 SDCCH8+CBCH, Lchan 2, Type CBCH, State CBCH - L1 MS Power: 0 dBm RXL-FULL-dl: -110 dBm RXL-FULL-ul: -110 dBm
  BTS 0, TRX 0, Timeslot 1 SDCCH8+CBCH, Lchan 3, Type SDCCH, State WAIT_RLL_RTP_ESTABLISH - L1 MS Power: 0 dBm RXL-FULL-dl: -110 dBm RXL-FULL-ul: -110 dBm

i.e. in all cases the CBCH lchan remains occupied and is not allocated as
SDCCH.

Detaching and re-attaching the BTS reliably brings back the CBCH state. Also
verified that changing the osmo-bsc config from telnet vty and dropping oml
followed by the BTS re-attaching brings back the CBCH state.

Change-Id: I2bafc5f696e818e38f8907ad0c8f38494df0623d
2018-09-11 02:08:41 +02:00
..
Makefile.am cosmetic: rename osmo_bsc_api.c to gsm_08_08.c 2018-07-28 12:18:23 +02:00
a_reset.c GSCON: call api of a_reset.c with msc object directly 2018-08-07 15:11:41 +00:00
abis_bs11.c dissolve libbsc: move all to src/osmo-bsc, link .o files 2018-06-07 19:09:06 +02:00
abis_nm.c abis_nm_ipaccess_rsl_connect: Log bts and trx nr 2018-08-23 17:20:09 +02:00
abis_nm_ipaccess.c dissolve libbsc: move all to src/osmo-bsc, link .o files 2018-06-07 19:09:06 +02:00
abis_nm_vty.c dissolve libbsc: move all to src/osmo-bsc, link .o files 2018-06-07 19:09:06 +02:00
abis_om2000.c large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
abis_om2000_vty.c dissolve libbsc: move all to src/osmo-bsc, link .o files 2018-06-07 19:09:06 +02:00
abis_rsl.c inter-BSC HO outgoing: fix L3 forwarding 2018-09-07 16:24:32 +02:00
acc_ramp.c dissolve libbsc: move all to src/osmo-bsc, link .o files 2018-06-07 19:09:06 +02:00
arfcn_range_encode.c dissolve libbsc: move all to src/osmo-bsc, link .o files 2018-06-07 19:09:06 +02:00
assignment_fsm.c SCCPlite Assignment Complete: include Speech Codec (Chosen) 2018-09-07 16:24:32 +02:00
bsc_ctrl_commands.c dissolve libbsc: move all to src/osmo-bsc, link .o files 2018-06-07 19:09:06 +02:00
bsc_ctrl_lookup.c dissolve libbsc: move all to src/osmo-bsc, link .o files 2018-06-07 19:09:06 +02:00
bsc_init.c rename gsm_04_08_utils.[hc] to gsm_04_08_rr 2018-07-28 12:18:23 +02:00
bsc_rf_ctrl.c dissolve libbsc: move all to src/osmo-bsc, link .o files 2018-06-07 19:09:06 +02:00
bsc_rll.c dissolve libbsc: move all to src/osmo-bsc, link .o files 2018-06-07 19:09:06 +02:00
bsc_subscr_conn_fsm.c GSCON: call api of a_reset.c with msc object directly 2018-08-07 15:11:41 +00:00
bsc_subscriber.c large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
bsc_vty.c cbch: Don't send cell-broadcast command on BTS without CBCH channel 2018-09-09 14:51:36 +02:00
bts_ericsson_rbs2000.c fix nanobts: timeslot FSM: use flags to remember OML,RSL status 2018-07-28 12:18:23 +02:00
bts_init.c dissolve libbsc: move all to src/osmo-bsc, link .o files 2018-06-07 19:09:06 +02:00
bts_ipaccess_nanobts.c Fix heap-use-after-free due to OML link destruction 2018-08-23 16:47:30 +02:00
bts_ipaccess_nanobts_omlattr.c add gsm_timers, for Tnnn definitions usable by FSMs 2018-07-28 12:18:23 +02:00
bts_nokia_site.c large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
bts_siemens_bs11.c large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
bts_sysmobts.c dissolve libbsc: move all to src/osmo-bsc, link .o files 2018-06-07 19:09:06 +02:00
bts_unknown.c dissolve libbsc: move all to src/osmo-bsc, link .o files 2018-06-07 19:09:06 +02:00
chan_alloc.c large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
codec_pref.c codec_pref.c: Add comment in expected switch case without break 2018-09-07 09:10:59 +00:00
e1_config.c dissolve libbsc: move all to src/osmo-bsc, link .o files 2018-06-07 19:09:06 +02:00
gsm_04_08_rr.c cosmetic: rename bsc_api.h to gsm_08_08.h 2018-07-28 12:18:23 +02:00
gsm_04_80_utils.c fix / clarify rsl dtap cache 2018-07-28 12:18:23 +02:00
gsm_08_08.c GSCON: call api of a_reset.c with msc object directly 2018-08-07 15:11:41 +00:00
gsm_data.c CBCH: Fix gsm_bts_get_cbch() 2018-09-09 17:23:56 +02:00
gsm_timers.c large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
gsm_timers_vty.c add gsm_timers, for Tnnn definitions usable by FSMs 2018-07-28 12:18:23 +02:00
handover_cfg.c dissolve libbsc: move all to src/osmo-bsc, link .o files 2018-06-07 19:09:06 +02:00
handover_decision.c large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
handover_decision_2.c large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
handover_fsm.c ho fsm: handle RR HO Failure for inter-BSC outgoing 2018-09-10 00:51:35 +00:00
handover_logic.c large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
handover_vty.c dissolve libbsc: move all to src/osmo-bsc, link .o files 2018-06-07 19:09:06 +02:00
lchan_fsm.c ts,lchan_fsm: do not attempt to allocate CBCH subslots 2018-09-11 02:08:41 +02:00
lchan_rtp_fsm.c log: lchan_rtp_fsm: add missing '\n' 2018-08-29 02:02:10 +02:00
lchan_select.c large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
meas_feed.c large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
meas_rep.c dissolve libbsc: move all to src/osmo-bsc, link .o files 2018-06-07 19:09:06 +02:00
mgw_endpoint_fsm.c gscon: use BSS-common payload types on BSS side 2018-08-01 11:27:17 +02:00
neighbor_ident.c inter-BSC HO: neighbor_ident API: drop 9bit BSIC 2018-07-28 12:18:23 +02:00
neighbor_ident_vty.c neighbor_ident_vty.c: fix CI format, should be 16bit 2018-08-29 02:00:33 +02:00
net_init.c add gsm_timers, for Tnnn definitions usable by FSMs 2018-07-28 12:18:23 +02:00
osmo_bsc_bssap.c inter-BSC HO incoming: send BSSMAP HO Complete directly 2018-09-07 16:24:32 +02:00
osmo_bsc_ctrl.c large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
osmo_bsc_filter.c large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
osmo_bsc_grace.c large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
osmo_bsc_lcls.c lcls: do not LCLS call legs with different codecs 2018-08-08 13:02:58 +02:00
osmo_bsc_main.c Fix heap-use-after-free due to OML link destruction 2018-08-23 16:47:30 +02:00
osmo_bsc_msc.c Remove 'struct bsc_msc_connection' + fix IPA-encapsulated CTRL 2018-05-27 20:17:02 +02:00
osmo_bsc_sigtran.c fix dependency bug: include mgcp_client/, not mgcp/ 2018-08-29 13:31:57 +02:00
osmo_bsc_vty.c MGCP: add 'X-Osmo-IGN: C' for SCCPlite by default 2018-08-25 17:07:20 +02:00
paging.c cosmetic: rename bsc_api.h to gsm_08_08.h 2018-07-28 12:18:23 +02:00
pcu_sock.c large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
penalty_timers.c cosmetic: penalty timers: constify, tweak doc 2018-06-08 16:16:42 +00:00
rest_octets.c dissolve libbsc: move all to src/osmo-bsc, link .o files 2018-06-07 19:09:06 +02:00
system_information.c CBCH: Fix SI4 CBCH IE generation 2018-09-09 17:23:56 +02:00
timeslot_fsm.c ts,lchan_fsm: do not attempt to allocate CBCH subslots 2018-09-11 02:08:41 +02:00