summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2022-09-19mobile: vty: add 'audio_frame' cmdneels/voiceNeels Hofmeyr1-0/+24
2022-09-19mobile: gsm_send_voice(): fix err msgNeels Hofmeyr1-1/+1
2022-09-19mobile: log rx/tx audio frame NOT FOR MERGENeels Hofmeyr1-1/+6
2022-09-07trxcon: Initial support for forwarding AMRPau Espin Pedrol14-111/+407
This allows TTCN3 L1CTL module (used in BTS_Tests) to transmit and receive AMR payloads towards osmo-bts-trx. Related: SYS#5987 Change-Id: Ia20bc96e39726a919a556c83c8be48cb31af7331
2022-09-03trxcon: cosmetic: alignment fix in trxcon_inst_alloc()Vadim Yanitskiy1-3/+3
Change-Id: Icaab38b2b9e2885c4b3080140888d4b331578bb3
2022-09-03trxcon: trx_if_open(): avoid using talloc_reparent()Vadim Yanitskiy1-15/+12
For consistency with trxcon_inst_alloc(): * first allocate an instance of trx_fsm as a child of trxcon->fi, * then allocate a trx_instance as a child of the trx_fsm. Change-Id: Iafc486347c6ca7a80da88be73c772397fa2deb7d
2022-09-03trxcon: handle l1sched_config_req via TRXCON_EV_SET_PHY_CONFIG_REQVadim Yanitskiy4-11/+43
Calling l1sched_free() from trxcon_fsm_pre_term_cb() may result in l1sched_handle_config_req() being called when trxcon->phyif is NULL. Handling l1sched_config_req via TRXCON_EV_SET_PHY_CONFIG_REQ guards us against NULL pointer dereference during teardown of a trxcon_fsm instance, if it's caused by TRXCON_EV_PHYIF_FAILURE. Change-Id: I44bbc695e8a406a7acb9c163bf223f4ea966ea12 Related: OS#5599
2022-09-03trxcon: rework trxcon_inst cleanup logic, add trxcon_fsm_pre_term_cb()Vadim Yanitskiy2-25/+44
* trxcon_inst_alloc(): allocate trxcon_fsm as a child of the given ctx. * trxcon_inst_alloc(): allocate trxcon_inst as a child of trxcon_fsm. * trxcon_inst_free(): move the cleanup logic to .pre_term() callback of the trxcon_fsm, represented by new trxcon_fsm_pre_term_cb(). * trxcon_allstate_action() properly handle TRXCON_EV_{PHYIF,L2IF}_FAILURE. Change-Id: I5eb8ef6f62b1dc949dc60eaa558f123b3b93819c Related: OS#5599
2022-09-01trxcon: Fix printf typePau Espin Pedrol1-1/+1
data_len is a size_t, and gcc warns about it. Change-Id: Ib0c1bfefc0371b8cfb3b7a2e74a6980dd3987931
2022-08-30mobile: lapdm_channel_init() is deprecated, use lapdm_channel_init3()Vadim Yanitskiy1-7/+12
Change-Id: I320381488046f9b1780a53b8d5d27e470da727c4
2022-08-23mobile: mobile_start(): fix grammar in logging messagesVadim Yanitskiy1-2/+2
Change-Id: Ibe8afb6a79613096c4ace86cc44867d0e9f8de76
2022-08-23mobile: fix description of 'test re-selection' commandVadim Yanitskiy1-1/+4
Change-Id: I254effd067b64ae0bfe1afe646701c0c6ea942ea
2022-08-21layer23: explicitly set chan_nr / link_id in L1CTL_RACH_REQVadim Yanitskiy3-5/+12
The underlying L1 implementation uses both chan_nr and link_id to determine a logical channel for sending an Access Burst. If not set (both 0x00), RSL_CHAN_RACH is assumed. Indicate it implicitly. Change-Id: Ia40f67920bd712e572b8ea5219eb83064106bd5d
2022-08-21layer23: use $(top_builddir) instead of relative pathsVadim Yanitskiy2-2/+2
Change-Id: Ib2c9264b2a3cdef9b9852bdead94bae03185fec8
2022-08-21layer23: use $(top_srcdir) instead of relative pathsVadim Yanitskiy1-5/+5
Change-Id: I320ed2295c0c8e12a46be416e3dbda8865987424
2022-08-21layer23: cosmetic: make Makefile.am files git-friendlyVadim Yanitskiy3-21/+123
Change-Id: I26d7ff4ae278b5b465863252fe12ac1b46780dc7
2022-08-09trxcon: allow populating global SACCH cache via L1CTLVadim Yanitskiy6-63/+75
There is a time window between activation of a dedicated channel and receipt of a L1CTL_DATA_REQ with the first RR Measurement Report, in which trxcon may need to start transmission on Uplink SACCH. In this case trxcon is using a dummy SACCH block with hard-coded L1 SACCH header values and hard-coded Measurement Results. This mimics behavior of the layer1 implementation in firmware for Calypso phones. When running the mobile application, this error can be seen: DAPP ERROR trxcon(0)[0x55ee57bee1a0]{FBSB_SEARCH}: Event TRXCON_EV_RX_DATA_IND not permitted which means that the mobile is sending L1CTL_DATA_REQ *before* establishing a dedicated channel. And this message contains an RR Measurement Report. The idea behind this is to populate the SACCH cache in advance and thus avoid sending dummy values. Let's allow the L2 apps populating SACCH cache before establishing a dedicated connection using new TRXCON_EV_UPDATE_SACCH_CACHE_REQ. Change-Id: I0f467fc07cf844cc73465f235b36ba7d00788c9f Related: OS#5635, OS#5599
2022-08-08trxcon: rework TRXC/TRXD cleanup logic, add trx_fsm_cleanup_cb()Vadim Yanitskiy1-2/+19
Change-Id: Ic599b51067cb5a331fca521a5b46ab0a2804e499 Related: OS#5599
2022-08-08trxcon: improve L1CTL connection related loggingVadim Yanitskiy1-5/+11
* l1ctl_client_conn_close(): log "Closing L1CTL connection"; * l1ctl_client_read_cb(): more precise logging, use strerror(). Change-Id: Ie932513f93fd7f1a5f5e70f4d78235551f7599c8 Related: OS#5599
2022-08-08trxcon: cosmetic: rename TRXCON_EV_{L1IF->PHYIF}_FAILUREVadim Yanitskiy3-5/+5
Basically, everything below layer 2 is layer 1. Let's clarify the domain of TRXCON_EV_L1IF_FAILURE by saying 'PHYIF' instead of 'L1IF'. Change-Id: I9159492a04bc071b7b04d9b88d4e6fd13cc3af31
2022-08-08trxcon: cosmetic: rename TRXCON_EV_SET_{PHY_}CONFIG_REQVadim Yanitskiy3-9/+9
Make it clear that this event is used for setting *PHY* configuration. Change-Id: Ib70ff0352b6fcb045d0f49535dfb0d273856f3c3
2022-07-30trxcon: l1sched: ensure n_bits_total is always initializedVadim Yanitskiy2-2/+2
Change-Id: I590cfe55365b7ad021a3d0925a0f1ea136e67125 Related: CID#205451
2022-07-30trxcon: assert *ts is not NULL in l1sched_set_lchansVadim Yanitskiy1-4/+1
We cannot use ts->sched as logging context because ts is NULL. Change-Id: I53b40b31f20fc9aefdfcac1406c465d226e5fde0 Related: CID#275337
2022-07-29trxcon: extended RACH != 11-bit RACH, correct logging messagesVadim Yanitskiy2-11/+9
Change-Id: I7f977d5d2b68741a230c706f5b16cf307bc267d1
2022-07-29trxcon: abstract out 'struct trxcon_inst' from L1CTL/TRXC/TRXDVadim Yanitskiy3-35/+35
This allows replacing L1CTL and/or TRXC/TRXD with something else. Change-Id: I7282da6dd16216bb4295c4d18f993251defbdf0a Related: OS#5599
2022-07-29trxcon: move L1 params from struct trx_instance to trxcon_instVadim Yanitskiy5-19/+23
Change-Id: Ifbd9bb17d63ab1d8712d0c8022a62117a48c6384 Related: OS#5599
2022-07-29trxcon: rework trxcon_fsm, move into a separate fileVadim Yanitskiy8-410/+786
The original trxcon_fsm I wrote back in 2017 [1] was more like a boolean flag, as there were only two states: IDLE and MANAGED. Not surprising, given that until recently handling of multiple L1CTL connections was not supported. Now that we have this implemented, lifetime of a trxcon_fsm instance is limited by lifetime of a L1CTL connection, what renders the FSM useless. This change removes the old 'boolean' trxcon_fsm and introduces the new one, which will allows us to abstract the L1CTL interface from the TRXC/TRXD interfaces, as well as the scheduler. The new FSM will also simplify development of the RLC/MAC layer for GPRS. Change-Id: Ifaf63ead9dd180181358e771367b2a686ba159ca Related: [1] I7ee6fc891abe5f775f5b7ebbf093181a97950dea Related: OS#5599
2022-07-29trxcon: trx_if_close(): power the transceiver off if neededVadim Yanitskiy1-0/+6
Currently it may happen that the transceiver (e.g. fake_trx.py) remains powered on when we loose a L1CTL client connection. This is going to be fixed in change [1] re-implementing the trxcon_fsm. For now let's ensure that the transceiver is properly powered off by sending "CMD POWEROFF" from trx_if_close(). Change-Id: I9c5178907304b36ec3de0ee31b7f7a9ed2e31c16 Related: [1] Ifaf63ead9dd180181358e771367b2a686ba159ca
2022-07-27trxcon: make trx_if_cmd_setfh() accept const *maVadim Yanitskiy2-4/+4
Change-Id: Id80b59260a24ccf8458c15ae8e191524a86a839c
2022-07-27trxcon: make l1sched_start_ciphering() accept const *keyVadim Yanitskiy2-2/+2
Change-Id: I042903d779b6fbae68951a94788a458bf5226046
2022-07-26trx_toolkit: do not auto power on/off child MS TransceiversVadim Yanitskiy2-5/+12
By default, powering on/off a parent transceiver (child_idx=0) will automatically power on/off its child transceivers (if any). This behavior is desirable for the BTS, but not for the MS Transceivers. Additional MS Transceivers are going to be used by ttcn3-bts-test for spawning multiple DCCH components in parallel. We don't want situations when one component powers off transceivers of the other DCCH components - they must be independent. Change-Id: I0cd6bac616273bed0e246ad48edc44fff484c589
2022-07-26trx_toolkit: use **kwargs in Transceiver.__init__()Vadim Yanitskiy2-25/+21
Change-Id: I65e85a2dc99e81e96d1b31b6bda5010b044b041d
2022-07-26trx_toolkit: simplify Transceiver.power_event_handler()Vadim Yanitskiy2-19/+7
Change-Id: I283f7ced0309bf823ad78c90e8006b9e9474dee7
2022-07-26trxcon: support handling of multiple L1CTL client connectionsVadim Yanitskiy5-15/+45
Change-Id: Id92e5b553487e4cf10ea291b487a3ef0c65d72ae
2022-07-26trxcon: use trxcon->fi as the context in L1CTL loggingVadim Yanitskiy4-87/+123
Change-Id: I7b923cb21638e6afc38deb7766955b43e49b60bb Related: OS#5599
2022-07-26trxcon: pass fn_advance param via struct l1sched_cfgVadim Yanitskiy3-6/+7
Change-Id: I733761e46ffe03473f03f76f7612a548c9723d99 Related: OS#5599, OS#3761
2022-07-26trxcon: pass lchan to tchh_block_dl_first_fn() for loggingVadim Yanitskiy1-4/+3
Change-Id: I8fafd180e2539be860bf183782817690dcad2d7d
2022-07-26trxcon: make [l1sched_]tchh_block_dl_first_fn() staticVadim Yanitskiy2-5/+3
Change-Id: Ic3b990aaa1a3a3e13a80a63e1933799e58e7158f
2022-07-26trxcon: make l1sched logging configurable, use trxcon->fi as prefixVadim Yanitskiy16-201/+253
This change makes it possible to configure l1sched related logging: * l1sched_logging_init() allows to configure logging categories for common and data messages (by default, DLGLOBAL is used); * struct l1sched_cfg allows to configure a logging prefix to be used in l1sched messges (by default, 'l1sched[0x%p] is used)'. Let's use osmo_fsm_inst_name(trxcon->fi) as the logging prefix. Change-Id: I26da1a506b02502a3a6a887533c35fb09c13c429 Related: OS#5599, OS#3761
2022-07-25trxcon: get rid of DEBUG_DEFAULT, give an exampleVadim Yanitskiy2-3/+1
Change-Id: If2d2afb18238df89aa4cdaed9a38810f647b3189
2022-07-25trxcon: rename DTRX logging sub-system to DTRXCVadim Yanitskiy3-5/+5
This sub-system is used for TRXC related logging, so reflect this. Change-Id: I33c8f81e37de7ee61809610e51405a96c93536ff
2022-07-25trxcon: ensure TRXD logging is actually using LOGPFSMSL()Vadim Yanitskiy1-11/+13
This should have been done in [1], but somehow I forgot about TRXD. Change-Id: Ia5124061fe391644267a6117ac2627cad7adf873 Fixes: [1] Ic253903e7b8635bb13e210acfe929c73f8870632 Related: OS#5599
2022-07-23trxcon: move osmocom/bb/{trxcon->l1sched}/l1sched.hVadim Yanitskiy20-16/+20
Change-Id: I41348b738cce9954afafa0952da050306838b908 Related: OS#5599, OS#3761
2022-07-22trxcon: remove unused #includes in sched_lchan_common.cVadim Yanitskiy1-2/+0
Change-Id: I623b9d57258e19e4dd9d25e7432138b1379e5f4c
2022-07-22trxcon: l1ctl_server_{start,shutdown}() -> l1ctl_server_{alloc,free}()Vadim Yanitskiy3-6/+6
l1ctl_server_start() does not actually start the server, it simply allocates memory and initializes it. l1ctl_server_shutdown() does the opposite. Let's use more precise symbol names. Change-Id: Ie039abdff3911c5b566c760b26c31203824c5764
2022-07-22trxcon: allocate memory in l1ctl_server_start()Vadim Yanitskiy3-13/+16
Calling l1ctl_server_shutdown() whenever the server is not initialized will result in accessing uninitialized values. This can happen if we goto exit before l1ctl_server_start() was called. Initializing the server with zeroes is not an option, because we need to initilize llist_head and osmo_fd structures with proper values. Allocate and initialize struct l1ctl_server in l1ctl_server_start(), deinitialize and free() in l1ctl_server_shutdown(). Change-Id: Idf13914fd0b0ae09b2ce5ece1f4203ebcae05d6e Related: CID#275254
2022-07-22trxcon: fix NULL pointer dereference in trx_if_open()Vadim Yanitskiy1-2/+2
Change-Id: Id40e758f6736773f7695c02bdb8974ee422b2e63 Related: CID#275253
2022-07-22trxcon: remove unused #imports in sched_clck.cVadim Yanitskiy1-4/+0
Change-Id: I41e08c2a970334f87fa9fca8d21a55295b9eddc5
2022-07-22trxcon: call osmo_timer_del() unconditionallyVadim Yanitskiy3-6/+3
osmo_timer_del() does check if a timer is active internally. Change-Id: I4ede5b19eeb847fe8fdaed52a8b5c801b3de209a
2022-07-21trxcon: fix trx_if_close(): delete TRXC timer if it's pendingVadim Yanitskiy1-0/+3
Change-Id: I669355ec03f67de437df2d3b822ed0a728b405d5