This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16475 )
Change subject: trxcon: Use current MS Power on dummy meas reports
......................................................................
trxcon: Use current MS Power on dummy meas reports
backpointers are added in order to access the TRX, as advised in the
existing comment.
Change-Id: I975cfc5f5d63eb32a7f8932a7f6a544c9a12233c
---
M src/host/trxcon/sched_prim.c
M src/host/trxcon/sched_trx.c
M src/host/trxcon/sched_trx.h
3 files changed, 13 insertions(+), 9 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
diff --git a/src/host/trxcon/sched_prim.c b/src/host/trxcon/sched_prim.c
index 50dfd6e..fc0f05d 100644
--- a/src/host/trxcon/sched_prim.c
+++ b/src/host/trxcon/sched_prim.c
@@ -171,25 +171,18 @@
/* 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)
*
- * FIXME: this would require having access to the trx_instance,
- * what can be achieved either by chain-passing the pointer
- * through sched_prim_dequeue(), or by adding some
- * back-pointers to the logical channel state.
- *
* TODO: filling of the actual values into cached Measurement
* Reports would break the distance spoofing feature. If it
* were known whether the spoofing is enabled or not, we could
* 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 eb6f3dc..6bb662d 100644
--- a/src/host/trxcon/sched_trx.c
+++ b/src/host/trxcon/sched_trx.c
@@ -202,6 +202,9 @@
/* 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 @@
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 f2089e8..8718ed6 100644
--- a/src/host/trxcon/sched_trx.h
+++ b/src/host/trxcon/sched_trx.h
@@ -237,6 +237,9 @@
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 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 */
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16475
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I975cfc5f5d63eb32a7f8932a7f6a544c9a12233c
Gerrit-Change-Number: 16475
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191209/32af6b8f/attachment.htm>