Commit Graph

116 Commits

Author SHA1 Message Date
Pau Espin dfedf2cb76 phy_link: Introduce bts_model_phy_link_close() and use it in bts-trx
This step is required while turning off the BTS without killing the
process. Right now only osmo-bts-trx supports this feature, so this
function is only available and used by osmo-bts-trx.
Later on, when the feature is support more generally, we can move call
to this function to common place like bts_shutdown_fsm or alike.

Change-Id: I3253112700a31b85db82dc7ccadec8542bac745e
2021-09-23 12:07:29 +00:00
Pau Espin ddd357f3e3 bts-trx: Avoid race condition configuring TS-specific TSC values
In OML, if Set Attributes comes first for Channel object and then for
BTS object, BSIC will still not be set. Hence, when applying Channel
(TS) specific TSC, the code would compare against an unset value,
enabling use of TRXC extensions (which osmo-trx doesn't support)
without need for it, since actually the TSC of the TS matches the BSIC
of the BTS once both are set.

In order to fix it, don't check for the BSIC when receiving the OML
messages, but rather later when we apply the settings to the the lower
layers once trx_provision_fsm allows for it.

Fixes: 3c1151f945
Change-Id: I49fc7e35acb44ecc4f37ae71acd4c684248548e7
2021-09-23 11:09:15 +00:00
Pau Espin eab7068d58 trx_if: delete retrans timer when flushing the Tx queue
Change-Id: Ic31dc5629ed950f3b4b8feb9917d11779696f6eb
2021-09-23 10:00:24 +00:00
Pau Espin 4444262a6a trx_if: Allow calling trx_if_flush/close from within TRXC callback
Change-Id: Ic3baa95ffe4e6ca95c6d02276ea8eb0cb9fa0064
2021-09-23 09:59:29 +00:00
Pau Espin 03c74baa83 trx_if: Set pointer to null after freeing it
Change-Id: Icd93c9968095a8801aafe9440806cb5786320cbc
2021-09-22 12:57:02 +02:00
Vadim Yanitskiy 6d20a49806 [VAMOS] osmo-bts-trx: schedule bursts on 'shadow' timeslots
Change-Id: I3e0bdf8c03273f66991aa1764029ab1dd3528d7e
Related: SYS#4895, OS#4941
2021-06-05 00:34:36 +02:00
Vadim Yanitskiy 5b8080208a osmo-bts-trx: fix NULL pointer dereference in trx_if_send_burst()
Starting from TRXDv2 [1], trx_if_send_burst() would keep batching
PDUs to the static buffer, unless it's called with br = NULL, so
we cannot dereference br in the logging statement.

Of course, we could also store TDMA frame number in a static
variable, but I don't think it's worth it just for logging.

Change-Id: I4a361777fc40bdedcebbe54df6274bc5573f77a8
Fixes: [1] I9b4cc8e10cd683b28d22e32890569484cd20372d
Fixes: CID#236232
2021-06-04 20:06:58 +00:00
Vadim Yanitskiy 3c1151f945 [VAMOS] osmo-bts-trx: properly handle per-timeslot TSC values
Each timeslot can have its own Training Sequence Code value, which
may optionally be included in the NM_MT_SET_CHAN_ATTR message sent
over the A-bis/OML.  If it's not present, then the TSC value for a
timeslot is derived from the BCC part of BSIC, which is always
included in the NM_MT_SET_BTS_ATTR message.

On the TRXC interface, the BTS global TSC value is indicated to the
transceiver using either of the 'SETTSC' or 'SETBSIC' commands.
The transceiver then applies this value for all timeslots by default,
however it can be redefined for each timeslot individually using
additional arguments of the 'SETSLOT' command (see section 25.2.4.1
in the user manual [1] for more details).

Currently, trx_set_ts_as_pchan() sends TRX_PROV_EV_CFG_TSC to the
transceiver provisioning FSM, together with the per-timeslot TSC
value.  This event causes the FSM to modify the global TSC value,
that is going to be or has already been sent to the transceiver.
This is wrong, the global TSC value shall not be overwritten.

Remove the TRX_PROV_EV_CFG_TSC, and include per-timeslot Training
Sequence Code and Set in the data structure that gets passed together
with the TRX_PROV_EV_CFG_TS instead.  Implement handling of the
optional per-timeslot TSC in trx_if_cmd_setslot().

[1] https://downloads.osmocom.org/docs/latest/osmobts-usermanual.pdf

Change-Id: Idc5796151e3e83f42d60c2d4cb7c35890d76a7f5
Related: SYS#4895, OS#4941
2021-06-04 20:04:13 +00:00
Vadim Yanitskiy 13d595a9ef [VAMOS] osmo-bts-trx: indicate MTS in Downlink TRXDv2 PDUs
Change-Id: I1a17a25883214c068f9b1a6d651128b8f760d1fb
Related: SYS#4895, OS#4941
2021-06-01 02:46:43 +00:00
Vadim Yanitskiy ec1045a01b [VAMOS] osmo-bts-trx: implement and enable PDU batching for TRXDv2
This change implements TRXD PDU batching approach b), which is described
in section 25.3.4 of the user manual [1].  This approach is quite easy
to implement on the transceiver side, so we can enable it by default.

  .Example: datagram structure for combination b)
  ----
  +--------+----------------+---------+------------------------+
  | TRXN=N | TDMA FN=F TN=0 | BATCH=1 | Hard-/Soft-bits        |
  +--------+----------------+---------+------------------------+
  | TRXN=N | TDMA FN=F TN=1 | BATCH=1 | Hard-/Soft-bits        |
  +--------+----------------+---------+------------------------+
  | TRXN=N | TDMA FN=F TN=2 | BATCH=1 | Hard-/Soft-bits        |
  +--------+----------------+---------+------------------------+
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  +--------+----------------+---------+------------------------+
  | TRXN=N | TDMA FN=F TN=7 | BATCH=0 | Hard-/Soft-bits        |
  +--------+----------------+---------+------------------------+
  ----

