summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-11-17 18:10:10 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2017-02-24 15:18:21 +0100
commitaf12ca5431c4810d1ce4f0dc6fa995c9d5398ed0 (patch)
treec28d7582b75be807e27f7cfb42a49c22b77ec73e
parentf34e669a797bdead46cb0f228bb1a5943a314ab7 (diff)
pcu_sock: Don't re-implement core functionality like gsm_bts_trx_num()
-rw-r--r--openbsc/src/libbsc/pcu_sock.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/openbsc/src/libbsc/pcu_sock.c b/openbsc/src/libbsc/pcu_sock.c
index b62010f..da3505b 100644
--- a/openbsc/src/libbsc/pcu_sock.c
+++ b/openbsc/src/libbsc/pcu_sock.c
@@ -58,18 +58,6 @@ static const char *sapi_string[] = {
[PCU_IF_SAPI_PTCCH] = "PTCCH",
};
-static struct gsm_bts_trx *trx_by_nr(struct gsm_bts *bts, uint8_t trx_nr)
-{
- struct gsm_bts_trx *trx;
-
- llist_for_each_entry(trx, &bts->trx_list, list) {
- if (trx->nr == trx_nr)
- return trx;
- }
-
- return NULL;
-}
-
/* Check if BTS has a PCU connection */
static bool pcu_connected(struct gsm_bts *bts)
{
@@ -232,7 +220,7 @@ static int pcu_tx_info_ind(struct gsm_bts *bts)
}
for (i = 0; i < 8; i++) {
- trx = trx_by_nr(bts, i);
+ trx = gsm_bts_trx_num(bts, i);
if (!trx)
break;
info_ind->trx[i].pdch_mask = 0;
@@ -427,7 +415,7 @@ static void pcu_sock_close(struct pcu_sock_state *state)
/* release PDCH */
for (i = 0; i < 8; i++) {
- trx = trx_by_nr(bts, i);
+ trx = gsm_bts_trx_num(bts, i);
if (!trx)
break;
for (j = 0; j < 8; j++) {