diff options
Diffstat (limited to 'src/osmo-bts-litecell15/tch.c')
-rw-r--r-- | src/osmo-bts-litecell15/tch.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index 5a76fb94..a7babf4a 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -54,6 +54,10 @@ #include "lc15bts.h" #include "l1_if.h" +extern int add_l1sap_header(struct gsm_lchan *lchan, struct msgb *rmsg, + struct gsm_bts_trx *trx, uint8_t chan_nr, + uint32_t fn); + /* input octet-aligned, output not octet-aligned */ void osmo_nibble_shift_right(uint8_t *out, const uint8_t *in, unsigned int num_nibbles) @@ -500,22 +504,9 @@ int l1if_tch_rx(struct gsm_bts_trx *trx, uint8_t chan_nr, struct msgb *l1p_msg) break; } - if (rmsg) { - struct osmo_phsap_prim *l1sap; - - LOGP(DL1C, LOGL_DEBUG, "%s Rx -> RTP: %s\n", - gsm_lchan_name(lchan), osmo_hexdump(rmsg->data, rmsg->len)); - - /* add l1sap header */ - rmsg->l2h = rmsg->data; - msgb_push(rmsg, sizeof(*l1sap)); - rmsg->l1h = rmsg->data; - l1sap = msgb_l1sap_prim(rmsg); - osmo_prim_init(&l1sap->oph, SAP_GSM_PH, PRIM_TCH, PRIM_OP_INDICATION, rmsg); - l1sap->u.tch.chan_nr = chan_nr; - - return l1sap_up(trx, l1sap); - } + if (rmsg) + return add_l1sap_header(lchan, rmsg, trx, chan_nr, + data_ind->u32Fn); return 0; |