laforge submitted this change.
trxcon: handle_tbf_cfg_req(): properly set TSC for lchans
Before this patch all Uplink PDCH bursts were using TSC=0.
Change-Id: I58b2da0d285b9a3e444374a30276fbaab3b784ac
Related: OS#5500
---
M src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h
M src/host/trxcon/src/trxcon_fsm.c
2 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h b/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h
index 3d85d59..ff54e78 100644
--- a/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h
+++ b/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h
@@ -34,6 +34,7 @@
struct {
uint16_t band_arfcn;
uint8_t tx_power;
+ uint8_t tsc; /* only valid for DCCH/PDCH */
int8_t ta;
} l1p;
diff --git a/src/host/trxcon/src/trxcon_fsm.c b/src/host/trxcon/src/trxcon_fsm.c
index 29caeef..f6c9a05 100644
--- a/src/host/trxcon/src/trxcon_fsm.c
+++ b/src/host/trxcon/src/trxcon_fsm.c
@@ -369,6 +369,9 @@
return;
}
+ /* Store TSC for subsequent PDCH timeslot activation(s) */
+ trxcon->l1p.tsc = req->tsc;
+
if (config == GSM_PCHAN_PDCH)
osmo_fsm_inst_state_chg(fi, TRXCON_ST_PACKET_DATA, 0, 0);
else
@@ -522,15 +525,20 @@
struct l1sched_state *sched = trxcon->sched;
if (active) {
+ struct l1sched_lchan_state *lchan;
+ struct l1sched_ts *ts;
+
if (sched->ts[tn] != NULL) /* already enabled */
return;
if (l1sched_configure_ts(sched, tn, GSM_PCHAN_PDCH) != 0)
return;
OSMO_ASSERT(sched->ts[tn] != NULL);
+ ts = sched->ts[tn];
- l1sched_activate_lchan(sched->ts[tn], L1SCHED_PDTCH);
- l1sched_activate_lchan(sched->ts[tn], L1SCHED_PTCCH);
- /* FIXME: set TSC for both lchans */
+ l1sched_activate_lchan(ts, L1SCHED_PDTCH);
+ l1sched_activate_lchan(ts, L1SCHED_PTCCH);
+ llist_for_each_entry(lchan, &ts->lchans, list)
+ lchan->tsc = trxcon->l1p.tsc;
} else {
l1sched_del_ts(sched, tn);
}
To view, visit change 34318. To unsubscribe, or for help writing mail filters, visit settings.