Commit Graph

13 Commits

Author SHA1 Message Date
Max 6dc90b8c86 Move PDCH-related functions into separate files
The PDCH class and corresponding functions are rather self-contained and
independent from BTS implementation. Let's move them into separate file
to make bts.cpp more manageable. As additional benefit it allow us to
somewhat untangle all the different cross-dependent includes.

Change-Id: Ie05e25361e6741a81b024679f9675c98d4923683
Related: OS#1539
2018-02-19 17:41:24 +01:00
Max 1187a7719c Update header includes
Many files include unnecessary headers and don't include headers which
are actually used. Because of that combined with the fact that OsmoPCU
is a mixture of C and C++, it makes it hard to modularize code. Fix
this (using iwyu [1] tool):

* add missing headers
* remove unused headers

[1] https://include-what-you-use.org/

Related: OS#1539
Change-Id: I8c9f488a43b099c72b2d30d3245e7ba50872fc00
2018-02-19 08:43:46 +00:00
Max 9dabfa2c2b Cleanup FN scheduling
* replace magic number with defined constant
* move copy-pasted code to inline functions
* remove unused code

Change-Id: I6fee0714453d0c3c3f3f875f88daea2d9c477331
Related: OS#1524
2017-05-26 07:55:52 +00:00
Max 127a1e0750 Log additional info for radio errors
Change-Id: I936a07ce87f05d9c3dc351dc3bdc4f00d78265e0
Related: OS#1553
2017-01-16 10:10:01 +01:00
Max 9bbe1600cc Fix Timing Advance handling
* initialize with invalid TA instead of making assumption that phone is
  located within 550 meters (TA=0)
* only set valid TA

Change-Id: Idfc40ff0c11bdac13d9e28fbfa4e95dfc6b735b0
Related: OS#1526
2016-09-09 06:37:04 +00:00
Jacob Erlbeck 1139ec1d0f sba: Fix loop exit in SBAController::alloc (Coverity)
The commit 506f156f7a has reverted the
TS search order. The outer loop exit condition was not updated
accordingly. This bug would would only lead to an error if there were
multiple TRX where the first TRX has not got any PDCH assigned.

This commit corrects the break condition.

Fixes: Coverity CID 1311776
Sponsored-by: On-Waves ehf
2015-07-15 14:17:19 +02:00
Jacob Erlbeck 506f156f7a sba: Reverse TS search order
Currently the search for an enabled PDCH slot for SBA start with the
first TS. If there are more than 2 PDCH slots enabled, this slot will
conflict with an existing multislot reservation for most multislot
classes. This were less likely if the search were reversed and
started with the last slot due to the 3 slot shift between Tx and Rx.

When multislot allocation is enabled and several MS are connected,
and increased rate of poll timeouts can be observed.

This commit tries to reduce the number of poll timeouts by reverting
the slot search order for SBA allocation.

Sponsored-by: On-Waves ehf
2015-07-07 10:41:44 +02:00
Holger Hans Peter Freyther b98dd9e240 sba: Move freeing a sba into a central place 2013-10-30 21:24:12 +01:00
Holger Hans Peter Freyther 93e048fe27 sba: Count SBA allocation, frees and timeouts
Add a warning about the receive message poking in the internal
of the sba. This will be cleaned up in a follow up commit
2013-10-30 21:24:12 +01:00
Holger Hans Peter Freyther dea63b96e0 sba/pdch: Use thepdch to look up a sba for a frame number 2013-10-30 21:24:11 +01:00
Holger Hans Peter Freyther 09ef27ae04 pdch: Simplify the reset code, rename variables to XYZ_no
Simplify the reset code now that the PDCH can know where it is
located. Rename the variables in the sba to trx_no and ts_no as
it stores the number and not the actual thing.
2013-10-30 21:24:10 +01:00
Holger Hans Peter Freyther cedf890928 sba: Create a SBAController that will manage the sbas for a BTS
The PollController is a friend of the SBAController and is allowed
to access the internal list. The list is hidden from everyone else.

This is done because the calculation of timeout should belong into
the PollController and not into the SBAController.
2013-10-30 21:24:10 +01:00
Holger Hans Peter Freyther 621dc2fd01 sba: Move the sba code to a dedicated file
Move the code around and then turn it into an object...
2013-10-30 21:24:10 +01:00