Commit Graph

13 Commits

Author SHA1 Message Date
Oliver Smith 1741372556 treewide: remove FSF address
Remove the paragraph about writing to the Free Software Foundation's
mailing address. The FSF has changed addresses in the past, and may do
so again. In 2021 this is not useful, let's rather have a bit less
boilerplate at the start of source files.

Change-Id: I73be012c01c0108fb6951dbff91d50eb19b40c51
2021-12-14 12:52:04 +00:00
Vadim Yanitskiy f5fa7dbd19 trxcon/scheduler: constify Downlink burst bits where possible
Change-Id: Ib3e3a0a5b4551126b1a9439000d4438c58a6a90a
2020-03-16 10:32:42 +00:00
Vadim Yanitskiy 2060b5b7cc trxcon/scheduler: refactor Downlink measurement processing
So far we used to store the sums of ToA and RSSI measurements in the
logical channel state, and after decoding of a block, we did calculate
the average. This approach works fine for xCCH and PDTCH, but when it
comes to block-diagonal interleaving (which is used on TCH/F and TCH/H
channels), the results are incorrect. The problem is that a burst on
TCH may carry 57 bits of one encoded frame and 57 bits of another.

Instead of calculating the sum of measurements on the fly, let's push
them into a circular buffer (the measurement history), and keep them
there even after decoding of a block. This would allow us to calculate
the average of N last measurements depending on the interleaving type.

A single circular buffer can hold up to 8 unique measurements, so the
recent measurements would basically override the oldest ones.

Change-Id: I211ee3314f0a284112a4deddc0e93028f4a27cef
2020-03-08 22:50:54 +00:00
Eric Wild 4269c4d00b trxcon/scheduler: fix bit shift in BSIC / TDMA FN calculation
Ubsan is unhappy about shifts into the sign bit of our implicitly
promoted value.

Change-Id: I4e72db1143a68064ba83668414dc3d60c0e1ad78
2019-06-24 12:55:52 +00:00
Vadim Yanitskiy 1b6be6fc24 trxcon: do not include trxcon.h everywhere
Change-Id: Ia78bd6dac7ab12970838e0b1a2929a106b898d9d
2019-01-17 10:55:41 +07:00
Vadim Yanitskiy c066787fd5 host/trxcon: use integer math for ToA (Timing of Arrival)
There's no need to express ToA value as a float. Let's turn it into
an int16_t with 1/256 symbol period accuracy throughout the code to
avoid both float arithmetic as well as loosing any precision.

Inspired by Idce4178e0b1f7e940ebc22b3e2f340fcd544d4ec.

Change-Id: I99c0f38db08a530d5846c474aba352aa0b68fe86
2018-03-02 21:24:57 +07:00
Vadim Yanitskiy a403215bea trxcon/scheduler: move prim management outside lchan handlers
Previously, each lchan handler used to obtain and delete primitives
from a timeslot's tranmit queue itself. This approach entails many
potential problems and bugs:

  - The lchan handlers shall not do that by definition, they
    should encode and decode frames according to GSM 05.03.

  - In some cases (e.g. TCH), a single transmit queue may contain
    primitives of different types (e.g. TCH, FACCH and SACCH). At
    the same time, the lchan handlers don't care and don't even
    know about each other. So, this could cause an unexpected
    behaviour in some cases.

This change separates all primitive management routines,
providing a new API for obtaining and dropping them.

"Write programs that do one thing and do it well."

Change-Id: I29503ece51903784bc53541015285234471c8d15
2017-12-18 05:26:48 +07:00
Vadim Yanitskiy 60ff614446 host/trxcon/scheduler: always print error messages
Some error messages previously had incorrect logging level 'debug'.
We aren't going to hide anything, right? Let's print them!

Change-Id: I85fb37292046b667386bfe26b9bbb000600e1c6f
2017-12-16 16:33:17 +07:00
Vadim Yanitskiy ac764e78fd host/trxcon/scheduler: separate logging of data messages
Change-Id: I3a33687a688db2a183b546425f71c7a0a7030594
2017-11-19 17:35:07 +07:00
Vadim Yanitskiy f9ab2a0b49 host/trxcon/scheduler: clean up some includes
Change-Id: I47e3b953b80f4f822d563579d15498181009ca80
2017-11-19 17:35:07 +07:00
Vadim Yanitskiy c0100cd145 host/trxcon/scheduler: get rid of useless nbits argument
Change-Id: I8508676e2cb347396c6ca6b394f13113f3e63084
2017-11-19 17:35:07 +07:00
Vadim Yanitskiy 8fd143ee5a host/trxcon/scheduler: pass trx_lchan_state to lchan handlers
It's better to pass a trx_lchan_state instance directly from
caller to lchan handler instead of passing trx_lchan_type. This
way a handler wouldn't need to find lchan itself.

Change-Id: I47a40542b03ab31da12b0abb1c263c83662ff018
2017-11-19 17:35:07 +07:00
Vadim Yanitskiy 9760a84a6d host/trxcon: split sched_lchan_handlers.c
It would be better to have xCCH, SCH and RACH burst handlers
in separate files, because as much code we add to a single
file, as harder it becomes to read and understand one.

Change-Id: I456a60e68b32b792e63dd03ae97159dc101fd4bf
2017-11-19 17:35:07 +07:00