From 20d73555a2226a335efaeb46b7b8e342055113c5 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 15 Mar 2012 21:27:21 +0100 Subject: update to new "superfemto.h" header file naming --- src/osmo-bts-sysmo/femtobts.c | 76 +++++++++++++++++++------------------- src/osmo-bts-sysmo/femtobts.h | 8 ++-- src/osmo-bts-sysmo/l1_fwd_main.c | 4 +- src/osmo-bts-sysmo/l1_if.c | 40 ++++++++++---------- src/osmo-bts-sysmo/l1_if.h | 2 +- src/osmo-bts-sysmo/l1_transp.h | 2 + src/osmo-bts-sysmo/l1_transp_fwd.c | 4 +- src/osmo-bts-sysmo/l1_transp_hw.c | 2 +- src/osmo-bts-sysmo/tch.c | 2 +- 9 files changed, 71 insertions(+), 69 deletions(-) diff --git a/src/osmo-bts-sysmo/femtobts.c b/src/osmo-bts-sysmo/femtobts.c index a00e698f..116d865b 100644 --- a/src/osmo-bts-sysmo/femtobts.c +++ b/src/osmo-bts-sysmo/femtobts.c @@ -19,7 +19,7 @@ * */ -#include +#include #include #include @@ -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] = { diff --git a/src/osmo-bts-sysmo/femtobts.h b/src/osmo-bts-sysmo/femtobts.h index 94138b59..c4f1af6b 100644 --- a/src/osmo-bts-sysmo/femtobts.h +++ b/src/osmo-bts-sysmo/femtobts.h @@ -4,7 +4,7 @@ #include #include -#include +#include #include 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]; diff --git a/src/osmo-bts-sysmo/l1_fwd_main.c b/src/osmo-bts-sysmo/l1_fwd_main.c index 23d2a39c..852d5189 100644 --- a/src/osmo-bts-sysmo/l1_fwd_main.c +++ b/src/osmo-bts-sysmo/l1_fwd_main.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include #include @@ -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); diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 4959eb69..f6353929 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include #include @@ -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; diff --git a/src/osmo-bts-sysmo/l1_if.h b/src/osmo-bts-sysmo/l1_if.h index b6209dae..a4171505 100644 --- a/src/osmo-bts-sysmo/l1_if.h +++ b/src/osmo-bts-sysmo/l1_if.h @@ -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); diff --git a/src/osmo-bts-sysmo/l1_transp.h b/src/osmo-bts-sysmo/l1_transp.h index 5226961d..ea824544 100644 --- a/src/osmo-bts-sysmo/l1_transp.h +++ b/src/osmo-bts-sysmo/l1_transp.h @@ -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); diff --git a/src/osmo-bts-sysmo/l1_transp_fwd.c b/src/osmo-bts-sysmo/l1_transp_fwd.c index e759ee13..e233f529 100644 --- a/src/osmo-bts-sysmo/l1_transp_fwd.c +++ b/src/osmo-bts-sysmo/l1_transp_fwd.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include #include @@ -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"); diff --git a/src/osmo-bts-sysmo/l1_transp_hw.c b/src/osmo-bts-sysmo/l1_transp_hw.c index dbdc48d0..f7bb42f0 100644 --- a/src/osmo-bts-sysmo/l1_transp_hw.c +++ b/src/osmo-bts-sysmo/l1_transp_hw.c @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index 31f86896..e9512a92 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include #include -- cgit v1.2.3