aboutsummaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2020-10-15sysinfo: Don't broadcast SI4 GPRS INDICATOR if PCU is disconnectedHarald Welte1-3/+5
Depends: libosmocore.git I9d6ed06731ae15fdcef1a1f397d6ac2b7b1ca980 Change-Id: I1fd513ea03297918d15d4b28ed454f9b6dd6ebfa Related: OS#3075
2020-10-15power_control: clarify argument names of lchan_ms_pwr_ctrl()Vadim Yanitskiy1-1/+2
Change-Id: I821120bf5c3690f5b4c6b96c879e675b3d271c90
2020-10-15gsm_data: check in and use enum lchan_rel_act_kindVadim Yanitskiy2-12/+10
Change-Id: If7a7e90dda77a1989420e329c5d60805b28360c7
2020-10-13Drop unused param in oml_init()Pau Espin Pedrol1-1/+1
Change-Id: I96d8359f4ae13c9f47cc87d87fde6d2047169a49
2020-10-08vty: add attributes to VTY commands indicating when they applyPhilipp Maier1-0/+6
Change-Id: Ifcdfcd157e5067fa2e4296d7c7e93a74087f49ff Related: SYS#4937, OS#1601
2020-10-06Introduce the new OML NM_ATT_OSMO_NS_LINK_CFG to configure IPv6 NSVC for PCUAlexander Couzens1-3/+3
With PCU interface version 10 it supports IPv6 NSVC. The new OML IE NM_ATT_OSMO_NS_LINK_CFG allows to configure IPv6 NSVC. Change-Id: I310699fabbfec4255f0474f31717f215c1201eca
2020-10-05bts: Add VTY command to manually override Radio Link TimeoutHarald Welte1-1/+5
There are some situations where it is useful to be able to change the Radio Link Timeout at runtime, without restarting the BTS. This adds a new (hidden) command for this: "bts <0-255> radio-link-timeout (oml|infinite|<4-64>)" Change-Id: I64674a432cf7751b16d5d0b52f66766fa6e37028
2020-10-03osmo-bts-trx/scheduler: fix measurement handling for SUB framesPhilipp Maier1-0/+6
Make sure that we pick the correct UL measurements from the history when we deal with AMR SID frames (SUB frames). Change-Id: I902bb47d68742d2589156f61099b67a0edbaf40b Related: OS#2978
2020-10-01gsm_data.h: Drop unused struct fieldPau Espin Pedrol1-1/+0
Probably a leftover from openbsc times. Change-Id: I0b62c41bcb992df376668c6feb6ac7ada35d471d
2020-09-28vty: make most struct pointers const in show/write commandsVadim Yanitskiy3-6/+6
Change-Id: Iacc32f7982c150d84ea4df7affa1f9e07806928f
2020-09-28tx_power: make trx/lchan struct pointers const where possibleVadim Yanitskiy1-10/+10
Change-Id: I1b290af115730ba16f4f9887fe316e2ed15659a2
2020-09-25bts: cosmetic: make param 'net' of gsm_bts_num() constVadim Yanitskiy1-1/+1
Change-Id: I378fea4aefb2cc4253cdd99ebc9c4f01b21faf95
2020-09-22osmo-bts-trx/scheduler: refactor UL burst measurement processingVadim Yanitskiy1-10/+28
Currently the UL measurements (RSSI, ToA256, C/I) of the burst that concludes a block are passed up to the higher layers. This means that the measurement values of the other bursts are skipped. Let's keep record of all UL measurements and average the values before we pass them up to the higher layers. Use a simple ring buffer to store the measurement history (up to 8 unique entries for now). Remove *_num/*_sum variables from l1sched_chan_state. Change-Id: I2b02b51fea5664f161382a4ddc63dbf14ffc9ac5 Related: OS#3032, OS#2978
2020-09-22pcuif_proto: version 10: add support for IPv6 NSVCsAlexander Couzens1-1/+11
Introduce a address_type in the NSVC configuration pass the given protocol. The remote_ip is network byte order, the default encoding for in_addr and in6_addr. Change-Id: I6d60277eb5b8d938d9f38114c933d58ee1b884c9 Related: Iae854875a45dbc29cd46a267ccaf60f1f2ac2973 Related: SYS#4915
2020-09-22pcuif_proto: version 10: add frequency hopping parametersVadim Yanitskiy1-3/+12
Change-Id: I04782222b499d0488269544910fbd4ed9929c05d Related: Idf11bc4ba3ff0b00b32f2beab8fd020c67119d05 Related: SYS#4868, OS#4546, OS#4547
2020-09-17gsm_data: rename hopping.{ma,ma_len} to hopping.arfcn_{list,num}Vadim Yanitskiy1-2/+2
MA (Mobile Allocation) is actually a bit-mask indicating those ARFCNs of the Cell Allocation, which must be used as the hopping sequence. What we store in struct gsm_bts_trx_ts is the actual list of hopping channels, so let's name it properly and eliminate possible confusion. Change-Id: I677d66e428fa0fe119ebc37bc2a4e6cc05c251c4
2020-09-17struct gsm_bts_trx[_ts]: remove unused parsed NM attribute listVadim Yanitskiy2-2/+0
This list is already a part of struct gsm_abis_mo. Change-Id: I19b907bea500569c6e7e1b64b50e1c2ee2014f1c
2020-09-17struct gsm_bts_trx: remove unused per-TRX OML Link pointerVadim Yanitskiy1-3/+0
Most likely, this part of the structure was copy-pasted from the corresponding definition in osmo-bsc. In osmo-bts we always establish a single per-BTS OML link, not per-TRX. Change-Id: I1792372de484608e04211c9de4294b3c76173ead
2020-09-16Revert "pcuif_proto: version 0xa: add support for IPv6 NSVCs"Alexander Couzens1-12/+2
This reverts commit df93a448b7638f51786236fcabaa6246ebe4ff94. It was to early because the frequency hopping wasn't ready to be merged. Change-Id: I6e67f4cd9828afa53ed4e783b83b039ee6a1d570
2020-09-15pcuif_proto: fix typo in commentAlexander Couzens1-1/+1
Change-Id: Iec7c41741ed093df8c60a3cda548662492f56116
2020-09-15pcuif_proto: version 0xa: add support for IPv6 NSVCsAlexander Couzens1-2/+12
Introduce a address_type in the NSVC configuration pass the given protocol. The remote_ip is network byte order, the default encoding for in_addr and in6_addr. Change-Id: I4067b1af041b2cdad60d6fb16c9caee98bc218dd
2020-09-15Fix RadioCarrier OML Operative State Change report not sent on some scenariosPau Espin Pedrol1-1/+1
Operative state is mainly maintained based on 2 requirements: * phy_link being in CONNECTED state * RSL connection being up and ready However, state change report triggered over OMl towards BSC was only done upon the first event of the two. That means that if for whatever reason the RSL connection was established AFTER the phy_link became CONNECTED (ie receiving RSP POWERON in osmo-bts-trx), then the status towards the BSC would not be updated and hence the BSC would still see the Radio Carrier object as DISABLED. The trx_set_available() function is renamed to trx_operability_update() to keep the logic conditions in one place, and different events triggering a change in state simply call the function and let it handle the new state. Related: SYS#5063 Change-Id: Ic00df9e7278d42bc10c1e1a1c0edde7e13199299
2020-09-07scheduler: Drop unused function trx_sched_reset()Pau Espin Pedrol1-4/+0
Change-Id: Id31e82b6bbfdd8030612c78737c0aa7dd7e20bd0
2020-08-07rsl: constify the 'lchan' argument of rsl_tx_conn_fail()Vadim Yanitskiy1-1/+1
Change-Id: Icec43d7c1f3b99292fa87462ad65b2c19fdd3b5f
2020-08-07osmo-bts-trx/scheduler: implement baseband frequency hoppingVadim Yanitskiy2-0/+4
The idea behind the baseband frequency hopping is quite simple: we have several RF carriers (transceivers) transmitting and receiving on fixed frequencies (just like in a regular multi-trx setup), and an additional burst routing layer between the schedulear and the transceiver interface (TRXD over UDP). Speaking in terms of the proposed implementation: - on Downlink, dlfh_route_br() calculates the ARFCN corresponding to the current TDMA frame number according to the hopping sequence parametets, and picks the transceiver with matching ARFCN; - on Uplink, ulfh_route_bi() iterates over the transceiver list of of the BTS, calculating hopping ARFCNs for equivalent timeslots, and picks the one with ARFCN matching the received burst. In order to avoid frequent transceiver lookups on the Downlink path, dlfh_route_br() maintains a "cache" in the timeslot state structure. Unfortunately, this "cache" seems to be useless on the Uplink path, so ulfh_route_bi() always needs to lookup the matching transceiver for each burst received over the TRXD interface. It may also happen that the scheduler will be unable to route an Uplink or Downlink burst, e.g. due to inconsistent / incorrect hopping sequence parameters received from the BSC, or in case if a transceiver gets RF-locked by the BTS operator. Such events are logged as "FATAL" and aditionally signalled by the following osmo-bts-trx specific rate counters: - trx_sched:dl_fh_no_carrier (Downlink), and - trx_sched:ul_fh_no_carrier (Uplink). Change-Id: I68f4ae09fd0789ad0d8f1c1e17e17dfc4de8e462 Related: SYS#4868, OS#4546
2020-08-04osmo-bts-trx/scheduler: refactor dummy burst schedulingVadim Yanitskiy1-0/+1
This change facilitates the upcoming freq. hopping implementation, in particular scheduling of dummy bursts on C0 with hopping time- slots. One problem is that we cannot know in advance, whether to send a dummy burst on a given timeslot unless all transceivers are processed. For example, trx#3 may want to send a normal burst on ARFCN of trx#0 (C0), while we have already sent a dummy burst... Another important aspect is that we shall not be sending dummy bursts on transceivers other than C0. Scheduling dummy bursts from _sched_dl_burst() in the context of a single hopping timeslot of a single transceiver leaves trx_sched_fn() no way to know whether it's a dummy burst or something else. Let's solve both problems by moving dummy burst scheduling logic from _sched_dl_burst() to trx_sched_fn(). Maintain C0 slot-mask in the inner (per-trx) loop, so that we can fill missing bursts with dummy bursts afterwards. Change-Id: I8c3651c27d2991079e83b8abdb7e2c3f95b97a43 Related: SYS#4868, OS#4546
2020-08-03common: constify the argument of trx_ms_pwr_ctrl_is_osmo()Vadim Yanitskiy1-1/+1
Change-Id: Ic7be19ed1560eae0a56ed30520ee9af1e949d71d
2020-07-14Move struct gsm_bts_trx: gsm_data.* & bts.* => bts_trx.*Pau Espin Pedrol5-60/+72
Move all struct gsm_bts_trx references from bulky gsm_data to its own file containing all related definitions and implementations. Also move a few functions clearly related to that object which were placed in bts.* Change-Id: Iebaf5b221c48b571f45408af867ce6f9c0cd9f4a
2020-07-05Move gsm_bts code gsm-data.* => bts.*Pau Espin Pedrol2-310/+296
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 Pedrol2-37/+35
Change-Id: I57ea9c4ddbe5443b9b6afe3f8e6b38170d0e5a0e
2020-07-05gsm_data.h: Use enum type for NM state fieldsPau Espin Pedrol1-3/+3
Change-Id: I21fa1688a0c8a3788a5ecedd5912f596a69a1beb
2020-06-30osmo-bts-trx/scheduler: get rid of unused 'meas' in l1sched_chan_stateVadim Yanitskiy1-4/+1
Change-Id: I4337cfdc393ec44df9bb9824ba4981eaf5b45f0b
2020-06-29A-bis/OML: handle hopping params in Set Channel AttributesVadim Yanitskiy1-8/+4
Change-Id: Ieac26c7aca118c16889cdde2565a514681dc137b Related: OS#4546
2020-06-26osmo-bts-trx/scheduler: get rid of _sched_fcch_burstVadim Yanitskiy1-1/+0
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-25Use libosmocore's TDMA frame number API (constatns & arithmetic)Vadim Yanitskiy1-3/+1
Depends: (libosmocore) Ic291fd3644f34964374227a191c7045d79d77e0d Change-Id: I61c97a62bd5dbbb4a984921ebdfc10ad6ed00f2a
2020-06-25Fix shutdown in osmo-bts-{omldummy,virtual}Pau Espin Pedrol1-0/+1
Change-Id: Idadb62ec25181b140d9061dc7470da00d47d8336
2020-06-23bts_shutdown: Wait until all TRX are closedPau Espin Pedrol1-0/+2
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 Pedrol1-1/+9
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-23Implement tx power ramp down during BTS shutdownPau Espin Pedrol1-0/+1
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 Pedrol3-0/+42
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-22phy_link.h: Drop unimplemented function definitionPau Espin Pedrol1-2/+0
Change-Id: Ib306a80bd8ea3434a49806ec73a1cfe9a82b9122
2020-06-18power_ramp: Add support to get callback when ramping process completesPau Espin Pedrol1-1/+5
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 Pedrol1-0/+1
Rename OCTPHY specific LOPGTRX macro to avoid redefine conflicts. Change-Id: I02878611501aca51039e2ac7e35784ccb93b1db6
2020-06-18scheduler: Add rate_ctr informing about too low rts-advancePau Espin Pedrol1-0/+3
Change-Id: I76c3dd4020c6d74192b03b1d42413ae536da5f05
2020-06-17Merge gsm_data_shared.h into gsm_data.hPau Espin Pedrol3-771/+761
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-15A-bis/RSL: refactor handling of BS Power IE (power reduction)Vadim Yanitskiy2-7/+6
According to 3GPP TS 08.58, section 9.3.4, BS Power IE indicates the transmission power attenuation on a particular channel: +--------------+---------+-----------------+ | Reserved (3) | FPC (1) | Power level (4) | +--------------+---------+-----------------+ so let's change handling of this IE as follows: - s/bs_power/bs_power_red/g, so it reflects 'reduction'; - store power attenuation value in dB, not in 2 db steps; - get rid of ms_power_ctrl.bts_tx_pwr, it's always 0 anyway; - fix rsl_tx_meas_res(): use lchan->bs_power_red; - always check if FPC (Fast Power Control) flag is set; - we don't support it, so reject messages containing it; - fix rsl_rx_chan_activ(): properly apply the bitmask. Change-Id: I16cc50dfca102030380a06e16c234d5f6698f38f
2020-06-15osmo-bts-trx: store pointer to gsm_lchan in l1sched_chan_stateVadim Yanitskiy1-0/+5
This change simplifies access to generic logical channel state (struct gsm_lchan) from osmo-bts-trx specific state (struct l1sched_chan_state), so there is no need to look it up using get_lchan_by_chan_nr() on receipt of each Uplink burst. Change-Id: Ic4378020f980845b962f71b9e4b7faea738bc174
2020-06-15osmo-bts-trx: introduce and use struct trx_dl_burst_reqVadim Yanitskiy2-19/+29
This change is similar to what we did for Uplink bursts: - group all Downlink burst parameters into a single structure, - allocate it once and pass a pointer to lchan handlers, - pass a pointer to trx_if_send_burst(). Given that the structure is allocated and (zero-)initialized in trx_sched_fn(), we can get rid of some memset() calls in lchan handlers and thus improve the overall performance a bit. Change-Id: If3014e69746559963569b77561dbf7b163c68ffa
2020-06-12bts-trx: Implement power ramping during BTS bring upPau Espin Pedrol1-0/+2
The nominal transmit power is still only configurable manually from osmo-bts-trx VTY interface. Support to retrieve the nominal power from osmo-trx will come later. Change-Id: Ia7c353e4c199e0fc3bcab55c45a4abda2c66d2c1