Other PDU batching approaches can be introduced later.

[1] https://downloads.osmocom.org/docs/latest/osmobts-usermanual.pdf

Change-Id: I9b4cc8e10cd683b28d22e32890569484cd20372d
Related: SYS#4895, OS#4941
2021-06-01 02:46:43 +00:00
Vadim Yanitskiy 6ad89f2f58 osmo-bts-{trx,virtual}: fix: pinst->trx may be NULL
We assume that it's legal to have dangling PHY instances that are
not associated with any TRX instances in the configuration file.
Obviously, such PHY instances have pinst->trx set to NULL.

The DSP based models seem to handle dangling PHY instances without
any problems, so let's ensure that we always check pinst->trx
against NULL in the osmo-bts-{trx,virtual} specific code.

Change-Id: Ib7d9cb7ae47fead723fa46454cd64bf6e88756bb
Fixes: CID#236092 "Dereference before null check"
2021-05-19 16:53:06 +02:00
Vadim Yanitskiy dd9a6f16bc osmo-bts-trx: clarify logging messages in trx_if_{open,close}()
Change-Id: I48e64b5b52fc476f915d3a93535b21f0f192b7a9
2021-05-19 16:28:26 +02:00
Vadim Yanitskiy 462bf0952a [VAMOS] Re-organize osmo-bts-trx specific structures
Together with the 'generic' structures which used to be shared between
osmo-bsc and osmo-bts some time ago, we also have the following
osmo-bts-trx specific structures (in hierarchical order):

  - struct l1sched_trx (struct gsm_bts_trx),
  - struct l1sched_ts (struct gsm_bts_trx_ts),
  - struct l1sched_chan_state (struct gsm_lchan).

These structures are not integrated into the tree of the generic
structures, but maintained in a _separate tree_ instead.  Until
recently, only the 'l1sched_trx' had a pointer to generic
'gsm_bts_trx', so in order to find the corresponding 'gsm_lchan' for
'l1sched_chan_state' one would need to traverse all the way up to
'l1sched_trx' and then tracerse another three backwards.

                                 + gsm_network
                                 |
                                 --+ gsm_bts (0..255)
                                   |
  --+ l1sched_trx --------------------> gsm_bts_trx (0..255)
    |                                |
    --+ l1sched_trx_ts               --+ gsm_bts_trx_ts (8)
      |                                |
      --+ l1sched_chan_state           --+ gsm_lchan (up to 8)

