summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-12-04 14:20:05 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2019-12-04 14:34:03 +0100
commit7540d030330b982de657cdede844ac6fe216bb45 (patch)
tree763dbd16e9d00925f65d4bef44261594a9432ec2
parent7069dfc051d5096e9614a17234646a186de290c9 (diff)
trxcon: Use current MS Power on dummy meas reportspespin/ms-pwr
-rw-r--r--src/host/trxcon/sched_prim.c6
-rw-r--r--src/host/trxcon/sched_trx.c6
-rw-r--r--src/host/trxcon/sched_trx.h5
3 files changed, 13 insertions, 4 deletions
diff --git a/src/host/trxcon/sched_prim.c b/src/host/trxcon/sched_prim.c
index 50dfd6e9..d22b23a8 100644
--- a/src/host/trxcon/sched_prim.c
+++ b/src/host/trxcon/sched_prim.c
@@ -171,7 +171,6 @@ static struct trx_ts_prim *prim_compose_mr(struct trx_lchan_state *lchan)
/* Compose a new Measurement Report primitive */
memcpy(prim->payload, mr_src_ptr, GSM_MACBLOCK_LEN);
-#if 0
/**
* Update the L1 SACCH pseudo-header (only for cached MRs)
*
@@ -186,10 +185,9 @@ static struct trx_ts_prim *prim_compose_mr(struct trx_lchan_state *lchan)
* decide whether to update the cached L1 SACCH header here.
*/
if (!cached) {
- prim->payload[0] = trx->tx_power;
- prim->payload[1] = trx->ta;
+ prim->payload[0] = lchan->ts->trx->tx_power;
+ prim->payload[1] = lchan->ts->trx->ta;
}
-#endif
/* Inform about the cache usage count */
if (cached && lchan->sacch.mr_cache_usage > 5) {
diff --git a/src/host/trxcon/sched_trx.c b/src/host/trxcon/sched_trx.c
index eb6f3dc0..6bb662db 100644
--- a/src/host/trxcon/sched_trx.c
+++ b/src/host/trxcon/sched_trx.c
@@ -202,6 +202,9 @@ struct trx_ts *sched_trx_add_ts(struct trx_instance *trx, int tn)
/* Allocate a new one */
trx->ts_list[tn] = talloc_zero(trx, struct trx_ts);
+ /* Add backpointer */
+ trx->ts_list[tn]->trx = trx;
+
/* Assign TS index */
trx->ts_list[tn]->index = tn;
@@ -287,6 +290,9 @@ int sched_trx_configure_ts(struct trx_instance *trx, int tn,
if (!lchan)
return -ENOMEM;
+ /* set backpointer */
+ lchan->ts = ts;
+
/* Set channel type */
lchan->type = type;
diff --git a/src/host/trxcon/sched_trx.h b/src/host/trxcon/sched_trx.h
index f2089e88..8718ed69 100644
--- a/src/host/trxcon/sched_trx.h
+++ b/src/host/trxcon/sched_trx.h
@@ -237,6 +237,9 @@ struct trx_lchan_state {
uint8_t key_len;
uint8_t algo;
} a5;
+
+ /* TS that this lchan belongs to */
+ struct trx_ts *ts;
};
struct trx_ts {
@@ -251,6 +254,8 @@ struct trx_ts {
struct llist_head lchans;
/*! \brief Queue primitives for TX */
struct llist_head tx_prims;
+ /* backpointer to its TRX */
+ struct trx_instance *trx;
};
/* Represents one TX primitive in the queue of trx_ts */