pespin submitted this change.

View Change

Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved dexter: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve
ta_control: Fix skip_block_num not reset when switching TS to PDCH

Change-Id: Id3e81ebec04042dd7d8e4805762e3e518790706d
---
M include/osmo-bts/ta_control.h
M src/common/rsl.c
M src/common/ta_control.c
3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/include/osmo-bts/ta_control.h b/include/osmo-bts/ta_control.h
index bf99331..e003245 100644
--- a/include/osmo-bts/ta_control.h
+++ b/include/osmo-bts/ta_control.h
@@ -2,4 +2,6 @@

#include <osmo-bts/gsm_data.h>

+void lchan_ms_ta_ctrl_reset(struct gsm_lchan *lchan);
+
void lchan_ms_ta_ctrl(struct gsm_lchan *lchan, uint8_t ms_tx_ta, int16_t toa256);
diff --git a/src/common/rsl.c b/src/common/rsl.c
index f16fe7c..ba403bc 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -58,6 +58,7 @@
#include <osmo-bts/pcuif_proto.h>
#include <osmo-bts/notification.h>
#include <osmo-bts/asci.h>
+#include <osmo-bts/ta_control.h>

//#define FAKE_CIPH_MODE_COMPL

@@ -1765,7 +1766,7 @@
memset(&lchan->ho, 0, sizeof(lchan->ho));
memset(&lchan->ms_power_ctrl, 0, sizeof(lchan->ms_power_ctrl));
memset(&lchan->bs_power_ctrl, 0, sizeof(lchan->bs_power_ctrl));
- lchan->ta_ctrl.current = 0;
+ lchan_ms_ta_ctrl_reset(lchan);
copy_sacch_si_to_lchan(lchan);
memset(&lchan->tch, 0, sizeof(lchan->tch));
}
diff --git a/src/common/ta_control.c b/src/common/ta_control.c
index 64c44be..b5d9cb2 100644
--- a/src/common/ta_control.c
+++ b/src/common/ta_control.c
@@ -42,6 +42,12 @@
#define TA_MAX_INC_STEP 2
#define TA_MAX_DEC_STEP 2

+void lchan_ms_ta_ctrl_reset(struct gsm_lchan *lchan)
+{
+ /* Trigger loop on first TA input: */
+ lchan->ta_ctrl.skip_block_num = 0;
+ lchan->ta_ctrl.current = 0;
+}

/* Shall we skip current block based on configured interval? */
static bool ctrl_interval_skip_block(struct gsm_lchan *lchan)

To view, visit change 41790. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Id3e81ebec04042dd7d8e4805762e3e518790706d
Gerrit-Change-Number: 41790
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier@sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: jolly <andreas@eversberg.eu>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>