fixeria has uploaded this change for review.

View Change

trxcon: use 'osmo_trxcon_' prefix for public libtrxcon API

Also take a chance to shorten some symbols with long names:

* struct phyif_burst_req -> osmo_trxcon_phyif_br,
* struct phyif_burst_ind -> osmo_trxcon_phyif_bi,
* phyif_handle_burst_ind() -> osmo_trxcon_phyif_handle_bi(),
* phyif_handle_burst_req() -> osmo_trxcon_phyif_handle_br(),
* trx_if_handle_phyif_burst_req() -> trx_if_handle_phyif_br().

Change-Id: I0c5b8642c9c436e8beab0dc80fb7fd96cda25547
Related: OS#5599
---
M src/host/trxcon/include/osmocom/bb/trxcon/l1ctl.h
M src/host/trxcon/include/osmocom/bb/trxcon/phyif.h
M src/host/trxcon/include/osmocom/bb/trxcon/trx_if.h
M src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h
M src/host/trxcon/src/l1ctl.c
M src/host/trxcon/src/logging.c
M src/host/trxcon/src/trx_if.c
M src/host/trxcon/src/trxcon_fsm.c
M src/host/trxcon/src/trxcon_inst.c
M src/host/trxcon/src/trxcon_main.c
10 files changed, 185 insertions(+), 182 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/02/30102/1
diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl.h b/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl.h
index 949960c..771d703 100644
--- a/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl.h
+++ b/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl.h
@@ -7,16 +7,16 @@
struct trxcon_param_tx_data_cnf;
struct trxcon_param_tx_access_burst_cnf;

-int l1ctl_tx_fbsb_conf(struct trxcon_inst *trxcon, uint16_t band_arfcn, uint8_t bsic);
-int l1ctl_tx_fbsb_fail(struct trxcon_inst *trxcon, uint16_t band_arfcn);
-int l1ctl_tx_ccch_mode_conf(struct trxcon_inst *trxcon, uint8_t mode);
-int l1ctl_tx_pm_conf(struct trxcon_inst *trxcon, uint16_t band_arfcn, int dbm, int last);
-int l1ctl_tx_reset_conf(struct trxcon_inst *trxcon, uint8_t type);
-int l1ctl_tx_reset_ind(struct trxcon_inst *trxcon, uint8_t type);
+int l1ctl_tx_fbsb_conf(struct osmo_trxcon_inst *trxcon, uint16_t band_arfcn, uint8_t bsic);
+int l1ctl_tx_fbsb_fail(struct osmo_trxcon_inst *trxcon, uint16_t band_arfcn);
+int l1ctl_tx_ccch_mode_conf(struct osmo_trxcon_inst *trxcon, uint8_t mode);
+int l1ctl_tx_pm_conf(struct osmo_trxcon_inst *trxcon, uint16_t band_arfcn, int dbm, int last);
+int l1ctl_tx_reset_conf(struct osmo_trxcon_inst *trxcon, uint8_t type);
+int l1ctl_tx_reset_ind(struct osmo_trxcon_inst *trxcon, uint8_t type);

