From patchwork Wed Feb 3 18:24:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harald Welte X-Patchwork-Id: 578277 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by ozlabs.org (Postfix) with ESMTP id E5FE81402EC for ; Thu, 4 Feb 2016 05:24:40 +1100 (AEDT) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by lists.osmocom.org (Postfix) with ESMTP id 8C0C414101; Wed, 3 Feb 2016 18:24:39 +0000 (UTC) X-Original-To: openbsc@lists.osmocom.org Delivered-To: openbsc@lists.osmocom.org Received: from ganesha.gnumonks.org (ganesha.gnumonks.org [213.95.27.120]) by lists.osmocom.org (Postfix) with ESMTP id F133A140D2 for ; Wed, 3 Feb 2016 18:24:37 +0000 (UTC) Received: from uucp by ganesha.gnumonks.org with local-bsmtp (Exim 4.72) (envelope-from ) id 1aR26W-0004Ar-RS; Wed, 03 Feb 2016 19:24:36 +0100 Received: from laforge by localhost.localdomain with local (Exim 4.86) (envelope-from ) id 1aR268-0003Ow-3j; Wed, 03 Feb 2016 19:24:12 +0100 From: laforge@gnumonks.org To: openbsc@lists.osmocom.org Subject: [PATCH 3/7] TRX: call trx_loop_sacch_clock from TRX scheduler backend Date: Wed, 3 Feb 2016 19:24:02 +0100 Message-Id: <1454523846-13022-3-git-send-email-laforge@gnumonks.org> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1454523846-13022-1-git-send-email-laforge@gnumonks.org> References: <1454523846-13022-1-git-send-email-laforge@gnumonks.org> X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Development of the OpenBSC GSM base station controller List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openbsc-bounces@lists.osmocom.org Sender: "OpenBSC" From: Harald Welte this removes the dependency of scheduler.c on loops.h --- src/osmo-bts-trx/scheduler.c | 6 ------ src/osmo-bts-trx/scheduler_trx.c | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/osmo-bts-trx/scheduler.c b/src/osmo-bts-trx/scheduler.c index c904e62..33f4f7f 100644 --- a/src/osmo-bts-trx/scheduler.c +++ b/src/osmo-bts-trx/scheduler.c @@ -40,7 +40,6 @@ #include "scheduler.h" #include "scheduler_backend.h" #include "trx_if.h" -#include "loops.h" extern void *tall_bts_ctx; @@ -404,7 +403,6 @@ static int rts_data_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, uint8_t chan_nr, link_id; struct msgb *msg; struct osmo_phsap_prim *l1sap; - struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn); /* get data for RTS indication */ chan_nr = trx_chan_desc[chan].chan_nr | tn; @@ -420,10 +418,6 @@ static int rts_data_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, "link_id=0x%02x fn=%u ts=%u trx=%u\n", trx_chan_desc[chan].name, chan_nr, link_id, fn, tn, l1t->trx->nr); - /* send clock information to loops process */ - if (L1SAP_IS_LINK_SACCH(link_id)) - trx_loop_sacch_clock(l1t, chan_nr, &l1ts->chan_state[chan]); - /* generate prim */ msg = l1sap_msgb_alloc(200); if (!msg) diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index ec53fbf..a77f5a5 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -127,6 +127,8 @@ ubit_t *tx_data_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, { struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn); struct gsm_bts_trx_ts *ts = &l1t->trx->ts[tn]; + uint8_t link_id = trx_chan_desc[chan].link_id; + uint8_t chan_nr = trx_chan_desc[chan].chan_nr | tn; struct msgb *msg = NULL; /* make GCC happy */ ubit_t *burst, **bursts_p = &l1ts->chan_state[chan].dl_bursts; static ubit_t bits[148]; @@ -138,6 +140,10 @@ ubit_t *tx_data_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, goto send_burst; } + /* send clock information to loops process */ + if (L1SAP_IS_LINK_SACCH(link_id)) + trx_loop_sacch_clock(l1t, chan_nr, &l1ts->chan_state[chan]); + /* get mac block from queue */ msg = _sched_dequeue_prim(l1t, tn, fn, chan); if (msg)