osmo-bsc/include/osmocom/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 bsc_api.h to gsm_08_08.h 2018-07-28 12:18:23 +02:00
a_reset.h GSCON: call api of a_reset.c with msc object directly 2018-08-07 15:11:41 +00:00
abis_nm.h fix dyn TS init: properly identify BTS on OML OPSTART ACK 2018-06-15 21:00:31 +02:00
abis_om2000.h move include/openbsc to include/osmocom/bsc 2017-09-06 16:26:13 +02:00
abis_rsl.h large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
acc_ramp.h ensure that acc_ramp_init() is only called once 2018-04-11 16:53:05 +00:00
arfcn_range_encode.h move include/openbsc to include/osmocom/bsc 2017-09-06 16:26:13 +02:00
assignment_fsm.h large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
bsc_msc_data.h MGCP: add 'X-Osmo-IGN: C' for SCCPlite by default 2018-08-25 17:07:20 +02:00
bsc_msg_filter.h Rename bsc_msg_acc_lst_vty_init to have more uniform prefix 2018-06-28 12:58:53 +02:00
bsc_rll.h move include/openbsc to include/osmocom/bsc 2017-09-06 16:26:13 +02:00
bsc_subscr_conn_fsm.h large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
bsc_subscriber.h use __FILE__, not __BASE_FILE__ 2018-08-20 12:40:43 +02:00
bss.h dissolve libbsc: move all to src/osmo-bsc, link .o files 2018-06-07 19:09:06 +02:00
bts_ipaccess_nanobts_omlattr.h move include/openbsc to include/osmocom/bsc 2017-09-06 16:26:13 +02:00
chan_alloc.h large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
codec_pref.h large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
ctrl.h Support control connection status query for a particular MSC. 2018-01-09 11:18:10 +00:00
debug.h create separate logging categories for lchan,ts,as FSMs 2018-07-28 12:18:23 +02:00
e1_config.h libcommon: join gsm_data_shared.* into gsm_data.* 2018-02-14 12:15:40 +01:00
gsm_04_08_rr.h gsm48_lchan2chan_desc() belongs to gsm_data.h 2018-09-09 17:23:56 +02:00
gsm_04_80.h bsc/gsm_04_80.h: clean up useless declarations 2018-01-12 14:06:56 +00:00
gsm_08_08.h cosmetic: rename bsc_api.h to gsm_08_08.h 2018-07-28 12:18:23 +02:00
gsm_data.h Introduce gsm48_lchan2chan_desc_as_configured() 2018-09-09 17:23:56 +02:00
gsm_timers.h large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
handover.h large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
handover_cfg.h ho cfg: fix unit strings 2018-07-21 17:08:00 +00:00
handover_decision.h HO: make bts_by_arfcn_bsic() public 2018-01-19 22:09:19 +00:00
handover_decision_2.h HO: Implement load based handover, as handover_decision_2.c 2018-02-19 17:11:47 +01:00
handover_fsm.h large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
handover_vty.h HO: cfg: tweak vty write 2018-02-16 16:11:16 +01:00
ipaccess.h Fix heap-use-after-free due to OML link destruction 2018-08-23 16:47:30 +02:00
lchan_fsm.h ts,lchan_fsm: do not attempt to allocate CBCH subslots 2018-09-11 02:08:41 +02:00
lchan_rtp_fsm.h lchan_fsm: split off lchan_rtp_fsm, establish RTP a bit earlier 2018-07-28 12:18:23 +02:00
lchan_select.h large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
meas_feed.h resurrect meas_feed.c: vty, vty-test 2018-05-04 15:02:24 +00:00
meas_rep.h move include/openbsc to include/osmocom/bsc 2017-09-06 16:26:13 +02:00
mgw_endpoint_fsm.h gscon: use BSS-common payload types on BSS side 2018-08-01 11:27:17 +02:00
misdn.h move include/openbsc to include/osmocom/bsc 2017-09-06 16:26:13 +02:00
neighbor_ident.h inter-BSC HO: neighbor_ident API: drop 9bit BSIC 2018-07-28 12:18:23 +02:00
network_listen.h move include/openbsc to include/osmocom/bsc 2017-09-06 16:26:13 +02:00
openbscdefines.h move include/openbsc to include/osmocom/bsc 2017-09-06 16:26:13 +02:00
osmo_bsc.h cosmetic: reduce bsc_api.h 2018-07-28 12:18:23 +02:00
osmo_bsc_grace.h Implement support for paging based on CI (cell identifier). 2018-01-15 10:46:43 +00:00
osmo_bsc_lcls.h large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
osmo_bsc_reset.h move include/openbsc to include/osmocom/bsc 2017-09-06 16:26:13 +02:00
osmo_bsc_rf.h move include/openbsc to include/osmocom/bsc 2017-09-06 16:26:13 +02:00
osmo_bsc_sigtran.h Remove 'struct bsc_msc_connection' + fix IPA-encapsulated CTRL 2018-05-27 20:17:02 +02:00
osmux.h move include/openbsc to include/osmocom/bsc 2017-09-06 16:26:13 +02:00
paging.h Move BTS selection for paging from osmo_bsc_grace.c into osmo_bsc_bssap.c. 2018-01-16 14:14:01 +01:00
pcu_if.h move include/openbsc to include/osmocom/bsc 2017-09-06 16:26:13 +02:00
pcuif_proto.h pcu_if: implement support for 3-digit MNC 2018-03-11 00:45:45 +01:00
penalty_timers.h cosmetic: penalty timers: constify, tweak doc 2018-06-08 16:16:42 +00:00
rest_octets.h Generate SI2bis Rest Octets 2017-12-12 18:00:56 +00:00
rs232.h move include/openbsc to include/osmocom/bsc 2017-09-06 16:26:13 +02:00
signal.h fix dyn TS init: properly identify BTS on OML OPSTART ACK 2018-06-15 21:00:31 +02:00
system_information.h move include/openbsc to include/osmocom/bsc 2017-09-06 16:26:13 +02:00
timeslot_fsm.h large refactoring: use FSMs for lchans; add inter-BSC HO 2018-07-28 12:18:23 +02:00
ussd.h move include/openbsc to include/osmocom/bsc 2017-09-06 16:26:13 +02:00
vty.h vty: drop unused vty definitions (*_NODE, msc_*) 2018-03-22 17:27:57 +00:00