I find this architecture a bit over-complicated, especially given
that 'l1sched_trx' is kind of a dummy node containing nothing else
than a pointer to 'gsm_bts_trx' and the list of 'l1sched_trx_ts'.

In this path I slightly change the architecture as follows:

                                 + gsm_network
                                 |
                                 --+ gsm_bts (0..255)
                                   |
                                   --+ gsm_bts_trx (0..255)
                                     |
    --+ l1sched_trx_ts <----------------> gsm_bts_trx_ts (8)
      |                                |
      --+ l1sched_chan_state           --+ gsm_lchan (up to 8)

Note that unfortunately we cannot 1:1 map 'l1sched_chan_state' to
'gsm_lchan' (like we do for 'l1sched_trx_ts' and 'gsm_bts_trx_ts')
because there is no direct mapping.  The former is a higl-level
representation of a logical channel, while the later represents
one specific logical channel type like FCCH, SDCCH/0 or SACCH/0.

osmo-bts-virtual re-uses the osmo-bts-trx hierarchy, so it's also
affected by this change.

Change-Id: I7c4379e43a25e9d858d582a99bf6c4b65c9af481
2021-05-18 19:11:06 +00:00
Vadim Yanitskiy 4733b099f5 osmo-bts-trx: implement TRXDv2 protocol support
Change-Id: I3532a6693bb335043ec390049138308991083e66
Related: SYS#4895, OS#4941, OS#4006
2021-05-11 10:55:55 +00:00
Vadim Yanitskiy c9635b0ad1 osmo-bts-trx: refactor parse_rsp(), fix compilation warnings
For a long time, we see this annoying -Wstringop-truncation warning:

  In function ‘parse_rsp’,
      inlined from ‘trx_ctrl_read_cb’ at trx_if.c:647:6:
  trx_if.c:416:2: warning: ‘strncat’ output may be truncated copying
                  between 0 and 45 bytes from a string of length 1495
    416 |  strncat(rsp->cmd, buf_in + 4, p - buf_in - 4);
        |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

There is no real need to use strncat() in parse_rsp(), because we
do not concatenate any strings but simply copy TRXC response parts
from the input buffer to the corresponding 'name' and 'parameters'
buffers.  Let's use memcpy() instead.  This also fixes the warning.

Change-Id: Ia10adf7d76abe9a423b07e828852fbfb53b95125
2021-04-30 21:07:41 +02:00
Vadim Yanitskiy f3e3a3ac99 osmo-bts-trx: reduce code nasting in trx_if_send_burst()
If the PHY is not powered on and we are not supposed to send any
bursts to it, then trx_if_send_burst() should just return early.

Change-Id: I578bd5a731ad88ebff283c75bb7eb268d9e7e787
Related: SYS#4895, OS#4941, OS#4006
2021-04-30 19:02:15 +00:00
Vadim Yanitskiy 67b141c567 osmo-bts-trx: assert PDU version in trx_if_send_burst()
If somehow the TRXC logic negotiates a non-supported TRXD PDU version,
then it's a serious bug in the code.  Let's add an assert() for that.

Change-Id: I301377bcebd5e2bbcfc18b3637253ef261bb5b2e
2021-04-30 19:02:15 +00:00
Vadim Yanitskiy 7651b078b1 osmo-bts-trx: enlarge and share TRXD message buffer
Starting from TRXDv2, several PDUs may be batched together and sent in
all together a single datagram.  This requires us to increase the buffer
size that we use for sending and receiving TRXD messages.  Let's use
65536 matching the default MTU value for 'lo' interface on Linux.

Given that 65536 is quite a big number, let's allocate a shared Rx/Tx
buffer statically to avoid [potential] stack overflow.

