aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2020-07-05Move gsm_bts code gsm-data.* => bts.*Pau Espin Pedrol12-487/+479
bts.h refers to struct gsm_bts object, but we still had a bunch of stuff in bulky gsm_data.* from old days. Let's move stuff where it belongs to start clean up of gsm_data. Change-Id: I0a4219e3f64f625ee8b364bf408b8d2bcc8085c5
2020-07-05Move nm_state and Mo related code gsm_data.* => oml.*Pau Espin Pedrol4-175/+168
Change-Id: I57ea9c4ddbe5443b9b6afe3f8e6b38170d0e5a0e
2020-07-05gsm_data.h: Use enum type for NM state fieldsPau Espin Pedrol2-4/+6
Change-Id: I21fa1688a0c8a3788a5ecedd5912f596a69a1beb
2020-07-05bts-trx: Implement ramp up/down during ADM state changePau Espin Pedrol1-16/+75
Ramp down when BTS is administratevly locked, and ramp up when it becomes unlocked again. Af ramping down, bts_model_trx_deact_rf is called to make sure all channels are released. power_ramp_start() is dropped from inside bts_model_trx_deact_rf since it's not the proper place. In there we simply want to instantaneously drop RF. Related: SYS#4920 Change-Id: Ib7a7b0a0c24779349f142215f0bb32b72c86ce70
2020-07-05pcu_sock: Avoid presenting TS from disabled TRX as available to PCUPau Espin Pedrol1-0/+8
Change-Id: I4b24faf3a8fe5846b9394fea8faf9d37cc0ac9ff
2020-07-05bts_shutdown: Speed up shutdown if no TRX is operationalPau Espin Pedrol1-11/+36
This change avoids waiting for full ramp down if TRXs are already non operational. Change-Id: Ie1c7c3a969e7968075b89edcd1ab2227b178a869
2020-07-05bts-trx: Introduce rate counter for scheduler timerfd missed FNsPau Espin Pedrol3-1/+25
This should provide a quick way to check if the system is frequently overloaded over time and hence downlink FNs are scheduled later than expected. Change-Id: I0051b9ab18ebc9f92db11374d856de94f155efa4
2020-06-30osmo-bts-trx/scheduler: get rid of unused 'meas' in l1sched_chan_stateVadim Yanitskiy1-4/+1
Change-Id: I4337cfdc393ec44df9bb9824ba4981eaf5b45f0b
2020-06-29osmo-bts-trx/scheduler: cosmetic: move trx_if_powered() checkVadim Yanitskiy1-4/+4
I believe the modern compilers are smart enough to optimize the outer (per-timeslot) loop of trx_sched_fn() in a way that TDMA frame number is advanced after making sure that a transceiver is powered on. However, it's still more perspicuous to check availability of a given transceiver first. Change-Id: I6a97000c1c84e36096e9ba378a489c82caa4cc5b
2020-06-29A-bis/OML: handle hopping params in Set Channel AttributesVadim Yanitskiy3-21/+42
Change-Id: Ieac26c7aca118c16889cdde2565a514681dc137b Related: OS#4546
2020-06-27tx_power: Support controlling BTS with nominal tx pwr < 0dBmPau Espin Pedrol5-9/+12
Related: OS#4583 Change-Id: I88d59d47837105d52e2b4dfb819511cd360c50a1
2020-06-26osmo-bts-trx/scheduler: get rid of _sched_fcch_burstVadim Yanitskiy3-11/+2
According to 3GPP 45.002, section 5.2.4, a frequency correction burst is basically a sequence of zeros. Since br->burst is already zero-initialized, there is no need to maintain and memcpy() another sequence of zeros into it. Just set the length. Change-Id: Ic4f6d550010da5caf4bc471ff1e184c9fab30c6d
2020-06-26vty: fix missing separator in help for power ramp commandsVadim Yanitskiy1-1/+1
Change-Id: Id83fa562ba8496be8915573d2222dd64c7ca5eb9
2020-06-25osmo-bts-trx/scheduler: make mark trx_sched_fn() return voidVadim Yanitskiy1-3/+1
This function never returns anything else than 0. Change-Id: I119535fc09d611ef9f903f5d44aa21cecdce19a2
2020-06-25osmo-bts-trx: fix trx_sched_fn(): properly advance frame numberVadim Yanitskiy1-4/+6
In trx_sched_fn() we schedule Downlink bursts in advance, in order to give the transceiver some time to process them. This function handles all timeslots of all transceivers in a loop. The problem is that the given frame number is overwritten on each iteration. Let's say we have 4 transceivers, each with default fn-advance 20. The given frame number N will be advanced 4 times, so the resulting frame number for 4-th transceiver would be (N + 4 * 20) instead of (N + 20) as expected. Therefore, all additional transceivers would be served more and more in the future (depending on their position). Change-Id: Ie3ab544eac81a675266df09cd2b7740e4183188e
2020-06-25Use libosmocore's TDMA frame number API (constatns & arithmetic)Vadim Yanitskiy6-52/+31
Depends: (libosmocore) Ic291fd3644f34964374227a191c7045d79d77e0d Change-Id: I61c97a62bd5dbbb4a984921ebdfc10ad6ed00f2a
2020-06-25bts-omldummy: Speed up shutdown (instantaneous ramp)Pau Espin Pedrol1-0/+3
Change-Id: I4d4e7a5bfb899787605b3b25dcdc9e9470c438d9
2020-06-25bts-omldummy: Implement bts_model_trx_closePau Espin Pedrol1-1/+2
Change-Id: I13221e5dffe3290fc791f8866f25141fcc0821ff
2020-06-25Fix shutdown in osmo-bts-{omldummy,virtual}Pau Espin Pedrol3-1/+3
Change-Id: Idadb62ec25181b140d9061dc7470da00d47d8336
2020-06-24osmo-bts.spec.in: Use %config(noreplace) to retain current config fileHarald Welte1-2/+2
Change-Id: I8d92cfddaa5bbfa33e36f37b48033b468c7d72cf
2020-06-23bts-trx: Mark 'osmotrx power' VTY cmd as deprecatedPau Espin Pedrol1-1/+5
There's a standarized way through OML's Administrate State to control the status of TRX, so let's use and maintain that one rather than this ad-hoc hack. Related: SYS#4920 Change-Id: Ia7f190063c35e0ed8e2e734047b3aff608cd3ce3
2020-06-23bts-virtual: Implement bts_model_trx_closePau Espin Pedrol1-1/+10
Change-Id: Id37562652b1ebc27d808d83342e4961b936dbcad
2020-06-23bts_shutdown: Wait until all TRX are closedPau Espin Pedrol2-11/+51
Setting the phy link of a trx to SHUTDOWN sets operative state to DISABLED, so we use operative state as a condition to know whether all TRX are already powered off properly and we can exit. Change-Id: I2bcd211d7edcc8486461a555d6c470a94b166ed7
2020-06-23bts_model: Convert bts_model_trx_close() to return asynchronouslyPau Espin Pedrol10-24/+62
Some backends like osmo-bts-trx require exchanging messages like POWEROFF to close the TRX, and hence need some time. Switch the function to expect result asynchronously by calling a callback. This will be used later to wait until all TRX are really powered off before exiting the process. Change-Id: I7d76b600fc06e1114b35bf0c2d08eff5bbd1b69a
2020-06-23bts_shutdown: First deact RF on all TRX, finally close themPau Espin Pedrol1-0/+2
It makes more sense to first deactive RF on all TRX and finally close them totally. This way we keep consistency between all TRXs and it's easier for lower layers which may need to close them all at once. Also in the event that we want to turn bts_model_trx_deact_rf to return asynchronously. Change-Id: Ib62358384e37a5cef692926439462042fab0138c
2020-06-23bts-trx: Split part of bts_model_trx_close() steps into bts_model_deact_rfPau Espin Pedrol1-7/+17
bts_model_trx_close is only called during bts_shutdown immediately after bts_model_deact_rf, so its logic keeps being essentially the same after this code movement. On the other hand, bts_model_deact_rf is also called during RSL link establishment if it failed for whatever reason in bts.c:trx_link_estab(). In that case, we want to make sure the TRX is not used so we need to implement bts_model_deact_rf. Change-Id: Id4eae743da81773a04b82e7b454071b0cc66677a
2020-06-23Implement tx power ramp down during BTS shutdownPau Espin Pedrol3-7/+43
Upon BTS shutdown (for instance because the Abis link against BSC was lost), stop the operation in an ordered manner (cell soft lock). This means slowly decrease tx power so that MS have time to handover to other neighbour cells. Related: SYS#4920 Change-Id: I70e34dda8974ebd94aea33bd9fb1d99f9063cc55
2020-06-23Introduce bts_shutdown FSMPau Espin Pedrol7-34/+204
Using an FSM here will allow for more complex ordered shutdown procedures, like power ramp down, waiting for TRX deact asyncrhonously, etc. Current commit leaves everything in place already prepared to implement ramp down, which will be implemented in next commit in the series. Related: SYS#4920 Change-Id: I8f48f17e61c3b9b86342eaf5b8a2b1ac9758bde5
2020-06-23abis.c: Use LOGPIL when logging signalling link downPau Espin Pedrol1-1/+1
Change-Id: Icedd533046853f67da5da84aae28b895a8cdb0bf
2020-06-22bts.c: Fix typo in log line and improve itPau Espin Pedrol1-1/+1
Change-Id: I44d079893d01946da703c4338a686795ced3cb00
2020-06-22phy_link.h: Drop unimplemented function definitionPau Espin Pedrol1-2/+0
Change-Id: Ib306a80bd8ea3434a49806ec73a1cfe9a82b9122
2020-06-19tx_power: Log bypass param in power_ramp_startPau Espin Pedrol1-2/+2
Change-Id: I72559a50570cf447b5930f8995b1f345baeb1ee5
2020-06-19bts-trx: Instruct user to set manually nominal-tx-power if NOMTXPOWER not ↵Pau Espin Pedrol1-1/+4
supported Using the VTY command will force that value and prevent osmo-bts-trx to use/send NOMTXPOWER cmd over TRXC. Change-Id: I496753bc74767a7e18b831768d9d422a738192b7
2020-06-18power_ramp: Add support to get callback when ramping process completesPau Espin Pedrol12-18/+26
It will be used in forthcoming commits to feed FSM events once the ramping process completes. Change-Id: I778dc215cf6055b93658670cc12e78ad2e51f85e
2020-06-18Introduce LOGPTRX macro and use it in tx_power.cPau Espin Pedrol4-55/+56
Rename OCTPHY specific LOPGTRX macro to avoid redefine conflicts. Change-Id: I02878611501aca51039e2ac7e35784ccb93b1db6
2020-06-18Fix missing bts_model implementations in stubs.c and bts_model.cPau Espin Pedrol2-0/+16
These will be required by compiler/linker after next changes. Change-Id: Icd20d64cf973f4cf4425b46d4102747db53d8990
2020-06-18cosmetic: {oc2g,lc15}bts_bty.c: Fix trailing whitespacePau Espin Pedrol2-2/+2
Change-Id: I1a9cf84ae0120c6ce9068efeb0e9824e4726564e
2020-06-18tests/stubs.c: Add missing stub for bts_model_change_powerPau Espin Pedrol1-0/+3
Change-Id: I16880fae32f60a83429cf5bbef796428c60a762c
2020-06-18meas_tests: Avoid redefining all bts_model stubsPau Espin Pedrol2-86/+1
Change-Id: I47755e354a8cbcf34406de8bfc3985c70076fbf2
2020-06-18handover_tests: Avoid redefining all bts_model stubsPau Espin Pedrol3-19/+4
Change-Id: I366f71474891d32e31dbba1a9fa1f9a510fa0952
2020-06-18scheduler: Add rate_ctr informing about Dl block not foundPau Espin Pedrol1-1/+5
Together with previous counter L1SCHED_TS_CTR_DL_LATE, it allows understanding which dl blocks are really lost (never queued) and which were simply queued too late. Change-Id: I456d0cfbef1e03b147ce7d968a3ec42dd728fe74
2020-06-18scheduler: Add rate_ctr informing about too low rts-advancePau Espin Pedrol2-0/+25
Change-Id: I76c3dd4020c6d74192b03b1d42413ae536da5f05
2020-06-17Merge gsm_data_shared.h into gsm_data.hPau Espin Pedrol5-772/+762
Old _shared one comes from time where we shared header with other componenets. It's no longer the case sine a logn time ago. The gsm_data_shared.h is only being included by gsm_data.h nowadays, so let's simply merge it to simplify header dependency and struct definitions. Similarly, gsm_data_shared.c is renamed to gsm_data.c Change-Id: Id60e7582e3a32dbc5e3531b87b2b49f07aee734d
2020-06-17cosmetic: include/osmo-bts/Makefile.am: split each header file in one linePau Espin Pedrol1-5/+29
Change-Id: I58d86a8c2e8846f683d4414fcd2a3bf7f89049ce
2020-06-17cosmetic: common/Makefile.am: split each source file in one linePau Espin Pedrol1-6/+29
Change-Id: I9c4d78fb80446fa4142950d947dad20856573275
2020-06-16scheduler: _sched_dequeue_prim(): Refactor found_msg goto pathPau Espin Pedrol1-14/+11
Change-Id: Icf7414d9fb17bbc3eb384329f587b3042ba0fcd5
2020-06-16scheduler: _sched_dequeue_prim(): Refactor goto pathsPau Espin Pedrol1-7/+9
Change-Id: Ia0b1674ac3dfbe89c9eb0e6d6426848ec64320d9
2020-06-16scheduler: Early return in _sched_dequeue_prim() and clarify FN casesPau Espin Pedrol1-3/+4
We should always expect the msgb queue to be ordered by FN, so there's no use in continue traversing the queue after we found a later primitive than the one at current time, since next onews will be even more in the future. Change-Id: If57fc3d89a74e6cbc79fce80dae7bf4f77e9364d
2020-06-16scheduler: Improve logging about prim being out of rangePau Espin Pedrol1-5/+7
Change-Id: Ie7ea210fee1f59ece3abe171b64cdc04670c344b
2020-06-16doc: Fix typos in bts-models.adocPau Espin Pedrol1-3/+3
Change-Id: I05c9eb9b0edda528363a16d27dbf683994d9ab62