summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-11-17 18:10:10 +0100
committerAlexander Couzens <lynxis@fe80.eu>2017-03-13 10:35:47 +0100
commit3aece3550691911c2d83c1b919ee50f33c34861f (patch)
treec6f026ea02175834fafc1f2ed4958a240c009c08
parent67147b6b986c0f80e95b52da50201d43a8861d6e (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++) {