Change-Id: I729451c8ecdc7ff2631beb423f15523db16b3ee3
Related: SYS#4895, OS#4941, OS#4006
2021-04-30 19:02:15 +00:00
Vadim Yanitskiy 010841644b osmo-bts-trx: refactor handling of version specific TRXD parts
This is a preparatory change for the upcoming TRXDv2 support:

* move common TRXDv0/v1 header parser into a separate function;
* move burst handling into a single, version independent function;
** determine modulation and burst length in trx_data_parse_pdu_v0();

Change-Id: I7aedd85a8d4f6d6191cd3b75272a688208fb2879
Related: SYS#4895, OS#4941, OS#4006
2021-04-30 19:02:15 +00:00
Vadim Yanitskiy dd8439f889 osmo-bts-trx: pass 'struct phy_instance' to TRXD dissectors
All these functions need the PHY instance pointer for logging,
they don't really need a pointer to 'struct trx_l1h'.

Change-Id: I626b4392a8bc57a3fe5e8c931aa1ce9dd505676c
Related: SYS#4895, OS#4941, OS#4006
2021-04-24 08:48:03 +00:00
Vadim Yanitskiy 8a99365281 osmo-bts-trx: generalize checking of TRXD header length
Change-Id: I7df851c3afb82133f84dc805e0926438a90efe07
Related: SYS#4895, OS#4941, OS#4006
2021-04-24 08:47:56 +00:00
Vadim Yanitskiy ac55dcb5d0 osmo-bts-trx: cosmetic: get rid of TRX_CHDR_LEN macro
The 'CHDR' stands for 'Common Header', but this does not apply to
TRXDv2 because TDMA frame number may not be present in the batched
PDUs.  Let's avoid potential confusion by removing it.

Change-Id: I80495df474c432f4c0a4cfa6f917821d7b35859a
2021-04-24 08:47:00 +00:00
Vadim Yanitskiy 17350e2fd6 osmo-bts-trx: move TDMA frame number check to trx_data_read_cb()
Change-Id: Ib3c4a5ad7f16196dc5c591aa0b4d7e0ec3267f05
Related: SYS#4895, OS#4941, OS#4006
2021-04-24 08:47:00 +00:00
Vadim Yanitskiy 974bf725a4 osmo-bts-trx: discard TRXD PDUs with unexpected version
Change-Id: Icdc3d12a7686428046113f9fa8f21a99569e651a
Related: SYS#4895, OS#4941, OS#4006
2021-04-24 08:47:00 +00:00
Vadim Yanitskiy 16c2998069 osmo-bts-trx: move MTS parser into trx_data_parse_mts()
This would allow to re-use this code from the TRXDv2 parser.

Change-Id: I2de2cb2d58110452d8dedbcacfef28f85f6d67c1
Related: SYS#4895, OS#4941, OS#4006
2021-04-24 08:47:00 +00:00
Vadim Yanitskiy b619da5e72 osmo-bts-trx: 'burst type' is actually modulation type
Burst type and modulation type are actually different things.

Change-Id: Ic06c96434ad32dd3770b88cb1fefcbefb2fc3928
Related: SYS#4895, OS#4941, OS#4006
2021-04-24 08:47:00 +00:00
Vadim Yanitskiy 61fcfa6ae7 osmo-bts-trx: define TRXC/TRXD message buffer size
Change-Id: I4cb05600fa8af33e1c92e93cc1a86c14f21b9fb2
Related: SYS#4895, OS#4941, OS#4006
2021-04-24 08:47:00 +00:00
Vadim Yanitskiy ab5cc5e6c5 osmo-bts-trx: remove outdated TRXD protocol documentation
We do have TRXC/TRXD documentation in osmo-gsm-manuals repository.
This big comment is out of sync with what we have in the manuals,
so let's better remove it to avoid maintaining docs in several places.

Change-Id: Ibfcefcbb5f30fe9b6c691578a93e6fedd5644b30
Related: SYS#4895, OS#4941, OS#4006
2021-04-21 01:26:00 +02:00
Vadim Yanitskiy 32ef94cac0 osmo-bts-trx: cosmetic: TRXD 'header version' -> 'PDU version'
TRXDv2 brings significant changes to the whole PDU structure, not
just the header.  Let's highlight this in the code / strings.

