Commit Graph

21 Commits

Author SHA1 Message Date
Vadim Yanitskiy 38c4f7294b trxcon: make trx_if_cmd_setfh() accept const *ma
Change-Id: Id80b59260a24ccf8458c15ae8e191524a86a839c
2022-07-27 06:22:46 +07:00
Vadim Yanitskiy cea02697a9 trxcon: support handling of multiple L1CTL client connections
Change-Id: Id92e5b553487e4cf10ea291b487a3ef0c65d72ae
2022-07-26 00:50:27 +07:00
Vadim Yanitskiy c582aedd91 trxcon: rename DTRX logging sub-system to DTRXC
This sub-system is used for TRXC related logging, so reflect this.

Change-Id: I33c8f81e37de7ee61809610e51405a96c93536ff
2022-07-25 19:53:51 +07:00
Vadim Yanitskiy 4f2d6c40d0 trxcon: ensure TRXD logging is actually using LOGPFSMSL()
This should have been done in [1], but somehow I forgot about TRXD.

Change-Id: Ia5124061fe391644267a6117ac2627cad7adf873
Fixes: [1] Ic253903e7b8635bb13e210acfe929c73f8870632
Related: OS#5599
2022-07-25 19:53:51 +07:00
Vadim Yanitskiy a986c466f0 trxcon: move osmocom/bb/{trxcon->l1sched}/l1sched.h
Change-Id: I41348b738cce9954afafa0952da050306838b908
Related: OS#5599, OS#3761
2022-07-23 16:30:26 +07:00
Vadim Yanitskiy 28b5934663 trxcon: fix NULL pointer dereference in trx_if_open()
Change-Id: Id40e758f6736773f7695c02bdb8974ee422b2e63
Related: CID#275253
2022-07-22 17:31:05 +07:00
Vadim Yanitskiy 5f47751ddb trxcon: call osmo_timer_del() unconditionally
osmo_timer_del() does check if a timer is active internally.

Change-Id: I4ede5b19eeb847fe8fdaed52a8b5c801b3de209a
2022-07-22 03:21:22 +07:00
Vadim Yanitskiy 2a2babbeac trxcon: fix trx_if_close(): delete TRXC timer if it's pending
Change-Id: I669355ec03f67de437df2d3b822ed0a728b405d5
2022-07-21 18:03:17 +07:00
Vadim Yanitskiy 0e0d266812 trxcon: ensure are TRXC/TRXD logging is using LOGPFSML()
Change-Id: Ic253903e7b8635bb13e210acfe929c73f8870632
2022-07-21 18:03:17 +07:00
Vadim Yanitskiy 2576be0f63 trxcon: trx_if_open(): allocate trx->fi as a child of trxcon->fi
Change-Id: I19579d2a76c38ca972a4ca132a8e5e3bba876c67
2022-07-21 18:03:17 +07:00
Vadim Yanitskiy 5a8b0ad0ac trxcon: cosmetic: remove the '_fsm' postfix in trx_fsm.name
Change-Id: Ie867f7a59b9d9f423944606d43f2f854313053f7
2022-07-21 18:03:17 +07:00
Vadim Yanitskiy d451f0caea trxcon: cosmetic: rename 'trx->fsm' to 'trx->fi'
Make it cleaner that it's an FSM *instance*.

Change-Id: I688b903fe21086beca7fb86dcee90f6f751d7cc3
2022-07-21 18:03:17 +07:00
Vadim Yanitskiy c9a801e05c trxcon: get rid of GEN_MASK macro, define it locally
Change-Id: I9504f022ef1767276479f21b8228ac094d28a858
2022-07-21 18:03:17 +07:00
Vadim Yanitskiy 506e9085e3 trxcon: rework L1CTL socket API to support multiple clients
Change-Id: I1cfc49f36ead6e2ba0a6110b0fb65c55412ef5e3
2022-07-21 18:02:56 +07:00
Vadim Yanitskiy 27900b3a2d trxcon: introduce and use struct 'trxcon_inst'
trxcon consists of the following three main components:

* the L1 TDMA scheduler (libl1sched),
* L1 interface (TRXC/TRXD over UDP),
* L2 interface (L1CTL).

In [1] and [2] the L1 scheduler was abstracted out from both L1
and L2 interfaces and separated into a library, so it does not
use the TRXC/TRXD nor L1CTL related API directly.

This change is the next step towards the goal of having all three
components abstracted from each other.  Moreover, this patch brings
us closer to another goal of being able to support multiple L1CTL
connections (each having its own scheduler).

The idea is to give both L1 and L2 interfaces access to the
'trxcon_inst' structure, which basically groups all three components
mentioned above into a single piece.  The end goal is to eliminate
direct interaction between the interfaces, and the scheduler, so that
one could easily replace TRXC/TRXD and/or L1CTL with something else.

Change-Id: I23319951c56577085e1092669b5534f9d6bda48d
Related: [1] I31f77976a7a225ef292fe6dcd583513aec97ed44
Related: [2] I001fb7bc2663eea308b5a8882746ed9863f2c2f8
2022-07-21 17:37:36 +07:00
Vadim Yanitskiy fd039d4571 trxcon: fix coding style in statements applying inverted mask
Change-Id: I28b9fc34e0d40b02d0ca56e9e0bf4463cf4ff336
2022-07-21 17:35:12 +07:00
Vadim Yanitskiy 9523cdd4d3 trxcon: send proper slot type in TRXC SETSLOT messages
Change-Id: I42f5620b50beb7df0a3463d70c1f48d041006371
Related: OS#5599
2022-07-12 19:29:13 +07:00
Vadim Yanitskiy 8428b1ea0a trxcon: abstract out the scheduler API from L1CTL/TRXD/TRXC
Change-Id: I31f77976a7a225ef292fe6dcd583513aec97ed44
Related: OS#5599, OS#3761
2022-07-12 19:29:13 +07:00
Vadim Yanitskiy eff2d52e75 trxcon: merge 'sched_trx.h' and 'scheduler.h' into 'l1sched.h'
Change-Id: Ide1e3ccdf32fdc255acc943e0c0936d15cf0c680
Related: OS#5599, OS#3761
2022-07-11 05:12:16 +07:00
Vadim Yanitskiy 38373ee20f trxcon: use 'l1sched_' prefix for scheduler API
Change-Id: I370aa5084a4e3eb94168b96df94dbbee606adaab
Related: OS#5599, OS#3761
2022-07-11 05:12:16 +07:00
Vadim Yanitskiy 259314abae trxcon: group *.c files into 'src' directory
Change-Id: I1a3703e48507cd51cd8198f13b993f54c44bc41e
Related: OS#5599, OS#3761
2022-07-04 17:41:09 +07:00