-int l1ctl_tx_dt_ind(struct trxcon_inst *trxcon,
+int l1ctl_tx_dt_ind(struct osmo_trxcon_inst *trxcon,
const struct trxcon_param_rx_data_ind *ind);
-int l1ctl_tx_dt_conf(struct trxcon_inst *trxcon,
+int l1ctl_tx_dt_conf(struct osmo_trxcon_inst *trxcon,
const struct trxcon_param_tx_data_cnf *cnf);
-int l1ctl_tx_rach_conf(struct trxcon_inst *trxcon,
+int l1ctl_tx_rach_conf(struct osmo_trxcon_inst *trxcon,
const struct trxcon_param_tx_access_burst_cnf *cnf);
diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h b/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h
index a92cb89..de6c3fd 100644
--- a/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h
+++ b/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h
@@ -5,72 +5,72 @@
#include <osmocom/core/bits.h>

/* PHYIF command type */
-enum phyif_cmd_type {
- PHYIF_CMDT_RESET,
- PHYIF_CMDT_POWERON,
- PHYIF_CMDT_POWEROFF,
- PHYIF_CMDT_MEASURE,
- PHYIF_CMDT_SETFREQ_H0,
- PHYIF_CMDT_SETFREQ_H1,
- PHYIF_CMDT_SETSLOT,
- PHYIF_CMDT_SETTA,
+enum osmo_trxcon_phyif_cmd_type {
+ OSMO_TRXCON_PHYIF_CMDT_RESET,
+ OSMO_TRXCON_PHYIF_CMDT_POWERON,
+ OSMO_TRXCON_PHYIF_CMDT_POWEROFF,
+ OSMO_TRXCON_PHYIF_CMDT_MEASURE,
+ OSMO_TRXCON_PHYIF_CMDT_SETFREQ_H0,
+ OSMO_TRXCON_PHYIF_CMDT_SETFREQ_H1,
+ OSMO_TRXCON_PHYIF_CMDT_SETSLOT,
+ OSMO_TRXCON_PHYIF_CMDT_SETTA,
};

-/* param of PHYIF_CMDT_SETFREQ_H0 */
-struct phyif_cmdp_setfreq_h0 {
+/* param of OSMO_TRXCON_PHYIF_CMDT_SETFREQ_H0 */
+struct osmo_trxcon_phyif_cmdp_setfreq_h0 {
uint16_t band_arfcn;
};

-/* param of PHYIF_CMDT_SETFREQ_H1 */
-struct phyif_cmdp_setfreq_h1 {
+/* param of OSMO_TRXCON_PHYIF_CMDT_SETFREQ_H1 */
+struct osmo_trxcon_phyif_cmdp_setfreq_h1 {
uint8_t hsn;
uint8_t maio;
const uint16_t *ma;
unsigned int ma_len;
};

-/* param of PHYIF_CMDT_SETSLOT */
-struct phyif_cmdp_setslot {
+/* param of OSMO_TRXCON_PHYIF_CMDT_SETSLOT */
+struct osmo_trxcon_phyif_cmdp_setslot {
uint8_t tn;
uint8_t pchan; /* enum gsm_phys_chan_config */
};

-/* param of PHYIF_CMDT_SETTA */
-struct phyif_cmdp_setta {
+/* param of OSMO_TRXCON_PHYIF_CMDT_SETTA */
+struct osmo_trxcon_phyif_cmdp_setta {
int8_t ta; /* intentionally signed */
};

-/* param of PHYIF_CMDT_MEASURE (command) */
-struct phyif_cmdp_measure {
+/* param of OSMO_TRXCON_PHYIF_CMDT_MEASURE (command) */
+struct osmo_trxcon_phyif_cmdp_measure {
uint16_t band_arfcn;
};

-/* param of PHYIF_CMDT_MEASURE (response) */
-struct phyif_rspp_measure {
+/* param of OSMO_TRXCON_PHYIF_CMDT_MEASURE (response) */
+struct osmo_trxcon_phyif_rspp_measure {
uint16_t band_arfcn;
int dbm;
};

-struct phyif_cmd {
- enum phyif_cmd_type type;
+struct osmo_trxcon_phyif_cmd {
+ enum osmo_trxcon_phyif_cmd_type type;
union {
- struct phyif_cmdp_setfreq_h0 setfreq_h0;
- struct phyif_cmdp_setfreq_h1 setfreq_h1;
- struct phyif_cmdp_setslot setslot;
- struct phyif_cmdp_setta setta;
- struct phyif_cmdp_measure measure;
+ struct osmo_trxcon_phyif_cmdp_setfreq_h0 setfreq_h0;
+ struct osmo_trxcon_phyif_cmdp_setfreq_h1 setfreq_h1;
+ struct osmo_trxcon_phyif_cmdp_setslot setslot;
+ struct osmo_trxcon_phyif_cmdp_setta setta;
+ struct osmo_trxcon_phyif_cmdp_measure measure;
} param;
};

-struct phyif_rsp {
- enum phyif_cmd_type type;
+struct osmo_trxcon_phyif_rsp {
+ enum osmo_trxcon_phyif_cmd_type type;
union {
- struct phyif_rspp_measure measure;
+ struct osmo_trxcon_phyif_rspp_measure measure;
} param;
};

/* BURST.req - a burst to be transmitted */
-struct phyif_burst_req {
+struct osmo_trxcon_phyif_br {
uint32_t fn;
uint8_t tn;
uint8_t pwr;
@@ -79,7 +79,7 @@
};

/* BURST.ind - a received burst */
-struct phyif_burst_ind {
+struct osmo_trxcon_phyif_bi {
uint32_t fn;
uint8_t tn;
int16_t toa256;
@@ -89,8 +89,8 @@
};


-int phyif_handle_burst_ind(void *phyif, const struct phyif_burst_ind *bi);
-int phyif_handle_burst_req(void *phyif, const struct phyif_burst_req *br);
-int phyif_handle_cmd(void *phyif, const struct phyif_cmd *cmd);
-int phyif_handle_rsp(void *phyif, const struct phyif_rsp *rsp);
-void phyif_close(void *phyif);
+int osmo_trxcon_phyif_handle_bi(void *phyif, const struct osmo_trxcon_phyif_bi *bi);
+int osmo_trxcon_phyif_handle_br(void *phyif, const struct osmo_trxcon_phyif_br *br);
+int osmo_trxcon_phyif_handle_cmd(void *phyif, const struct osmo_trxcon_phyif_cmd *cmd);
+int osmo_trxcon_phyif_handle_rsp(void *phyif, const struct osmo_trxcon_phyif_rsp *rsp);
+void osmo_trxcon_phyif_close(void *phyif);
diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/trx_if.h b/src/host/trxcon/include/osmocom/bb/trxcon/trx_if.h
index 92de3b0..f6b7893 100644
--- a/src/host/trxcon/include/osmocom/bb/trxcon/trx_if.h
+++ b/src/host/trxcon/include/osmocom/bb/trxcon/trx_if.h
@@ -55,5 +55,7 @@
struct trx_instance *trx_if_open(const struct trx_if_params *params);
void trx_if_close(struct trx_instance *trx);

-int trx_if_handle_phyif_burst_req(struct trx_instance *trx, const struct phyif_burst_req *br);
-int trx_if_handle_phyif_cmd(struct trx_instance *trx, const struct phyif_cmd *cmd);
+int trx_if_handle_phyif_br(struct trx_instance *trx,
+ const struct osmo_trxcon_phyif_br *br);
+int trx_if_handle_phyif_cmd(struct trx_instance *trx,
+ const struct osmo_trxcon_phyif_cmd *cmd);
diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h b/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h
index 9dae606..b3966bf 100644
--- a/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h
+++ b/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h
@@ -6,7 +6,7 @@
struct l1sched_state;
struct msgb;

-struct trxcon_inst {
+struct osmo_trxcon_inst {
struct osmo_fsm_inst *fi;
unsigned int id;

@@ -31,7 +31,7 @@
} l1p;
};

-struct trxcon_log_cfg {
+struct osmo_trxcon_log_cfg {
int fsm; /* trxcon_fsm */
int l1c; /* L1CTL control */
int l1d; /* L1CTL data */
@@ -39,11 +39,11 @@
int schd; /* l1sched data */
};

-void trxcon_set_log_cfg(const struct trxcon_log_cfg *cfg);
+void osmo_trxcon_set_log_cfg(const struct osmo_trxcon_log_cfg *cfg);

-struct trxcon_inst *trxcon_inst_alloc(void *ctx, unsigned int id, uint32_t fn_advance);
-void trxcon_inst_free(struct trxcon_inst *trxcon);
+struct osmo_trxcon_inst *osmo_trxcon_inst_alloc(void *ctx, unsigned int id, uint32_t fn_advance);
+void osmo_trxcon_inst_free(struct osmo_trxcon_inst *trxcon);

-int trxcon_l1ctl_receive(struct trxcon_inst *trxcon, struct msgb *msg);
-int trxcon_l1ctl_send(struct trxcon_inst *trxcon, struct msgb *msg);
-void trxcon_l1ctl_close(struct trxcon_inst *trxcon);
+int osmo_trxcon_l1ctl_receive(struct osmo_trxcon_inst *trxcon, struct msgb *msg);
+int osmo_trxcon_l1ctl_send(struct osmo_trxcon_inst *trxcon, struct msgb *msg);
+void osmo_trxcon_l1ctl_close(struct osmo_trxcon_inst *trxcon);
diff --git a/src/host/trxcon/src/l1ctl.c b/src/host/trxcon/src/l1ctl.c
index 47998d6..6462ce2 100644
--- a/src/host/trxcon/src/l1ctl.c
+++ b/src/host/trxcon/src/l1ctl.c
@@ -46,7 +46,7 @@
#define L1CTL_LENGTH 256
#define L1CTL_HEADROOM 32

-/* Logging categories configurable via trxcon_set_log_cfg() */
+/* Logging categories configurable via osmo_trxcon_set_log_cfg() */
int g_logc_l1c = DLGLOBAL;
int g_logc_l1d = DLGLOBAL;

@@ -83,7 +83,7 @@
return msg;
}

-int l1ctl_tx_pm_conf(struct trxcon_inst *trxcon, uint16_t band_arfcn, int dbm, int last)
+int l1ctl_tx_pm_conf(struct osmo_trxcon_inst *trxcon, uint16_t band_arfcn, int dbm, int last)
{
struct osmo_fsm_inst *fi = trxcon->fi;
struct l1ctl_pm_conf *pmc;
@@ -108,10 +108,10 @@
l1h->flags |= L1CTL_F_DONE;
}

- return trxcon_l1ctl_send(trxcon, msg);
+ return osmo_trxcon_l1ctl_send(trxcon, msg);
}

-int l1ctl_tx_reset_ind(struct trxcon_inst *trxcon, uint8_t type)
+int l1ctl_tx_reset_ind(struct osmo_trxcon_inst *trxcon, uint8_t type)
{
struct osmo_fsm_inst *fi = trxcon->fi;
struct msgb *msg;
@@ -126,10 +126,10 @@
res = (struct l1ctl_reset *) msgb_put(msg, sizeof(*res));
res->type = type;

- return trxcon_l1ctl_send(trxcon, msg);
+ return osmo_trxcon_l1ctl_send(trxcon, msg);
}

-int l1ctl_tx_reset_conf(struct trxcon_inst *trxcon, uint8_t type)
+int l1ctl_tx_reset_conf(struct osmo_trxcon_inst *trxcon, uint8_t type)
{
struct osmo_fsm_inst *fi = trxcon->fi;
struct msgb *msg;
@@ -143,7 +143,7 @@
res = (struct l1ctl_reset *) msgb_put(msg, sizeof(*res));
res->type = type;

- return trxcon_l1ctl_send(trxcon, msg);
+ return osmo_trxcon_l1ctl_send(trxcon, msg);
}

static struct l1ctl_info_dl *put_dl_info_hdr(struct msgb *msg,
@@ -171,7 +171,7 @@
return conf;
}

-int l1ctl_tx_fbsb_fail(struct trxcon_inst *trxcon, uint16_t band_arfcn)
+int l1ctl_tx_fbsb_fail(struct osmo_trxcon_inst *trxcon, uint16_t band_arfcn)
{
struct osmo_fsm_inst *fi = trxcon->fi;
struct l1ctl_info_dl *dl;
@@ -190,10 +190,10 @@

LOGPFSMSL(fi, g_logc_l1c, LOGL_DEBUG, "Send FBSB Conf (timeout)\n");

- return trxcon_l1ctl_send(trxcon, msg);
+ return osmo_trxcon_l1ctl_send(trxcon, msg);
}

-int l1ctl_tx_fbsb_conf(struct trxcon_inst *trxcon, uint16_t band_arfcn, uint8_t bsic)
+int l1ctl_tx_fbsb_conf(struct osmo_trxcon_inst *trxcon, uint16_t band_arfcn, uint8_t bsic)
{
struct osmo_fsm_inst *fi = trxcon->fi;
struct l1ctl_fbsb_conf *conf;
@@ -218,10 +218,10 @@
"Send FBSB Conf (result=%u, bsic=%u)\n",
conf->result, conf->bsic);

- return trxcon_l1ctl_send(trxcon, msg);
+ return osmo_trxcon_l1ctl_send(trxcon, msg);
}

-int l1ctl_tx_ccch_mode_conf(struct trxcon_inst *trxcon, uint8_t mode)
+int l1ctl_tx_ccch_mode_conf(struct osmo_trxcon_inst *trxcon, uint8_t mode)
{
struct l1ctl_ccch_mode_conf *conf;
struct msgb *msg;
@@ -233,13 +233,13 @@
conf = (struct l1ctl_ccch_mode_conf *) msgb_put(msg, sizeof(*conf));
conf->ccch_mode = mode;

- return trxcon_l1ctl_send(trxcon, msg);
+ return osmo_trxcon_l1ctl_send(trxcon, msg);
}

/**
* Handles both L1CTL_DATA_IND and L1CTL_TRAFFIC_IND.
*/
-int l1ctl_tx_dt_ind(struct trxcon_inst *trxcon,
+int l1ctl_tx_dt_ind(struct osmo_trxcon_inst *trxcon,
const struct trxcon_param_rx_data_ind *ind)
{
struct msgb *msg;
@@ -266,10 +266,10 @@
memcpy(msgb_put(msg, ind->data_len), ind->data, ind->data_len);

/* Put message to upper layers */
- return trxcon_l1ctl_send(trxcon, msg);
+ return osmo_trxcon_l1ctl_send(trxcon, msg);
}

-int l1ctl_tx_rach_conf(struct trxcon_inst *trxcon,
+int l1ctl_tx_rach_conf(struct osmo_trxcon_inst *trxcon,
const struct trxcon_param_tx_access_burst_cnf *cnf)
{
struct msgb *msg;
@@ -285,14 +285,14 @@

put_dl_info_hdr(msg, &dl_hdr);

- return trxcon_l1ctl_send(trxcon, msg);
+ return osmo_trxcon_l1ctl_send(trxcon, msg);
}


/**
* Handles both L1CTL_DATA_CONF and L1CTL_TRAFFIC_CONF.
*/
-int l1ctl_tx_dt_conf(struct trxcon_inst *trxcon,
+int l1ctl_tx_dt_conf(struct osmo_trxcon_inst *trxcon,
struct trxcon_param_tx_data_cnf *cnf)
{
struct msgb *msg;
@@ -311,7 +311,7 @@
/* Copy DL frame header from source message */
put_dl_info_hdr(msg, &dl_hdr);

- return trxcon_l1ctl_send(trxcon, msg);
+ return osmo_trxcon_l1ctl_send(trxcon, msg);
}

static enum gsm_phys_chan_config l1ctl_ccch_mode2pchan_config(enum ccch_mode mode)
@@ -334,7 +334,7 @@
}
}

-static int l1ctl_rx_fbsb_req(struct trxcon_inst *trxcon, struct msgb *msg)
+static int l1ctl_rx_fbsb_req(struct osmo_trxcon_inst *trxcon, struct msgb *msg)
{
struct osmo_fsm_inst *fi = trxcon->fi;
struct l1ctl_fbsb_req *fbsb;
@@ -368,7 +368,7 @@
return rc;
}

-static int l1ctl_rx_pm_req(struct trxcon_inst *trxcon, struct msgb *msg)
+static int l1ctl_rx_pm_req(struct osmo_trxcon_inst *trxcon, struct msgb *msg)
{
struct osmo_fsm_inst *fi = trxcon->fi;
struct l1ctl_pm_req *pmr;
@@ -401,7 +401,7 @@
return rc;
}

-static int l1ctl_rx_reset_req(struct trxcon_inst *trxcon, struct msgb *msg)
+static int l1ctl_rx_reset_req(struct osmo_trxcon_inst *trxcon, struct msgb *msg)
{
struct osmo_fsm_inst *fi = trxcon->fi;
struct l1ctl_reset *res;
@@ -440,7 +440,7 @@
return rc;
}

-static int l1ctl_rx_echo_req(struct trxcon_inst *trxcon, struct msgb *msg)
+static int l1ctl_rx_echo_req(struct osmo_trxcon_inst *trxcon, struct msgb *msg)
{
struct osmo_fsm_inst *fi = trxcon->fi;
struct l1ctl_hdr *l1h;
@@ -453,10 +453,10 @@
l1h->msg_type = L1CTL_ECHO_CONF;
msg->data = msg->l1h;

- return trxcon_l1ctl_send(trxcon, msg);
+ return osmo_trxcon_l1ctl_send(trxcon, msg);
}

-static int l1ctl_rx_ccch_mode_req(struct trxcon_inst *trxcon, struct msgb *msg)
+static int l1ctl_rx_ccch_mode_req(struct osmo_trxcon_inst *trxcon, struct msgb *msg)
{
struct osmo_fsm_inst *fi = trxcon->fi;
struct l1ctl_ccch_mode_req *mode_req;
@@ -488,7 +488,7 @@
return rc;
}

-static int l1ctl_rx_rach_req(struct trxcon_inst *trxcon, struct msgb *msg, bool is_11bit)
+static int l1ctl_rx_rach_req(struct osmo_trxcon_inst *trxcon, struct msgb *msg, bool is_11bit)
{
struct trxcon_param_tx_access_burst_req req;
struct osmo_fsm_inst *fi = trxcon->fi;
@@ -587,7 +587,7 @@
return 0;
}

-static int l1ctl_rx_dm_est_req(struct trxcon_inst *trxcon, struct msgb *msg)
+static int l1ctl_rx_dm_est_req(struct osmo_trxcon_inst *trxcon, struct msgb *msg)
{
struct osmo_fsm_inst *fi = trxcon->fi;
struct l1ctl_dm_est_req *est_req;
@@ -624,7 +624,7 @@
return rc;
}

-static int l1ctl_rx_dm_rel_req(struct trxcon_inst *trxcon, struct msgb *msg)
+static int l1ctl_rx_dm_rel_req(struct osmo_trxcon_inst *trxcon, struct msgb *msg)
{
struct osmo_fsm_inst *fi = trxcon->fi;

@@ -639,7 +639,7 @@
/**
* Handles both L1CTL_DATA_REQ and L1CTL_TRAFFIC_REQ.
*/
-static int l1ctl_rx_dt_req(struct trxcon_inst *trxcon, struct msgb *msg, bool traffic)
+static int l1ctl_rx_dt_req(struct osmo_trxcon_inst *trxcon, struct msgb *msg, bool traffic)
{
struct osmo_fsm_inst *fi = trxcon->fi;
struct l1ctl_info_ul *ul;
@@ -674,7 +674,7 @@
return 0;
}

-static int l1ctl_rx_param_req(struct trxcon_inst *trxcon, struct msgb *msg)
+static int l1ctl_rx_param_req(struct osmo_trxcon_inst *trxcon, struct msgb *msg)
{
struct osmo_fsm_inst *fi = trxcon->fi;
struct l1ctl_par_req *par_req;
@@ -701,7 +701,7 @@
return 0;
}

-static int l1ctl_rx_tch_mode_req(struct trxcon_inst *trxcon, struct msgb *msg)
+static int l1ctl_rx_tch_mode_req(struct osmo_trxcon_inst *trxcon, struct msgb *msg)
{
struct osmo_fsm_inst *fi = trxcon->fi;
struct l1ctl_tch_mode_req *mode_req;
@@ -733,10 +733,10 @@
struct l1ctl_hdr *l1h = (struct l1ctl_hdr *) msg->data;
l1h->msg_type = L1CTL_TCH_MODE_CONF;

- return trxcon_l1ctl_send(trxcon, msg);
+ return osmo_trxcon_l1ctl_send(trxcon, msg);
}

-static int l1ctl_rx_crypto_req(struct trxcon_inst *trxcon, struct msgb *msg)
+static int l1ctl_rx_crypto_req(struct osmo_trxcon_inst *trxcon, struct msgb *msg)
{
struct osmo_fsm_inst *fi = trxcon->fi;
struct l1ctl_crypto_req *cr;
@@ -762,7 +762,7 @@
return 0;
}

-int trxcon_l1ctl_receive(struct trxcon_inst *trxcon, struct msgb *msg)
+int osmo_trxcon_l1ctl_receive(struct osmo_trxcon_inst *trxcon, struct msgb *msg)
{
struct l1ctl_hdr *l1h;

diff --git a/src/host/trxcon/src/logging.c b/src/host/trxcon/src/logging.c
index f5fdacc..34fb06d 100644
--- a/src/host/trxcon/src/logging.c
+++ b/src/host/trxcon/src/logging.c
@@ -81,7 +81,7 @@
if (category_mask)
log_parse_category_mask(osmo_stderr_target, category_mask);

- const struct trxcon_log_cfg cfg = {
+ const struct osmo_trxcon_log_cfg cfg = {
.fsm = DAPP,
.l1c = DL1C,
.l1d = DL1D,
@@ -89,7 +89,7 @@
.schd = DSCHD,
};

- trxcon_set_log_cfg(&cfg);
+ osmo_trxcon_set_log_cfg(&cfg);

return 0;
}
diff --git a/src/host/trxcon/src/trx_if.c b/src/host/trxcon/src/trx_if.c
index 77001ac..cc0599f 100644
--- a/src/host/trxcon/src/trx_if.c
+++ b/src/host/trxcon/src/trx_if.c
@@ -275,7 +275,7 @@
*/

static int trx_if_cmd_setslot(struct trx_instance *trx,
- const struct phyif_cmdp_setslot *cmdp)
+ const struct osmo_trxcon_phyif_cmdp_setslot *cmdp)
{
/* Values correspond to 'enum ChannelCombination' in osmo-trx.git */
static const uint8_t chan_types[_GSM_PCHAN_MAX] = {
@@ -308,7 +308,7 @@
*/

static int trx_if_cmd_rxtune(struct trx_instance *trx,
- const struct phyif_cmdp_setfreq_h0 *cmdp)
+ const struct osmo_trxcon_phyif_cmdp_setfreq_h0 *cmdp)
{
uint16_t freq10;

@@ -323,7 +323,7 @@
}

static int trx_if_cmd_txtune(struct trx_instance *trx,
- const struct phyif_cmdp_setfreq_h0 *cmdp)
+ const struct osmo_trxcon_phyif_cmdp_setfreq_h0 *cmdp)
{
uint16_t freq10;

@@ -350,7 +350,7 @@
*/

static int trx_if_cmd_measure(struct trx_instance *trx,
- const struct phyif_cmdp_measure *cmdp)
+ const struct osmo_trxcon_phyif_cmdp_measure *cmdp)
{
uint16_t freq10;

@@ -382,15 +382,15 @@
return;
}

- const struct phyif_rsp rsp = {
- .type = PHYIF_CMDT_MEASURE,
+ const struct osmo_trxcon_phyif_rsp rsp = {
+ .type = OSMO_TRXCON_PHYIF_CMDT_MEASURE,
.param.measure = {
.band_arfcn = band_arfcn,
.dbm = dbm,
},
};

- phyif_handle_rsp(trx, &rsp);
+ osmo_trxcon_phyif_handle_rsp(trx, &rsp);
}

/*
@@ -407,7 +407,7 @@
*/

static int trx_if_cmd_setta(struct trx_instance *trx,
- const struct phyif_cmdp_setta *cmdp)
+ const struct osmo_trxcon_phyif_cmdp_setta *cmdp)
{
return trx_ctrl_cmd(trx, 0, "SETTA", "%d", cmdp->ta);
}
@@ -426,7 +426,7 @@
*/

static int trx_if_cmd_setfh(struct trx_instance *trx,
- const struct phyif_cmdp_setfreq_h1 *cmdp)
+ const struct osmo_trxcon_phyif_cmdp_setfreq_h1 *cmdp)
{
/* Reserve some room for CMD SETFH <HSN> <MAIO> */
char ma_buf[TRXC_BUF_SIZE - 24];
@@ -560,38 +560,39 @@
return -EIO;
}

-int trx_if_handle_phyif_cmd(struct trx_instance *trx, const struct phyif_cmd *cmd)
+int trx_if_handle_phyif_cmd(struct trx_instance *trx,
+ const struct osmo_trxcon_phyif_cmd *cmd)
{
int rc;

switch (cmd->type) {
- case PHYIF_CMDT_RESET:
+ case OSMO_TRXCON_PHYIF_CMDT_RESET:
if ((rc = trx_if_cmd_poweroff(trx)) != 0)
return rc;
rc = trx_if_cmd_echo(trx);
break;
- case PHYIF_CMDT_POWERON:
+ case OSMO_TRXCON_PHYIF_CMDT_POWERON:
rc = trx_if_cmd_poweron(trx);
break;
- case PHYIF_CMDT_POWEROFF:
+ case OSMO_TRXCON_PHYIF_CMDT_POWEROFF:
rc = trx_if_cmd_poweroff(trx);
break;
- case PHYIF_CMDT_MEASURE:
+ case OSMO_TRXCON_PHYIF_CMDT_MEASURE:
rc = trx_if_cmd_measure(trx, &cmd->param.measure);
break;
- case PHYIF_CMDT_SETFREQ_H0:
+ case OSMO_TRXCON_PHYIF_CMDT_SETFREQ_H0:
if ((rc = trx_if_cmd_rxtune(trx, &cmd->param.setfreq_h0)) != 0)
return rc;
if ((rc = trx_if_cmd_txtune(trx, &cmd->param.setfreq_h0)) != 0)
return rc;
break;
- case PHYIF_CMDT_SETFREQ_H1:
+ case OSMO_TRXCON_PHYIF_CMDT_SETFREQ_H1:
rc = trx_if_cmd_setfh(trx, &cmd->param.setfreq_h1);
break;
- case PHYIF_CMDT_SETSLOT:
+ case OSMO_TRXCON_PHYIF_CMDT_SETSLOT:
rc = trx_if_cmd_setslot(trx, &cmd->param.setslot);
break;
- case PHYIF_CMDT_SETTA:
+ case OSMO_TRXCON_PHYIF_CMDT_SETTA:
rc = trx_if_cmd_setta(trx, &cmd->param.setta);
break;
default:
@@ -628,7 +629,7 @@
static int trx_data_rx_cb(struct osmo_fd *ofd, unsigned int what)
{
struct trx_instance *trx = ofd->data;
- struct phyif_burst_ind bi;
+ struct osmo_trxcon_phyif_bi bi;
uint8_t buf[TRXD_BUF_SIZE];
ssize_t read_len;

@@ -644,7 +645,7 @@
return -EINVAL;
}

- bi = (struct phyif_burst_ind) {
+ bi = (struct osmo_trxcon_phyif_bi) {
.tn = buf[0],
.fn = osmo_load32be(buf + 1),
.rssi = -(int8_t) buf[5],
@@ -675,11 +676,11 @@
"RX burst tn=%u fn=%u rssi=%d toa=%d\n",
bi.tn, bi.fn, bi.rssi, bi.toa256);

- return phyif_handle_burst_ind(trx, &bi);
+ return osmo_trxcon_phyif_handle_bi(trx, &bi);
}

-int trx_if_handle_phyif_burst_req(struct trx_instance *trx,
- const struct phyif_burst_req *br)
+int trx_if_handle_phyif_br(struct trx_instance *trx,
+ const struct osmo_trxcon_phyif_br *br)
{
uint8_t buf[TRXD_BUF_SIZE];
size_t length;
diff --git a/src/host/trxcon/src/trxcon_fsm.c b/src/host/trxcon/src/trxcon_fsm.c
index 9980344..d5ba826 100644
--- a/src/host/trxcon/src/trxcon_fsm.c
+++ b/src/host/trxcon/src/trxcon_fsm.c
@@ -40,8 +40,8 @@
static void trxcon_allstate_action(struct osmo_fsm_inst *fi,
uint32_t event, void *data)
{
- struct trxcon_inst *trxcon = fi->priv;
- struct phyif_cmd phycmd = { };
+ struct osmo_trxcon_inst *trxcon = fi->priv;
+ struct osmo_trxcon_phyif_cmd phycmd = { };

switch (event) {
case TRXCON_EV_PHYIF_FAILURE:
@@ -58,8 +58,8 @@
osmo_fsm_inst_state_chg(fi, TRXCON_ST_RESET, 0, 0);
l1sched_reset(trxcon->sched, true);

- phycmd.type = PHYIF_CMDT_RESET;
- phyif_handle_cmd(trxcon->phyif, &phycmd);
+ phycmd.type = OSMO_TRXCON_PHYIF_CMDT_RESET;
+ osmo_trxcon_phyif_handle_cmd(trxcon->phyif, &phycmd);
break;
case TRXCON_EV_RESET_SCHED_REQ:
l1sched_reset(trxcon->sched, false);
@@ -70,16 +70,16 @@

switch (req->type) {
case TRXCON_PHY_CFGT_PCHAN_COMB:
- phycmd.type = PHYIF_CMDT_SETSLOT;
+ phycmd.type = OSMO_TRXCON_PHYIF_CMDT_SETSLOT;
phycmd.param.setslot.tn = req->pchan_comb.tn;
phycmd.param.setslot.pchan = req->pchan_comb.pchan;
- phyif_handle_cmd(trxcon->phyif, &phycmd);
+ osmo_trxcon_phyif_handle_cmd(trxcon->phyif, &phycmd);
break;
case TRXCON_PHY_CFGT_TX_PARAMS:
if (trxcon->l1p.ta != req->tx_params.timing_advance) {
- phycmd.type = PHYIF_CMDT_SETTA;
+ phycmd.type = OSMO_TRXCON_PHYIF_CMDT_SETTA;
phycmd.param.setta.ta = req->tx_params.timing_advance;
- phyif_handle_cmd(trxcon->phyif, &phycmd);
+ osmo_trxcon_phyif_handle_cmd(trxcon->phyif, &phycmd);
}
trxcon->l1p.tx_power = req->tx_params.tx_power;
trxcon->l1p.ta = req->tx_params.timing_advance;
@@ -110,7 +110,7 @@

static int trxcon_timer_cb(struct osmo_fsm_inst *fi)
{
- struct trxcon_inst *trxcon = fi->priv;
+ struct osmo_trxcon_inst *trxcon = fi->priv;

switch (fi->state) {
case TRXCON_ST_FBSB_SEARCH:
@@ -125,7 +125,7 @@
static void handle_full_power_scan_req(struct osmo_fsm_inst *fi,
const struct trxcon_param_full_power_scan_req *req)
{
- struct trxcon_inst *trxcon = fi->priv;
+ struct osmo_trxcon_inst *trxcon = fi->priv;
enum gsm_band band_start, band_stop;

if (trxcon->fi_data != NULL) {
@@ -144,14 +144,14 @@
trxcon->fi_data = talloc_memdup(fi, req, sizeof(*req));
OSMO_ASSERT(trxcon->fi_data != NULL);

- /* trxcon_st_full_power_scan_onenter() sends the initial PHYIF_CMDT_MEASURE */
+ /* trxcon_st_full_power_scan_onenter() sends the initial OSMO_TRXCON_PHYIF_CMDT_MEASURE */
osmo_fsm_inst_state_chg(fi, TRXCON_ST_FULL_POWER_SCAN, 0, 0); /* TODO: timeout */
}

static void trxcon_st_reset_action(struct osmo_fsm_inst *fi,
uint32_t event, void *data)
{
- struct trxcon_inst *trxcon = fi->priv;
+ struct osmo_trxcon_inst *trxcon = fi->priv;

switch (event) {
case TRXCON_EV_FBSB_SEARCH_REQ:
@@ -164,8 +164,8 @@

/* Only if current ARFCN differs */
if (trxcon->l1p.band_arfcn != req->band_arfcn) {
- const struct phyif_cmd phycmd = {
- .type = PHYIF_CMDT_SETFREQ_H0,
+ const struct osmo_trxcon_phyif_cmd phycmd = {
+ .type = OSMO_TRXCON_PHYIF_CMDT_SETFREQ_H0,
.param.setfreq_h0 = {
.band_arfcn = req->band_arfcn,
},
@@ -175,11 +175,11 @@
trxcon->l1p.band_arfcn = req->band_arfcn;

/* Tune transceiver to required ARFCN */
- phyif_handle_cmd(trxcon->phyif, &phycmd);
+ osmo_trxcon_phyif_handle_cmd(trxcon->phyif, &phycmd);
}

- const struct phyif_cmd phycmd = { .type = PHYIF_CMDT_POWERON };
- phyif_handle_cmd(trxcon->phyif, &phycmd);
+ const struct osmo_trxcon_phyif_cmd phycmd = { .type = OSMO_TRXCON_PHYIF_CMDT_POWERON };
+ osmo_trxcon_phyif_handle_cmd(trxcon->phyif, &phycmd);
break;
}
case TRXCON_EV_FULL_POWER_SCAN_REQ:
@@ -193,24 +193,24 @@
static void trxcon_st_full_power_scan_onenter(struct osmo_fsm_inst *fi,
uint32_t prev_state)
{
- const struct trxcon_inst *trxcon = fi->priv;
+ const struct osmo_trxcon_inst *trxcon = fi->priv;
const struct trxcon_param_full_power_scan_req *req = trxcon->fi_data;

/* req->band_arfcn_start holds the current ARFCN */
- const struct phyif_cmd phycmd = {
- .type = PHYIF_CMDT_MEASURE,
+ const struct osmo_trxcon_phyif_cmd phycmd = {
+ .type = OSMO_TRXCON_PHYIF_CMDT_MEASURE,
.param.measure = {
.band_arfcn = req->band_arfcn_start,
},
};

- phyif_handle_cmd(trxcon->phyif, &phycmd);
+ osmo_trxcon_phyif_handle_cmd(trxcon->phyif, &phycmd);
}

static void trxcon_st_full_power_scan_action(struct osmo_fsm_inst *fi,
uint32_t event, void *data)
{
- struct trxcon_inst *trxcon = fi->priv;
+ struct osmo_trxcon_inst *trxcon = fi->priv;

switch (event) {
case TRXCON_EV_FULL_POWER_SCAN_RES:
@@ -234,7 +234,7 @@

if (res->band_arfcn < req->band_arfcn_stop) {
l1ctl_tx_pm_conf(trxcon, res->band_arfcn, res->dbm, false);
- /* trxcon_st_full_power_scan_onenter() sends the next PHYIF_CMDT_MEASURE */
+ /* trxcon_st_full_power_scan_onenter() sends the next OSMO_TRXCON_PHYIF_CMDT_MEASURE */
req->band_arfcn_start = res->band_arfcn + 1;
osmo_fsm_inst_state_chg(fi, TRXCON_ST_FULL_POWER_SCAN, 0, 0); /* TODO: timeout */
} else {
@@ -255,7 +255,7 @@
static void trxcon_st_fbsb_search_action(struct osmo_fsm_inst *fi,
uint32_t event, void *data)
{
- struct trxcon_inst *trxcon = fi->priv;
+ struct osmo_trxcon_inst *trxcon = fi->priv;

switch (event) {
case TRXCON_EV_FBSB_SEARCH_RES:
@@ -270,7 +270,7 @@
static void handle_tx_access_burst_req(struct osmo_fsm_inst *fi,
const struct trxcon_param_tx_access_burst_req *req)
{
- struct trxcon_inst *trxcon = fi->priv;
+ struct osmo_trxcon_inst *trxcon = fi->priv;
enum l1sched_ts_prim_type prim_type;
const struct l1sched_ts_prim *prim;

@@ -291,7 +291,7 @@
static void trxcon_st_bcch_ccch_action(struct osmo_fsm_inst *fi,
uint32_t event, void *data)
{
- struct trxcon_inst *trxcon = fi->priv;
+ struct osmo_trxcon_inst *trxcon = fi->priv;
struct l1sched_ts *ts;
int rc;

@@ -332,8 +332,8 @@
}

if (req->hopping) {
- const struct phyif_cmd phycmd = {
- .type = PHYIF_CMDT_SETFREQ_H1,
+ const struct osmo_trxcon_phyif_cmd phycmd = {
+ .type = OSMO_TRXCON_PHYIF_CMDT_SETFREQ_H1,
.param.setfreq_h1 = {
.hsn = req->h1.hsn,
.maio = req->h1.maio,
@@ -343,21 +343,21 @@
};

/* Apply the freq. hopping parameters */
- if (phyif_handle_cmd(trxcon->phyif, &phycmd) != 0)
+ if (osmo_trxcon_phyif_handle_cmd(trxcon->phyif, &phycmd) != 0)
return;

/* Set current ARFCN to an invalid value */
trxcon->l1p.band_arfcn = 0xffff;
} else {
- const struct phyif_cmd phycmd = {
- .type = PHYIF_CMDT_SETFREQ_H0,
+ const struct osmo_trxcon_phyif_cmd phycmd = {
+ .type = OSMO_TRXCON_PHYIF_CMDT_SETFREQ_H0,
.param.setfreq_h0 = {
.band_arfcn = req->h0.band_arfcn,
},
};

/* Tune transceiver to required ARFCN */
- if (phyif_handle_cmd(trxcon->phyif, &phycmd) != 0)
+ if (osmo_trxcon_phyif_handle_cmd(trxcon->phyif, &phycmd) != 0)
return;

/* Update current ARFCN */
@@ -396,7 +396,7 @@
static void trxcon_st_dedicated_action(struct osmo_fsm_inst *fi,
uint32_t event, void *data)
{
- struct trxcon_inst *trxcon = fi->priv;
+ struct osmo_trxcon_inst *trxcon = fi->priv;

switch (event) {
case TRXCON_EV_TX_ACCESS_BURST_REQ:
@@ -506,7 +506,7 @@
static void trxcon_st_packet_data_action(struct osmo_fsm_inst *fi,
uint32_t event, void *data)
{
- struct trxcon_inst *trxcon = fi->priv;
+ struct osmo_trxcon_inst *trxcon = fi->priv;

switch (event) {
case TRXCON_EV_TX_ACCESS_BURST_REQ:
@@ -537,7 +537,7 @@
static void trxcon_fsm_pre_term_cb(struct osmo_fsm_inst *fi,
enum osmo_fsm_term_cause cause)
{
- struct trxcon_inst *trxcon = fi->priv;
+ struct osmo_trxcon_inst *trxcon = fi->priv;

if (trxcon == NULL)
return;
@@ -547,9 +547,9 @@
l1sched_free(trxcon->sched);
/* Close active connections */
if (trxcon->l2if != NULL)
- trxcon_l1ctl_close(trxcon);
+ osmo_trxcon_l1ctl_close(trxcon);
if (trxcon->phyif != NULL)
- phyif_close(trxcon->phyif);
+ osmo_trxcon_phyif_close(trxcon->phyif);

talloc_free(trxcon);
fi->priv = NULL;
diff --git a/src/host/trxcon/src/trxcon_inst.c b/src/host/trxcon/src/trxcon_inst.c
index 5d96021..c8454bb 100644
--- a/src/host/trxcon/src/trxcon_inst.c
+++ b/src/host/trxcon/src/trxcon_inst.c
@@ -31,7 +31,7 @@
extern int g_logc_l1c;
extern int g_logc_l1d;

-void trxcon_set_log_cfg(const struct trxcon_log_cfg *cfg)
+void osmo_trxcon_set_log_cfg(const struct osmo_trxcon_log_cfg *cfg)
{
l1sched_logging_init(cfg->schc, cfg->schd);
trxcon_fsm_def.log_subsys = cfg->fsm;
@@ -39,15 +39,15 @@
g_logc_l1d = cfg->l1d;
}

-struct trxcon_inst *trxcon_inst_alloc(void *ctx, unsigned int id, uint32_t fn_advance)
+struct osmo_trxcon_inst *osmo_trxcon_inst_alloc(void *ctx, unsigned int id, uint32_t fn_advance)
{
- struct trxcon_inst *trxcon;
+ struct osmo_trxcon_inst *trxcon;
struct osmo_fsm_inst *fi;

fi = osmo_fsm_inst_alloc(&trxcon_fsm_def, ctx, NULL, LOGL_DEBUG, NULL);
OSMO_ASSERT(fi != NULL);

- trxcon = talloc_zero(fi, struct trxcon_inst);
+ trxcon = talloc_zero(fi, struct osmo_trxcon_inst);
OSMO_ASSERT(trxcon != NULL);

fi->priv = trxcon;
@@ -67,14 +67,14 @@

trxcon->sched = l1sched_alloc(trxcon, &sched_cfg, trxcon);
if (trxcon->sched == NULL) {
- trxcon_inst_free(trxcon);
+ osmo_trxcon_inst_free(trxcon);
return NULL;
}

return trxcon;
}

-void trxcon_inst_free(struct trxcon_inst *trxcon)
+void osmo_trxcon_inst_free(struct osmo_trxcon_inst *trxcon)
{
if (trxcon == NULL || trxcon->fi == NULL)
return;
diff --git a/src/host/trxcon/src/trxcon_main.c b/src/host/trxcon/src/trxcon_main.c
index 94deeab..ebdc3b2 100644
--- a/src/host/trxcon/src/trxcon_main.c
+++ b/src/host/trxcon/src/trxcon_main.c
@@ -109,7 +109,7 @@
int l1sched_handle_config_req(struct l1sched_state *sched,
const struct l1sched_config_req *cr)
{
- struct trxcon_inst *trxcon = sched->priv;
+ struct osmo_trxcon_inst *trxcon = sched->priv;

switch (cr->type) {
case L1SCHED_CFG_PCHAN_COMB:
@@ -134,8 +134,8 @@
int l1sched_handle_burst_req(struct l1sched_state *sched,
const struct l1sched_burst_req *br)
{
- struct trxcon_inst *trxcon = sched->priv;
- const struct phyif_burst_req phybr = {
+ struct osmo_trxcon_inst *trxcon = sched->priv;
+ const struct osmo_trxcon_phyif_br phybr = {
.fn = br->fn,
.tn = br->tn,
.pwr = br->pwr,
@@ -143,14 +143,14 @@
.burst_len = br->burst_len,
};

- return phyif_handle_burst_req(trxcon->phyif, &phybr);
+ return osmo_trxcon_phyif_handle_br(trxcon->phyif, &phybr);
}

/* External L1 API for the PHYIF */
-int phyif_handle_burst_ind(void *phyif, const struct phyif_burst_ind *bi)
+int osmo_trxcon_phyif_handle_bi(void *phyif, const struct osmo_trxcon_phyif_bi *bi)
{
struct trx_instance *trx = phyif;
- struct trxcon_inst *trxcon = trx->priv;
+ struct osmo_trxcon_inst *trxcon = trx->priv;
const struct l1sched_meas_set meas = {
.fn = bi->fn,
.toa256 = bi->toa256,
@@ -168,25 +168,25 @@
return 0;
}

-int phyif_handle_burst_req(void *phyif, const struct phyif_burst_req *br)
+int osmo_trxcon_phyif_handle_br(void *phyif, const struct osmo_trxcon_phyif_br *br)
{
- return trx_if_handle_phyif_burst_req(phyif, br);
+ return trx_if_handle_phyif_br(phyif, br);
}

-int phyif_handle_cmd(void *phyif, const struct phyif_cmd *cmd)
+int osmo_trxcon_phyif_handle_cmd(void *phyif, const struct osmo_trxcon_phyif_cmd *cmd)
{
return trx_if_handle_phyif_cmd(phyif, cmd);
}

-int phyif_handle_rsp(void *phyif, const struct phyif_rsp *rsp)
+int osmo_trxcon_phyif_handle_rsp(void *phyif, const struct osmo_trxcon_phyif_rsp *rsp)
{
struct trx_instance *trx = phyif;
- struct trxcon_inst *trxcon = trx->priv;
+ struct osmo_trxcon_inst *trxcon = trx->priv;

switch (rsp->type) {
- case PHYIF_CMDT_MEASURE:
+ case OSMO_TRXCON_PHYIF_CMDT_MEASURE:
{
- const struct phyif_rspp_measure *meas = &rsp->param.measure;
+ const struct osmo_trxcon_phyif_rspp_measure *meas = &rsp->param.measure;
struct trxcon_param_full_power_scan_res res = {
.band_arfcn = meas->band_arfcn,
.dbm = meas->dbm,
@@ -201,7 +201,7 @@
}
}

-void phyif_close(void *phyif)
+void osmo_trxcon_phyif_close(void *phyif)
{
trx_if_close(phyif);
}
@@ -215,7 +215,7 @@
const struct l1sched_meas_set *meas = &lchan->meas_avg;
const struct l1sched_lchan_desc *lchan_desc;
struct l1sched_state *sched = lchan->ts->sched;
- struct trxcon_inst *trxcon = sched->priv;
+ struct osmo_trxcon_inst *trxcon = sched->priv;
int rc;

lchan_desc = &l1sched_lchan_desc[lchan->type];
@@ -270,7 +270,7 @@
{
const struct l1sched_lchan_desc *lchan_desc;
struct l1sched_state *sched = lchan->ts->sched;
- struct trxcon_inst *trxcon = sched->priv;
+ struct osmo_trxcon_inst *trxcon = sched->priv;
bool is_traffic = false;
const uint8_t *data;
uint8_t ra_buf[2];
@@ -336,7 +336,7 @@
return rc;
}

-void trxcon_l1ctl_close(struct trxcon_inst *trxcon)
+void osmo_trxcon_l1ctl_close(struct osmo_trxcon_inst *trxcon)
{
/* Avoid use-after-free: both *fi and *trxcon are children of
* the L2IF (L1CTL connection), so we need to re-parent *fi
@@ -345,7 +345,7 @@
l1ctl_client_conn_close(trxcon->l2if);
}

-int trxcon_l1ctl_send(struct trxcon_inst *trxcon, struct msgb *msg)
+int osmo_trxcon_l1ctl_send(struct osmo_trxcon_inst *trxcon, struct msgb *msg)
{
struct l1ctl_client *l1c = trxcon->l2if;

@@ -354,16 +354,16 @@

static int l1ctl_rx_cb(struct l1ctl_client *l1c, struct msgb *msg)
{
- struct trxcon_inst *trxcon = l1c->priv;
+ struct osmo_trxcon_inst *trxcon = l1c->priv;

- return trxcon_l1ctl_receive(trxcon, msg);
+ return osmo_trxcon_l1ctl_receive(trxcon, msg);
}

static void l1ctl_conn_accept_cb(struct l1ctl_client *l1c)
{
- struct trxcon_inst *trxcon;
+ struct osmo_trxcon_inst *trxcon;

- trxcon = trxcon_inst_alloc(l1c, l1c->id, app_data.trx_fn_advance);
+ trxcon = osmo_trxcon_inst_alloc(l1c, l1c->id, app_data.trx_fn_advance);
if (trxcon == NULL) {
l1ctl_client_conn_close(l1c);
return;
@@ -395,7 +395,7 @@

static void l1ctl_conn_close_cb(struct l1ctl_client *l1c)
{
- struct trxcon_inst *trxcon = l1c->priv;
+ struct osmo_trxcon_inst *trxcon = l1c->priv;

if (trxcon == NULL || trxcon->fi == NULL)
return;

To view, visit change 30102. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I0c5b8642c9c436e8beab0dc80fb7fd96cda25547
Gerrit-Change-Number: 30102
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>
Gerrit-MessageType: newchange