aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcu_l1_if.cpp
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-02-01 15:51:44 +0100
committerMax <msuraev@sysmocom.de>2016-02-01 15:51:44 +0100
commit9ec544229953132789f125e4f1111d98f82cf2a5 (patch)
treefee88ec44a85736a8525532d9aa51d89bdf82985 /src/pcu_l1_if.cpp
parent4d25f2737bf773205908282f92af93eccdfc75b8 (diff)
Change internal API for consistencymax/mutrx
Use uint8_t for TRX numbering everywhere (we don't expect hardware with more than 256 transceivers in the near future). This change helps to avoid unnecessary casts and make API much clearer.
Diffstat (limited to 'src/pcu_l1_if.cpp')
-rw-r--r--src/pcu_l1_if.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 06cf2340..b938acf2 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -42,7 +42,7 @@ extern "C" {
// FIXME: move this, when changed from c++ to c.
extern "C" {
-void *l1if_open_pdch(void *priv, uint32_t hlayer1);
+void *l1if_open_pdch(uint8_t trx, uint32_t hlayer1);
int l1if_connect_pdch(void *obj, uint8_t ts);
int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn,
uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len);
@@ -315,9 +315,8 @@ static int pcu_rx_info_ind(struct gsm_pcu_if_info_ind *info_ind)
struct gprs_bssgp_pcu *pcu;
struct gprs_rlcmac_pdch *pdch;
struct in_addr ia;
- int rc = 0;
- int trx, ts;
- int i;
+ int rc = 0, ts, i;
+ uint8_t trx;
if (info_ind->version != PCU_IF_VERSION) {
fprintf(stderr, "PCU interface version number of BTS (%d) is "
@@ -435,7 +434,7 @@ bssgp_failed:
info_ind->trx[trx].hlayer1);
if (!bts->trx[trx].fl1h)
bts->trx[trx].fl1h = l1if_open_pdch(
- (void *)trx,
+ trx,
info_ind->trx[trx].hlayer1);
if (!bts->trx[trx].fl1h) {
LOGP(DL1IF, LOGL_FATAL, "Failed to open direct "