The file gprs/protocol/gsm_04_60.h is deprecated, now it is recommended
to use gsm/protocol/gsm_44_060.h
Change-Id: I870e446ad8f371e13bbdb4034feae1260c874ee5
The file pcu_l1_if_phy.h contains the function prototypes for the
implementations found in xyz_l1_if.c. Lets also include pcu_l1_if_phy.h
in the related .c files.
Change-Id: Id35ba473973108da4e36d5c6f2ca78da1225ae8b
Related: OS#5198
The function signatures l1if_open_pdch() in the code for lc15 and oc2g
differ from what is defined in pcu_l1_if_phy.h. Lets update the
signatures so that they match the prototype.
Related: OS#5198
Change-Id: If1693b1b74c1808596d7da639b860f7b226385c0
The function headers for the direct phy related functions (l1if_...) are
currently directly listed in pcu_l1_if.cpp and osmobts_sock.c. Those
functions are basically the API interface definition between the
platform independed PCU code and the platform dependant direct phy code.
Lets put them into a dedicated header file.
Change-Id: Id54b96a4cd498a9860f3f209498132455e2aa6f8
Related: OS#5198
The IMMEDIATE ASSIGNMENT for downlink TBFs must be confirmed by the
receiving end (BSC/BTS) in order to set the timers in the PCU correctly.
When the PCU is used in a BSC co-located scheme (Ericsson RBS). The TLLI
is used as an identifier to confirm a specific IMMEDIATE ASSIGNMENT.
Change-Id: Icf7ca34500984239ee877ee71fd9c126b5eb3480
Related: OS#5198
The struct gsm_pcu_if_e1_ccu_ind is a bit misplaced. Lets move it next
to the info indication strucht, to have it in the same order is it used
in gsm_pcu_if
Change-Id: I4afafd8e94dc0083974ff2f5b6d6be0f5574d0bf
Related: OS#5198
The current name of PCU_IF_SAPI_AGCH_DT is a bit misleading as it
describes a method to send immediate assignment messages (normally AGCH)
via the PCH. The name in the constant should reflect that correctly
Change-Id: I6dfb8035134bc85a025415bd6c2f9c01987d9268
Related: OS#5198
osmo-bsc may send invalid frame numbers through the pcu-sock interface.
Lets make sure that incoming frame numbers do not exceed the valid
range.
Change-Id: Ib0cf1738be07733c95fc6c459a8a7c4cb2eeef26
Related: OS#5198
osmo-pcu will also support GPRS via E1 timeslots in a BSC co-located
setup. To avoid duplicate configuration the BSC has to communicate the
E1 parameters (which TS, SS etc.) to the PCU. Lets add a new primitive
to do that.
Change-Id: Ia7928489130c1205b06bb9b10de0fb1461843301
Related: OS#5198
After some earlier refactoring, those fields are only used internally in
the module, and hence can be marked as static.
Change-Id: Ibf2a6ee5636ae7102ffd13b7497769652bcc3202
This is probably a leftover from an old refactoring where the tv was
moved to MetaInfo (msg->cb[].
Change-Id: I7aceaf2d13a125c75925877c4344c0aeed326c79
The previous function name was misleading since it was checking already
for more stuff than pdu containing user data.
Rename the function and move all checks on PDU in there instead of
having it half in one place and half in the other.
Change-Id: Ia0738caa1ccab5f78c2d49db582bdce96f18600a
In case of an FN jump the expected value is logged. Lets also log the
delta between the expected and the current FN as it may give a better
clue what goes wrong
Change-Id: Ie361df30852570fe8a47347a42e962db869ccf82
The function bts_rfn_to_fn() uses int32_t for its internal variables and
the input parameter rfn while the callers and everything outside uses
uint32_t to store frame numbers. Lets convert this to uint32_t and use
GSM_TDMA_FN_ macros wherever possible.
Change-Id: Iedd493bb30dd1c342dec031883060c545432e740
Related: OS#5198
A valid GSM frame ranges from 0 to 2715647. When using
set_current_frame_number() to set the current frame number (source
usually is the layer 1 and below) we should not allow invalid frame
numbers.
Note: this also fixes FnTest which uses invalid frame numbers for
testsing.
Change-Id: Iaae31b370fababba975d419b0d20ac15618c296e
Related: OS#5198
The DL-TBF assigned to another MS object may have a totally different
set of reserved resources (TS set, TRX, etc.), so one cannot simply move
those to the new MS. To start with, if the 2 MS are on different TRX it
is clear that one of them will not be really in operation. That's most
probably the DL-TBF being in ASSIGN state on CCCH waiting for PCUIF_CNF
and later X2002 to trigger to start sending DL blocks, but without
confirmation whether the MS is really there. Since the other new MS
object probably has a UL-TBF, that's the one probably operative, and
hence a new DL-TBF can be created at that same time and assigned through
UL-TBF's PACCH.
Unit test test_ms_merge_dl_tbf_different_trx showcases the above
scenario.
Related: SYS#6231
Related: OS#5700
Related: 677bebbe5c
Change-Id: Ie8cb49d5492cfc4cbf8340f3f376b0e6105e8c82
Add a test which showcases a scenario where the PCU ends up with 1
GprsMs object holding a DL-TBF in a weird condition half in one TRX and
half in other due to ms_merge().
This test (slightly adapted) used to cause a crash in osmo-pcu.git
586ddda9bc (a few versions behind current
master).
Related: SYS#6231
Change-Id: Ic16b5e96debf91e72684833cd64253687857f3aa
This allows having full TS information, not only ts_no, which will be
needed later on followup patches.
Change-Id: I1efccb32c5afa4fe62233bf114ea95b6fbbe1a06
The DL-TBF in the test gets its TS allocated on TS4 (only that one is
enabled through setup_bts(bts, ts_no=4)), and hence it makes no sense to
ask it to send data on TS7.
Change-Id: Ibe6fc073b7438b8024c4d3ddb0e60c6112752351
This allows having full information on the control TS easily reachable
(like TRX ofthe PDCH), and makes it easy to compare TS by simply
matching the pointer address.
Change-Id: I6a97b6528b2f9d78dfbca8fb97ab7c621f777fc7
First commit towards trying to have alloc algorithm as isolated as
possible from others parts of the code trying to avoid state changes on
data structures.
Change name also because the alloc_algo not only allocated TS, but TFIs
and USFs.
Change-Id: I33a6c178c64a769f05d3880a69c38acb154afa62
struct gprs_rlcmac_bts still hardcodes it to 8, but using ARRAY_SIZE
there should aim at seeing the relation between those, and avoid having
one updated without the other.
Related: OS#5827
Change-Id: I165588ba10d8528a9a496175d8dfe9d902c89e55
* Make it similar to the already existing TBF allocation procedures
* Pass pdch pointer instead of trx and ts numbers
Change-Id: I04b3b65942732cc652adeaa507529b849292ff61
The triggering of the assignment for the new TBF allocation is part of
the "upgrade to multislot" process, hence move that inside the function.
Change-Id: Ic2b959f2476b900cb263ccd8f6698ed843bafd29
* Make clear the code relates to DL-TBF and not UL-TBF.
* Change wording to "upgrade" to match the existing field and API
"tbf_can_upgrade_to_multislot()".
* Free the TBF if we cannot allocate new resources.
Change-Id: I0e4f8d7e46235a471b2124b280c81ff07b6967a4
There's no big benefit in keeping it stored since it can be quickly
found. This makes the tbf data structure simplier and easier to
maintain, and discharges the alloc_algorithm functions from an extra
step.
Change-Id: I5d2f665f648f8637466bfdd3bf7b924cb61ede33
The field contains a common value between the 2 active TBFs of the MS,
so it makes no sense to have them duplicated on each TBF. It can be
sanely stored in the MS object.
Change-Id: I8df01a99ccbfaf7a442ade5000ee282bd638fbba
The array of trx in gsm_pcu_if_info_ind can hold trx 8 items. Lets use a
define constant to specify the size of that array.
Change-Id: I2b12fd562ff867188a37e701bba1ad5de904f9bd
The pdch pointer contains more info than just timeslot number. For
instance, it contains information about the TRX owning the TS.
Change-Id: Ic31a7360a29e61f70bb1338ddab6f5f31aa8b26e
Since the tbf_fsm was split recently into tbf_dl_fsm and tbf_ul_fsm,
each has now its own ctx strucvture, which can hold the proper tbf
subclass.
Change-Id: Id2571e55e1fea2918207175f2030ec026e880bc1
Since the tbf_fsm was split recently into tbf_dl_fsm and tbf_ul_fsm,
each has now its own ctx strucvture, which can hold the proper tbf
subclass.
Change-Id: I7741d524a14437caf4c92b9c09e19762eb272e30
This will allow also validate easily the TRX is the correct one too, not
only the TS number in any random TRX.
Change-Id: Ib1a62b6e7b465253ee7cba63bf5e277f8aa8eaea