update to new "superfemto.h" header file naming
This commit is contained in:
parent
47589f10a4
commit
20d73555a2
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <sysmocom/femtobts/femtobts.h>
|
||||
#include <sysmocom/femtobts/superfemto.h>
|
||||
#include <sysmocom/femtobts/gsml1const.h>
|
||||
#include <sysmocom/femtobts/gsml1dbg.h>
|
||||
|
||||
|
@ -91,48 +91,48 @@ const GsmL1_PrimId_t femtobts_l1prim_req2conf[GsmL1_PrimId_NUM] = {
|
|||
[GsmL1_PrimId_MphMeasureReq] = GsmL1_PrimId_MphMeasureCnf,
|
||||
};
|
||||
|
||||
const enum l1prim_type femtobts_sysprim_type[FemtoBts_PrimId_NUM] = {
|
||||
[FemtoBts_PrimId_SystemInfoReq] = L1P_T_REQ,
|
||||
[FemtoBts_PrimId_SystemInfoCnf] = L1P_T_CONF,
|
||||
[FemtoBts_PrimId_SystemFailureInd] = L1P_T_IND,
|
||||
[FemtoBts_PrimId_ActivateRfReq] = L1P_T_REQ,
|
||||
[FemtoBts_PrimId_ActivateRfCnf] = L1P_T_CONF,
|
||||
[FemtoBts_PrimId_DeactivateRfReq] = L1P_T_REQ,
|
||||
[FemtoBts_PrimId_DeactivateRfCnf] = L1P_T_CONF,
|
||||
[FemtoBts_PrimId_SetTraceFlagsReq] = L1P_T_REQ,
|
||||
[FemtoBts_PrimId_RfClockInfoReq] = L1P_T_REQ,
|
||||
[FemtoBts_PrimId_RfClockInfoCnf] = L1P_T_CONF,
|
||||
[FemtoBts_PrimId_RfClockSetupReq] = L1P_T_REQ,
|
||||
[FemtoBts_PrimId_RfClockSetupCnf] = L1P_T_CONF,
|
||||
[FemtoBts_PrimId_Layer1ResetReq] = L1P_T_REQ,
|
||||
[FemtoBts_PrimId_Layer1ResetCnf] = L1P_T_CONF,
|
||||
const enum l1prim_type femtobts_sysprim_type[SuperFemto_PrimId_NUM] = {
|
||||
[SuperFemto_PrimId_SystemInfoReq] = L1P_T_REQ,
|
||||
[SuperFemto_PrimId_SystemInfoCnf] = L1P_T_CONF,
|
||||
[SuperFemto_PrimId_SystemFailureInd] = L1P_T_IND,
|
||||
[SuperFemto_PrimId_ActivateRfReq] = L1P_T_REQ,
|
||||
[SuperFemto_PrimId_ActivateRfCnf] = L1P_T_CONF,
|
||||
[SuperFemto_PrimId_DeactivateRfReq] = L1P_T_REQ,
|
||||
[SuperFemto_PrimId_DeactivateRfCnf] = L1P_T_CONF,
|
||||
[SuperFemto_PrimId_SetTraceFlagsReq] = L1P_T_REQ,
|
||||
[SuperFemto_PrimId_RfClockInfoReq] = L1P_T_REQ,
|
||||
[SuperFemto_PrimId_RfClockInfoCnf] = L1P_T_CONF,
|
||||
[SuperFemto_PrimId_RfClockSetupReq] = L1P_T_REQ,
|
||||
[SuperFemto_PrimId_RfClockSetupCnf] = L1P_T_CONF,
|
||||
[SuperFemto_PrimId_Layer1ResetReq] = L1P_T_REQ,
|
||||
[SuperFemto_PrimId_Layer1ResetCnf] = L1P_T_CONF,
|
||||
};
|
||||
|
||||
const struct value_string femtobts_sysprim_names[FemtoBts_PrimId_NUM+1] = {
|
||||
{ FemtoBts_PrimId_SystemInfoReq, "SYSTEM-INFO.req" },
|
||||
{ FemtoBts_PrimId_SystemInfoCnf, "SYSTEM-INFO.conf" },
|
||||
{ FemtoBts_PrimId_SystemFailureInd, "SYSTEM-FAILURE.ind" },
|
||||
{ FemtoBts_PrimId_ActivateRfReq, "ACTIVATE-RF.req" },
|
||||
{ FemtoBts_PrimId_ActivateRfCnf, "ACTIVATE-RF.conf" },
|
||||
{ FemtoBts_PrimId_DeactivateRfReq, "DEACTIVATE-RF.req" },
|
||||
{ FemtoBts_PrimId_DeactivateRfCnf, "DEACTIVATE-RF.conf" },
|
||||
{ FemtoBts_PrimId_SetTraceFlagsReq, "SET-TRACE-FLAGS.req" },
|
||||
{ FemtoBts_PrimId_RfClockInfoReq, "RF-CLOCK-INFO.req" },
|
||||
{ FemtoBts_PrimId_RfClockInfoCnf, "RF-CLOCK-INFO.conf" },
|
||||
{ FemtoBts_PrimId_RfClockSetupReq, "RF-CLOCK-SETUP.req" },
|
||||
{ FemtoBts_PrimId_RfClockSetupCnf, "RF-CLOCK-SETUP.conf" },
|
||||
{ FemtoBts_PrimId_Layer1ResetReq, "LAYER1-RESET.req" },
|
||||
{ FemtoBts_PrimId_Layer1ResetCnf, "LAYER1-RESET.conf" },
|
||||
const struct value_string femtobts_sysprim_names[SuperFemto_PrimId_NUM+1] = {
|
||||
{ SuperFemto_PrimId_SystemInfoReq, "SYSTEM-INFO.req" },
|
||||
{ SuperFemto_PrimId_SystemInfoCnf, "SYSTEM-INFO.conf" },
|
||||
{ SuperFemto_PrimId_SystemFailureInd, "SYSTEM-FAILURE.ind" },
|
||||
{ SuperFemto_PrimId_ActivateRfReq, "ACTIVATE-RF.req" },
|
||||
{ SuperFemto_PrimId_ActivateRfCnf, "ACTIVATE-RF.conf" },
|
||||
{ SuperFemto_PrimId_DeactivateRfReq, "DEACTIVATE-RF.req" },
|
||||
{ SuperFemto_PrimId_DeactivateRfCnf, "DEACTIVATE-RF.conf" },
|
||||
{ SuperFemto_PrimId_SetTraceFlagsReq, "SET-TRACE-FLAGS.req" },
|
||||
{ SuperFemto_PrimId_RfClockInfoReq, "RF-CLOCK-INFO.req" },
|
||||
{ SuperFemto_PrimId_RfClockInfoCnf, "RF-CLOCK-INFO.conf" },
|
||||
{ SuperFemto_PrimId_RfClockSetupReq, "RF-CLOCK-SETUP.req" },
|
||||
{ SuperFemto_PrimId_RfClockSetupCnf, "RF-CLOCK-SETUP.conf" },
|
||||
{ SuperFemto_PrimId_Layer1ResetReq, "LAYER1-RESET.req" },
|
||||
{ SuperFemto_PrimId_Layer1ResetCnf, "LAYER1-RESET.conf" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
const FemtoBts_PrimId_t femtobts_sysprim_req2conf[FemtoBts_PrimId_NUM] = {
|
||||
[FemtoBts_PrimId_SystemInfoReq] = FemtoBts_PrimId_SystemInfoCnf,
|
||||
[FemtoBts_PrimId_ActivateRfReq] = FemtoBts_PrimId_ActivateRfCnf,
|
||||
[FemtoBts_PrimId_DeactivateRfReq] = FemtoBts_PrimId_DeactivateRfCnf,
|
||||
[FemtoBts_PrimId_RfClockInfoReq] = FemtoBts_PrimId_RfClockInfoCnf,
|
||||
[FemtoBts_PrimId_RfClockSetupReq] = FemtoBts_PrimId_RfClockSetupCnf,
|
||||
[FemtoBts_PrimId_Layer1ResetReq] = FemtoBts_PrimId_Layer1ResetCnf,
|
||||
const SuperFemto_PrimId_t femtobts_sysprim_req2conf[SuperFemto_PrimId_NUM] = {
|
||||
[SuperFemto_PrimId_SystemInfoReq] = SuperFemto_PrimId_SystemInfoCnf,
|
||||
[SuperFemto_PrimId_ActivateRfReq] = SuperFemto_PrimId_ActivateRfCnf,
|
||||
[SuperFemto_PrimId_DeactivateRfReq] = SuperFemto_PrimId_DeactivateRfCnf,
|
||||
[SuperFemto_PrimId_RfClockInfoReq] = SuperFemto_PrimId_RfClockInfoCnf,
|
||||
[SuperFemto_PrimId_RfClockSetupReq] = SuperFemto_PrimId_RfClockSetupCnf,
|
||||
[SuperFemto_PrimId_Layer1ResetReq] = SuperFemto_PrimId_Layer1ResetCnf,
|
||||
};
|
||||
|
||||
const struct value_string femtobts_l1sapi_names[GsmL1_Sapi_NUM+1] = {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <osmocom/core/utils.h>
|
||||
|
||||
#include <sysmocom/femtobts/femtobts.h>
|
||||
#include <sysmocom/femtobts/superfemto.h>
|
||||
#include <sysmocom/femtobts/gsml1const.h>
|
||||
|
||||
enum l1prim_type {
|
||||
|
@ -18,9 +18,9 @@ const enum l1prim_type femtobts_l1prim_type[GsmL1_PrimId_NUM];
|
|||
const struct value_string femtobts_l1prim_names[GsmL1_PrimId_NUM+1];
|
||||
const GsmL1_PrimId_t femtobts_l1prim_req2conf[GsmL1_PrimId_NUM];
|
||||
|
||||
const enum l1prim_type femtobts_sysprim_type[FemtoBts_PrimId_NUM];
|
||||
const struct value_string femtobts_sysprim_names[FemtoBts_PrimId_NUM+1];
|
||||
const FemtoBts_PrimId_t femtobts_sysprim_req2conf[FemtoBts_PrimId_NUM];
|
||||
const enum l1prim_type femtobts_sysprim_type[SuperFemto_PrimId_NUM];
|
||||
const struct value_string femtobts_sysprim_names[SuperFemto_PrimId_NUM+1];
|
||||
const SuperFemto_PrimId_t femtobts_sysprim_req2conf[SuperFemto_PrimId_NUM];
|
||||
|
||||
const struct value_string femtobts_l1sapi_names[GsmL1_Sapi_NUM+1];
|
||||
const struct value_string femtobts_l1status_names[GSML1_STATUS_NUM+1];
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#include <osmo-bts/logging.h>
|
||||
#include <osmo-bts/gsm_data.h>
|
||||
|
||||
#include <sysmocom/femtobts/femtobts.h>
|
||||
#include <sysmocom/femtobts/superfemto.h>
|
||||
#include <sysmocom/femtobts/gsml1prim.h>
|
||||
#include <sysmocom/femtobts/gsml1const.h>
|
||||
#include <sysmocom/femtobts/gsml1types.h>
|
||||
|
@ -156,7 +156,7 @@ int main(int argc, char **argv)
|
|||
int rc, i;
|
||||
|
||||
printf("sizeof(GsmL1_Prim_t) = %zu\n", sizeof(GsmL1_Prim_t));
|
||||
printf("sizeof(FemtoBts_Prim_t) = %zu\n", sizeof(FemtoBts_Prim_t));
|
||||
printf("sizeof(SuperFemto_Prim_t) = %zu\n", sizeof(SuperFemto_Prim_t));
|
||||
|
||||
bts_log_init(NULL);
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#include <osmo-bts/paging.h>
|
||||
#include <osmo-bts/measurement.h>
|
||||
|
||||
#include <sysmocom/femtobts/femtobts.h>
|
||||
#include <sysmocom/femtobts/superfemto.h>
|
||||
#include <sysmocom/femtobts/gsml1prim.h>
|
||||
#include <sysmocom/femtobts/gsml1const.h>
|
||||
#include <sysmocom/femtobts/gsml1types.h>
|
||||
|
@ -116,7 +116,7 @@ int l1if_req_compl(struct femtol1_hdl *fl1h, struct msgb *msg,
|
|||
wqueue = &fl1h->write_q[MQ_L1_WRITE];
|
||||
timeout_secs = 30;
|
||||
} else {
|
||||
FemtoBts_Prim_t *sysp = msgb_sysprim(msg);
|
||||
SuperFemto_Prim_t *sysp = msgb_sysprim(msg);
|
||||
|
||||
LOGP(DL1C, LOGL_INFO, "Tx SYS prim %s\n",
|
||||
get_value_string(femtobts_sysprim_names, sysp->id));
|
||||
|
@ -156,13 +156,13 @@ struct msgb *l1p_msgb_alloc(void)
|
|||
return msg;
|
||||
}
|
||||
|
||||
/* allocate a msgb containing a FemtoBts_Prim_t */
|
||||
/* allocate a msgb containing a SuperFemto_Prim_t */
|
||||
struct msgb *sysp_msgb_alloc(void)
|
||||
{
|
||||
struct msgb *msg = msgb_alloc(sizeof(FemtoBts_Prim_t), "sys_prim");
|
||||
struct msgb *msg = msgb_alloc(sizeof(SuperFemto_Prim_t), "sys_prim");
|
||||
|
||||
if (msg)
|
||||
msg->l1h = msgb_put(msg, sizeof(FemtoBts_Prim_t));
|
||||
msg->l1h = msgb_put(msg, sizeof(SuperFemto_Prim_t));
|
||||
|
||||
return msg;
|
||||
}
|
||||
|
@ -629,7 +629,7 @@ int l1if_handle_l1prim(struct femtol1_hdl *fl1h, struct msgb *msg)
|
|||
|
||||
int l1if_handle_sysprim(struct femtol1_hdl *fl1h, struct msgb *msg)
|
||||
{
|
||||
FemtoBts_Prim_t *sysp = msgb_sysprim(msg);
|
||||
SuperFemto_Prim_t *sysp = msgb_sysprim(msg);
|
||||
struct wait_l1_conf *wlc;
|
||||
int rc;
|
||||
|
||||
|
@ -669,14 +669,14 @@ int sysinfo_has_changed(struct gsm_bts *bts, int si)
|
|||
|
||||
static int activate_rf_compl_cb(struct msgb *resp, void *data)
|
||||
{
|
||||
FemtoBts_Prim_t *sysp = msgb_sysprim(resp);
|
||||
SuperFemto_Prim_t *sysp = msgb_sysprim(resp);
|
||||
struct femtol1_hdl *fl1h = data;
|
||||
struct gsm_bts_trx *trx = fl1h->priv;
|
||||
GsmL1_Status_t status;
|
||||
int on = 0;
|
||||
unsigned int i;
|
||||
|
||||
if (sysp->id == FemtoBts_PrimId_ActivateRfCnf)
|
||||
if (sysp->id == SuperFemto_PrimId_ActivateRfCnf)
|
||||
on = 1;
|
||||
|
||||
if (on)
|
||||
|
@ -716,10 +716,10 @@ static int activate_rf_compl_cb(struct msgb *resp, void *data)
|
|||
int l1if_activate_rf(struct femtol1_hdl *hdl, int on)
|
||||
{
|
||||
struct msgb *msg = sysp_msgb_alloc();
|
||||
FemtoBts_Prim_t *sysp = msgb_sysprim(msg);
|
||||
SuperFemto_Prim_t *sysp = msgb_sysprim(msg);
|
||||
|
||||
if (on) {
|
||||
sysp->id = FemtoBts_PrimId_ActivateRfReq;
|
||||
sysp->id = SuperFemto_PrimId_ActivateRfReq;
|
||||
#ifdef HW_VERSION_1
|
||||
sysp->u.activateRfReq.u12ClkVc = hdl->clk_cal;
|
||||
#else
|
||||
|
@ -729,7 +729,7 @@ int l1if_activate_rf(struct femtol1_hdl *hdl, int on)
|
|||
sysp->u.activateRfReq.rfTrx.iClkCor = hdl->clk_cal;
|
||||
#endif
|
||||
} else {
|
||||
sysp->id = FemtoBts_PrimId_DeactivateRfReq;
|
||||
sysp->id = SuperFemto_PrimId_DeactivateRfReq;
|
||||
}
|
||||
|
||||
return l1if_req_compl(hdl, msg, 1, activate_rf_compl_cb, hdl);
|
||||
|
@ -738,8 +738,8 @@ int l1if_activate_rf(struct femtol1_hdl *hdl, int on)
|
|||
/* call-back on arrival of DSP+FPGA version + band capability */
|
||||
static int info_compl_cb(struct msgb *resp, void *data)
|
||||
{
|
||||
FemtoBts_Prim_t *sysp = msgb_sysprim(resp);
|
||||
FemtoBts_SystemInfoCnf_t *sic = &sysp->u.systemInfoCnf;
|
||||
SuperFemto_Prim_t *sysp = msgb_sysprim(resp);
|
||||
SuperFemto_SystemInfoCnf_t *sic = &sysp->u.systemInfoCnf;
|
||||
struct femtol1_hdl *fl1h = data;
|
||||
struct gsm_bts_trx *trx = fl1h->priv;
|
||||
|
||||
|
@ -781,9 +781,9 @@ static int info_compl_cb(struct msgb *resp, void *data)
|
|||
static int l1if_get_info(struct femtol1_hdl *hdl)
|
||||
{
|
||||
struct msgb *msg = sysp_msgb_alloc();
|
||||
FemtoBts_Prim_t *sysp = msgb_sysprim(msg);
|
||||
SuperFemto_Prim_t *sysp = msgb_sysprim(msg);
|
||||
|
||||
sysp->id = FemtoBts_PrimId_SystemInfoReq;
|
||||
sysp->id = SuperFemto_PrimId_SystemInfoReq;
|
||||
|
||||
return l1if_req_compl(hdl, msg, 1, info_compl_cb, hdl);
|
||||
}
|
||||
|
@ -792,7 +792,7 @@ static int reset_compl_cb(struct msgb *resp, void *data)
|
|||
{
|
||||
struct femtol1_hdl *fl1h = data;
|
||||
struct gsm_bts_trx *trx = fl1h->priv;
|
||||
FemtoBts_Prim_t *sysp = msgb_sysprim(resp);
|
||||
SuperFemto_Prim_t *sysp = msgb_sysprim(resp);
|
||||
GsmL1_Status_t status = sysp->u.layer1ResetCnf.status;
|
||||
|
||||
LOGP(DL1C, LOGL_NOTICE, "Rx L1-RESET.conf (status=%s)\n",
|
||||
|
@ -823,8 +823,8 @@ static int reset_compl_cb(struct msgb *resp, void *data)
|
|||
int l1if_reset(struct femtol1_hdl *hdl)
|
||||
{
|
||||
struct msgb *msg = sysp_msgb_alloc();
|
||||
FemtoBts_Prim_t *sysp = msgb_sysprim(msg);
|
||||
sysp->id = FemtoBts_PrimId_Layer1ResetReq;
|
||||
SuperFemto_Prim_t *sysp = msgb_sysprim(msg);
|
||||
sysp->id = SuperFemto_PrimId_Layer1ResetReq;
|
||||
|
||||
return l1if_req_compl(hdl, msg, 1, reset_compl_cb, hdl);
|
||||
}
|
||||
|
@ -833,12 +833,12 @@ int l1if_reset(struct femtol1_hdl *hdl)
|
|||
int l1if_set_trace_flags(struct femtol1_hdl *hdl, uint32_t flags)
|
||||
{
|
||||
struct msgb *msg = sysp_msgb_alloc();
|
||||
FemtoBts_Prim_t *sysp = msgb_sysprim(msg);
|
||||
SuperFemto_Prim_t *sysp = msgb_sysprim(msg);
|
||||
|
||||
LOGP(DL1C, LOGL_INFO, "Tx SET-TRACE-FLAGS.req (0x%08x)\n",
|
||||
flags);
|
||||
|
||||
sysp->id = FemtoBts_PrimId_SetTraceFlagsReq;
|
||||
sysp->id = SuperFemto_PrimId_SetTraceFlagsReq;
|
||||
sysp->u.setTraceFlagsReq.u32Tf = flags;
|
||||
|
||||
hdl->dsp_trace_f = flags;
|
||||
|
|
|
@ -44,7 +44,7 @@ struct femtol1_hdl {
|
|||
};
|
||||
|
||||
#define msgb_l1prim(msg) ((GsmL1_Prim_t *)(msg)->l1h)
|
||||
#define msgb_sysprim(msg) ((FemtoBts_Prim_t *)(msg)->l1h)
|
||||
#define msgb_sysprim(msg) ((SuperFemto_Prim_t *)(msg)->l1h)
|
||||
|
||||
typedef int l1if_compl_cb(struct msgb *l1_msg, void *data);
|
||||
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
/* functions a transport calls on arrival of primitive from BTS */
|
||||
int l1if_handle_l1prim(struct femtol1_hdl *fl1h, struct msgb *msg);
|
||||
int l1if_handle_sysprim(struct femtol1_hdl *fl1h, struct msgb *msg);
|
||||
int l1if_handle_tchprim(struct femtol1_hdl *fl1h, struct msgb *msg);
|
||||
int l1if_handle_pdtchprim(struct femtol1_hdl *fl1h, struct msgb *msg);
|
||||
|
||||
/* functions exported by a transport */
|
||||
int l1if_transport_open(struct femtol1_hdl *fl1h);
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#include <osmo-bts/logging.h>
|
||||
#include <osmo-bts/gsm_data.h>
|
||||
|
||||
#include <sysmocom/femtobts/femtobts.h>
|
||||
#include <sysmocom/femtobts/superfemto.h>
|
||||
#include <sysmocom/femtobts/gsml1prim.h>
|
||||
#include <sysmocom/femtobts/gsml1const.h>
|
||||
#include <sysmocom/femtobts/gsml1types.h>
|
||||
|
@ -102,7 +102,7 @@ int l1if_transport_open(struct femtol1_hdl *fl1h)
|
|||
char *bts_host = getenv("L1FWD_BTS_HOST");
|
||||
|
||||
printf("sizeof(GsmL1_Prim_t) = %zu\n", sizeof(GsmL1_Prim_t));
|
||||
printf("sizeof(FemtoBts_Prim_t) = %zu\n", sizeof(FemtoBts_Prim_t));
|
||||
printf("sizeof(SuperFemto_Prim_t) = %zu\n", sizeof(SuperFemto_Prim_t));
|
||||
|
||||
if (!bts_host) {
|
||||
fprintf(stderr, "You have to set the L1FWD_BTS_HOST environment variable\n");
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include <osmo-bts/logging.h>
|
||||
#include <osmo-bts/gsm_data.h>
|
||||
|
||||
#include <sysmocom/femtobts/femtobts.h>
|
||||
#include <sysmocom/femtobts/superfemto.h>
|
||||
#include <sysmocom/femtobts/gsml1prim.h>
|
||||
#include <sysmocom/femtobts/gsml1const.h>
|
||||
#include <sysmocom/femtobts/gsml1types.h>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#include <osmo-bts/gsm_data.h>
|
||||
#include <osmo-bts/measurement.h>
|
||||
|
||||
#include <sysmocom/femtobts/femtobts.h>
|
||||
#include <sysmocom/femtobts/superfemto.h>
|
||||
#include <sysmocom/femtobts/gsml1prim.h>
|
||||
#include <sysmocom/femtobts/gsml1const.h>
|
||||
#include <sysmocom/femtobts/gsml1types.h>
|
||||
|
|
Loading…
Reference in New Issue