aboutsummaryrefslogtreecommitdiffstats
path: root/src/sysmo_l1_if.c
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-08-26 13:22:28 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-08-28 12:23:07 +0200
commitaf75ce8e15ec8584cbc96a0cd366a5df68b9dae8 (patch)
tree7ea2edb8781c6a92b068464144fe67ec4eda024a /src/sysmo_l1_if.c
parentbe4a08b58ae17b44d2c02421d8346a1ccb63a6b9 (diff)
l1: Use the FN of all data_ind/ra_ind DSP messages
Currently all of these messages are discarded if they are assumend to be caused by noise. But even in these cases, the FN and TN values which are added by the DSP are valid. So these can be used to update the current_frame value. The osmo-bts sets the fBFILevel of a physical channel to -200dB if it is used for PDTCH or PACCH which is the case for all PDCH. This way a data_ind or ra_ind message is already send at least once per block period (4 frames) per PDCH. These messages are passed to either handle_ph_data_ind or handle_ph_ra_ind even if they contain garbage data. The ra_ind messages are sometimes sent a few frames earlier than data_ind messages using the same frame. This commit adds calls to update the current_frame value based on all of these messages before they are discarded. The FN taken from ra_ind are passed with an increased max_delay (5) to compensate for early ra_ind messages. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/sysmo_l1_if.c')
-rw-r--r--src/sysmo_l1_if.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sysmo_l1_if.c b/src/sysmo_l1_if.c
index fc4b59b1..85727861 100644
--- a/src/sysmo_l1_if.c
+++ b/src/sysmo_l1_if.c
@@ -190,6 +190,8 @@ static int handle_ph_data_ind(struct femtol1_hdl *fl1h,
osmo_hexdump(data_ind->msgUnitParam.u8Buffer,
data_ind->msgUnitParam.u8Size));
+ pcu_rx_block_time(data_ind->u16Arfcn, data_ind->u32Fn, data_ind->u8Tn);
+
/*
* TODO: Add proper bad frame handling here. This could be used
* to switch the used CS. Avoid a crash with the PCU right now
@@ -237,6 +239,8 @@ static int handle_ph_ra_ind(struct femtol1_hdl *fl1h, GsmL1_PhRaInd_t *ra_ind)
{
uint8_t acc_delay;
+ pcu_rx_ra_time(ra_ind->u16Arfcn, ra_ind->u32Fn, ra_ind->u8Tn);
+
if (ra_ind->measParam.fLinkQuality < MIN_QUAL_RACH)
return 0;