Change-Id: Id0274bd1ae5c419548596ed1852e6a28ec62b713
Related: SYS#4895, OS#4941, OS#4006
2021-04-21 01:26:00 +02:00
Vadim Yanitskiy 9dd7e3c907 osmo-bts-trx: fix segfault on trx_phy_inst_open() failure
If for whatever reason it fails to initialize the TRXD or TRXC
interface, trx_phy_inst_open() would return an error.  This
would cause bts_model_phy_link_open() to call trx_if_close()
on each of the PHY links, including those that were never
opened.  This leads to a segfault in trx_if_close().

Make sure that in trx_if_init() we properly init 'struct trx_l1h',
so it's safe to call trx_if_close() at any time and in any state.

Change-Id: I1f128813528f505fede04799e84456f6271058d0
2021-04-01 15:21:44 +00:00
Vadim Yanitskiy ca1628fb7a osmo-bts-trx: fix: do not call trx_if_close() two times
It's called by trx_phy_inst_open() if trx_if_open() fails.

Change-Id: Ic672f865ab513043a58979471a254a59d44daa6d
2021-03-18 07:52:45 +01:00
Pau Espin af4015cb91 bts-trx: Use TRXC RFMUTE instead of resetting the scheduler
Since commit 221ee92551,
bts_model_trx_deact_rf() was being called when RF locking the TRX, which
was implemented by resetting the scheduler. This proved to be a messy
and wrong way to emulate disabling RF, since it modifies tate on lots of
structures from which it is later difficult to recover from, causing
bugs and issues like:
82a35a1dbf
be15a12c87
eef420d1ca
https://osmocom.org/issues/4694
https://osmocom.org/issues/4695
https://osmocom.org/issues/4696
https://osmocom.org/issues/4697

So for all these reasons, it is believed a good solution to avoid
resetting the scheduler and simply ask lower layers (osmo-trx) to take
care of disabling RF TX/RX on a given TRX. For TRX implementations not
supporting the newly added RFMUTE command, ramping down to -10dBm still
provides for a way to emulate RF locking. In any case, none of this was
supported until recently so it's not like we are breaking some feature
here.

Related: SYS#4920
Change-Id: I1423ddb390ef327ec7d4a27de2ac5dca663773a5
2020-09-07 08:08:09 +00:00
Vadim Yanitskiy cf3635fbaa osmo-bts-trx/scheduler: implement baseband frequency hopping
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-07 23:39:01 +07:00
Pau Espin 5c22fa33f7 bts-trx: Integrate TRX provisioning logic more tightly into the FSM
The state of each config required is now tracked through the "acked"
variables, this way the FSM can know when all configs are confirmed by
the TRX and can proceed to submit POWERON command.
With this version each TRX is still totally independent (there's an FSM
per TRX), which means POWERON can be sent on TRX0 before TRX!=0 are
fully configured. As a result, powe ramping may start before we know the
NOMTXPOWER of a TRX. This kind of issue will be fixed in next commit.

Related: SYS#4920
Change-Id: I1b736a4be5ce52a854f5767d8609153e1f4c08d9
2020-07-22 19:01:35 +02:00
Pau Espin 1272af4529 bts-trx: introduce TRX provisioning FSM
With prior code state managing the TRXC side of osmo-bts-trx, there are
plenty o cases (race conditions) where things can go wrong/unexpected,
because there's really no infrastructure to wait and synchronize between
different TRXs (eg wait until all are configured to POWERON), or to
simply keep well known per-trx state regarding lower layers.

In order to fix in the future all of those issues and to sanitize
current code, a new per-trx FSM is introduced, which takes care of
submitting TRXC commands and waiting for response when needed to manage
the state of the TRX.

