fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/28745 )

Change subject: trxcon: pass fn_advance param via struct l1sched_cfg
......................................................................

trxcon: pass fn_advance param via struct l1sched_cfg

Change-Id: I733761e46ffe03473f03f76f7612a548c9723d99
Related: OS#5599, OS#3761
---
M src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h
M src/host/trxcon/src/sched_trx.c
M src/host/trxcon/src/trxcon.c
3 files changed, 7 insertions(+), 6 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve



diff --git a/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h 
b/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h
index f5c45e2..d2cc2eb 100644
--- a/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h
+++ b/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h
@@ -350,6 +350,8 @@
 struct l1sched_cfg {
        /*! Logging context (used as prefix for messages) */
        const char *log_prefix;
+       /*! TDMA frame-number advance */
+       uint32_t fn_advance;
 };

 /*! One scheduler instance */
@@ -384,8 +386,7 @@

 /* Scheduler management functions */
 void l1sched_logging_init(int log_cat_common, int log_cat_data);
-struct l1sched_state *l1sched_alloc(void *ctx, const struct l1sched_cfg *cfg,
-                                   uint32_t fn_advance, void *priv);
+struct l1sched_state *l1sched_alloc(void *ctx, const struct l1sched_cfg *cfg, 
void *priv);
 void l1sched_reset(struct l1sched_state *sched, bool reset_clock);
 void l1sched_free(struct l1sched_state *sched);

diff --git a/src/host/trxcon/src/sched_trx.c b/src/host/trxcon/src/sched_trx.c
index d44c1ba..556fe6a 100644
--- a/src/host/trxcon/src/sched_trx.c
+++ b/src/host/trxcon/src/sched_trx.c
@@ -160,8 +160,7 @@
        l1sched_log_cat_data = log_cat_data;
 }

-struct l1sched_state *l1sched_alloc(void *ctx, const struct l1sched_cfg *cfg,
-                                   uint32_t fn_advance, void *priv)
+struct l1sched_state *l1sched_alloc(void *ctx, const struct l1sched_cfg *cfg, 
void *priv)
 {
        struct l1sched_state *sched;

@@ -172,7 +171,7 @@
        *sched = (struct l1sched_state) {
                /* .clock_timer is set up in l1sched_clck_correct() */
                .clock_cb = &sched_frame_clck_cb,
-               .fn_counter_advance = fn_advance,
+               .fn_counter_advance = cfg->fn_advance,
                .priv = priv,
        };

diff --git a/src/host/trxcon/src/trxcon.c b/src/host/trxcon/src/trxcon.c
index 86d4c49..5740d93 100644
--- a/src/host/trxcon/src/trxcon.c
+++ b/src/host/trxcon/src/trxcon.c
@@ -348,10 +348,11 @@

        /* Init scheduler */
        const struct l1sched_cfg sched_cfg = {
+               .fn_advance = app_data.trx_fn_advance,
                .log_prefix = trxcon->log_prefix,
        };

-       trxcon->sched = l1sched_alloc(trxcon, &sched_cfg, 
app_data.trx_fn_advance, trxcon);
+       trxcon->sched = l1sched_alloc(trxcon, &sched_cfg, trxcon);
        if (trxcon->sched == NULL) {
                trxcon_inst_free(trxcon);
                return NULL;

--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28745
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I733761e46ffe03473f03f76f7612a548c9723d99
Gerrit-Change-Number: 28745
Gerrit-PatchSet: 7
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to