diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-07-19 16:03:24 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-07-20 16:41:15 +0200 |
commit | e04e4d423d5ee6d71f3d50c877755dfcc8905fc4 (patch) | |
tree | c8d7e304fb705a8ddd0281872f2167877056e54c /src/common/scheduler.c | |
parent | 319b1d5bd7b83a6e4246776a8e9eb0b83b3f4f54 (diff) |
sched: Log RX->RTP packet like we do in add_l1sap_header
Other backends use already msgb in lower layers and eventually call
add_l1sap_header to push TCH data up the stack.
backends using common/scheduler.c (bts-trx, bts-virt) are the only ones
not yet using msgb in lower layer but only creating the msgb
immediatelly before sending it in _sched_compose_tch_ind. Let's add a
log message there too to have similar output in all BTS backends.
Change-Id: Ia90b051f308abcd8b88b84e861da593844b0d81a
Diffstat (limited to 'src/common/scheduler.c')
-rw-r--r-- | src/common/scheduler.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/common/scheduler.c b/src/common/scheduler.c index 8c9d30d6..69186fe0 100644 --- a/src/common/scheduler.c +++ b/src/common/scheduler.c @@ -380,14 +380,17 @@ int _sched_compose_tch_ind(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, { struct msgb *msg; struct osmo_phsap_prim *l1sap; + struct gsm_bts_trx *trx = l1t->trx; struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn); + uint8_t chan_nr = trx_chan_desc[chan].chan_nr | tn; + struct gsm_lchan *lchan = &trx->ts[L1SAP_CHAN2TS(chan_nr)].lchan[l1sap_chan2ss(chan_nr)]; /* compose primitive */ msg = l1sap_msgb_alloc(tch_len); l1sap = msgb_l1sap_prim(msg); osmo_prim_init(&l1sap->oph, SAP_GSM_PH, PRIM_TCH, PRIM_OP_INDICATION, msg); - l1sap->u.tch.chan_nr = trx_chan_desc[chan].chan_nr | tn; + l1sap->u.tch.chan_nr = chan_nr; l1sap->u.tch.fn = fn; msg->l2h = msgb_put(msg, tch_len); if (tch_len) @@ -396,6 +399,9 @@ int _sched_compose_tch_ind(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, if (l1ts->chan_state[chan].lost) l1ts->chan_state[chan].lost--; + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, -1, l1sap->u.data.fn, + "%s Rx -> RTP: %s\n", + gsm_lchan_name(lchan), osmo_hexdump(msgb_l2(msg), msgb_l2len(msg))); /* forward primitive */ l1sap_up(l1t->trx, l1sap); |