Related: OS#4364
Change-Id: I2a00c23df15840e33fbb232c9e1dd6db128f63f6
2020-07-14 11:44:30 +02:00
Pau Espin f23d835831 tx_power: Support controlling BTS with nominal tx pwr < 0dBm
Related: OS#4583
Change-Id: I88d59d47837105d52e2b4dfb819511cd360c50a1
2020-06-27 14:23:06 +00:00
Vadim Yanitskiy 2f18578dcc Use libosmocore's TDMA frame number API (constatns & arithmetic)
Depends: (libosmocore) Ic291fd3644f34964374227a191c7045d79d77e0d
Change-Id: I61c97a62bd5dbbb4a984921ebdfc10ad6ed00f2a
2020-06-25 18:02:10 +00:00
Pau Espin 34940bdb2a bts-trx: Instruct user to set manually nominal-tx-power if NOMTXPOWER not 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-19 20:34:08 +00:00
Vadim Yanitskiy ae781bc5cd osmo-bts-trx: introduce and use struct trx_dl_burst_req
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-15 10:42:03 +00:00
Vadim Yanitskiy 0b92bcc37c osmo-bts-trx: use osmo_store32be() in trx_if_send_burst()
Change-Id: I5000fe61b29d796b9229f921bffcb392b1c6d189
2020-06-15 10:42:03 +00:00
Pau Espin 26cecfdea4 bts-trx: Use TRXC cmd NOMTXPOWER to retrieve nominal tx power from osmo-trx
Change-Id: I682211f3d664c21f923ca4a530e0464ca383b6d9
2020-06-12 09:59:56 +00:00
Pau Espin c854ca14d5 bts-trx: Rename setpower TRXC functions to describe they use power attenuation
Change-Id: Iedbe8e76bce990c2330477157cd886a8fc22063c
2020-06-12 09:59:56 +00:00
Pau Espin adf5d3aed2 bts-trx: Implement power ramping during BTS bring up
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
2020-06-12 09:59:56 +00:00
Vadim Yanitskiy fe8f13ace3 osmo-bts-trx/trx_if: cosmetic: s/ocommand/command/
Change-Id: I06db72deb78cbab588de2103657b0722b67887a0
2020-06-07 18:59:06 +00:00
Vadim Yanitskiy 79aec05c23 osmo-bts-trx/trx_if: fix memleak in trx_ctrl_cmd_cb()
If we do not enqueue a TRXC message, we should release memory.

Change-Id: Ie2cdf547befbc0fafdb82b10b45ad85a9b188b88
2020-06-07 18:59:06 +00:00
Pau Espin eba074e081 bts-trx: trx_if.c: Fix some printf formats
Compiler from raspberrypi4 warns/errors about those.

Change-Id: I4f973eb4ffdf8869b522d14e25853357fcd1e984
2020-02-25 18:28:52 +01:00
Vadim Yanitskiy 595eb576fc osmo-bts-trx/trx_if.c: fix: NOPE.ind also contains C/I field
Change-Id: I201b72d2a6f5307ede252d5d707f1ebadafe6a4b
2019-11-20 13:43:37 +00:00
Vadim Yanitskiy 19857fbdaa osmo-bts-trx/trx_if.c: also print both RSSI and ToA256 for NOPE.ind
Change-Id: I36586ac33757705df16e14cfdd92becb96c8cf70
2019-11-19 13:54:40 +07:00
Vadim Yanitskiy 8a98255fb5 osmo-bts-trx/trx_if.c: fix: always initialize bi->burst_len for NOPE.ind
A NOPE.ind indicates absence of an Uplink burst, thus it does not
carry a burst. Let's init the burst length to avoid uninitialized
memory access in the scheduler code.

Change-Id: I77f686bf7df385215892e71733a28ff0d90d7222
Fixes: CID#205857
2019-11-19 13:54:36 +07:00
Vadim Yanitskiy b37b3263a9 osmo-bts-trx: general handling of NOPE / IDLE indications
Each logical channel can now optionally have an additional handler,
that will be called when a NOPE / IDLE indication is received from
the transceiver. The aim of that handler is to keep the logical
channel state updated in case if one or more Uplink bursts are lost.

Change-Id: I71c552f44c25e56e9779d8b8ef5d4de9f8475637
Related: OS#3428
2019-11-19 01:01:45 +00:00