diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-01-22 07:37:41 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-02-27 09:07:18 +0100 |
commit | 654fe73b78993c6e421162c8a7b41f009d7d2e40 (patch) | |
tree | 217ad0ac4b499c06702ed35a04dab86960623830 | |
parent | 6142f9262adf197d60a31ab4636ac0886dc32316 (diff) |
sysmobts: We can now pass the trx to the callback change the signatures
-rw-r--r-- | src/osmo-bts-sysmo/calib_file.c | 5 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/l1_if.c | 13 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/l1_if.h | 2 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/oml.c | 17 |
4 files changed, 14 insertions, 23 deletions
diff --git a/src/osmo-bts-sysmo/calib_file.c b/src/osmo-bts-sysmo/calib_file.c index 8e263f93..f402e752 100644 --- a/src/osmo-bts-sysmo/calib_file.c +++ b/src/osmo-bts-sysmo/calib_file.c @@ -200,7 +200,7 @@ int calib_file_read(const char *path, const struct calib_file_desc *desc, /* iteratively download the calibration data into the L1 */ -static int calib_send_compl_cb(struct msgb *l1_msg, void *data); +static int calib_send_compl_cb(struct gsm_bts_trx *trx, struct msgb *l1_msg); /* send the calibration table for a single specified file */ static int calib_file_send(struct femtol1_hdl *fl1h, @@ -221,9 +221,8 @@ static int calib_file_send(struct femtol1_hdl *fl1h, } /* completion callback after every SetCalibTbl is confirmed */ -static int calib_send_compl_cb(struct msgb *l1_msg, void *data) +static int calib_send_compl_cb(struct gsm_bts_trx *trx, struct msgb *l1_msg) { - struct gsm_bts_trx *trx = data; struct femtol1_hdl *fl1h = trx_femtol1_hdl(trx); struct calib_send_state *st = &fl1h->st; diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 9ac1f8df..b20987f0 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -875,7 +875,7 @@ int l1if_handle_l1prim(int wq, struct femtol1_hdl *fl1h, struct msgb *msg) if (wlc->is_sys_prim == 0 && l1p->id == wlc->conf_prim_id) { llist_del(&wlc->list); if (wlc->cb) - rc = wlc->cb(msg, fl1h->priv); + rc = wlc->cb(fl1h->priv, msg); else rc = 0; release_wlc(wlc); @@ -903,7 +903,7 @@ int l1if_handle_sysprim(struct femtol1_hdl *fl1h, struct msgb *msg) if (wlc->is_sys_prim && sysp->id == wlc->conf_prim_id) { llist_del(&wlc->list); if (wlc->cb) - rc = wlc->cb(msg, fl1h->priv); + rc = wlc->cb(fl1h->priv, msg); else rc = 0; release_wlc(wlc); @@ -930,10 +930,9 @@ int sysinfo_has_changed(struct gsm_bts *bts, int si) } #endif -static int activate_rf_compl_cb(struct msgb *resp, void *data) +static int activate_rf_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp) { SuperFemto_Prim_t *sysp = msgb_sysprim(resp); - struct gsm_bts_trx *trx = data; GsmL1_Status_t status; int on = 0; unsigned int i; @@ -1017,11 +1016,10 @@ 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) +static int info_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp) { SuperFemto_Prim_t *sysp = msgb_sysprim(resp); SuperFemto_SystemInfoCnf_t *sic = &sysp->u.systemInfoCnf; - struct gsm_bts_trx *trx = data; struct femtol1_hdl *fl1h = trx_femtol1_hdl(trx); fl1h->hw_info.dsp_version[0] = sic->dspVersion.major; @@ -1069,9 +1067,8 @@ static int l1if_get_info(struct femtol1_hdl *hdl) return l1if_req_compl(hdl, msg, 1, info_compl_cb); } -static int reset_compl_cb(struct msgb *resp, void *data) +static int reset_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp) { - struct gsm_bts_trx *trx = data; struct femtol1_hdl *fl1h = trx_femtol1_hdl(trx); SuperFemto_Prim_t *sysp = msgb_sysprim(resp); GsmL1_Status_t status = sysp->u.layer1ResetCnf.status; diff --git a/src/osmo-bts-sysmo/l1_if.h b/src/osmo-bts-sysmo/l1_if.h index 36a7330e..c7b5f645 100644 --- a/src/osmo-bts-sysmo/l1_if.h +++ b/src/osmo-bts-sysmo/l1_if.h @@ -65,7 +65,7 @@ struct femtol1_hdl { #define msgb_l1prim(msg) ((GsmL1_Prim_t *)(msg)->l1h) #define msgb_sysprim(msg) ((SuperFemto_Prim_t *)(msg)->l1h) -typedef int l1if_compl_cb(struct msgb *l1_msg, void *data); +typedef int l1if_compl_cb(struct gsm_bts_trx *trx, struct msgb *l1_msg); /* send a request primitive to the L1 and schedule completion call-back */ int l1if_req_compl(struct femtol1_hdl *fl1h, struct msgb *msg, diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c index 6d4f3627..bf4fe158 100644 --- a/src/osmo-bts-sysmo/oml.c +++ b/src/osmo-bts-sysmo/oml.c @@ -207,9 +207,8 @@ static int opstart_compl(struct gsm_abis_mo *mo, struct msgb *l1_msg) return oml_mo_opstart_ack(mo); } -static int opstart_compl_cb(struct msgb *l1_msg, void *data) +static int opstart_compl_cb(struct gsm_bts_trx *trx, struct msgb *l1_msg) { - struct gsm_bts_trx *trx = data; struct gsm_abis_mo *mo; GsmL1_Prim_t *l1p = msgb_l1prim(l1_msg); GsmL1_MphConnectCnf_t *cnf = &l1p->u.mphConnectCnf; @@ -218,9 +217,8 @@ static int opstart_compl_cb(struct msgb *l1_msg, void *data) return opstart_compl(mo, l1_msg); } -static int trx_init_compl_cb(struct msgb *l1_msg, void *data) +static int trx_init_compl_cb(struct gsm_bts_trx *trx, struct msgb *l1_msg) { - struct gsm_bts_trx *trx = data; struct femtol1_hdl *fl1h = trx_femtol1_hdl(trx); GsmL1_Prim_t *l1p = msgb_l1prim(l1_msg); @@ -306,7 +304,7 @@ uint32_t trx_get_hlayer1(struct gsm_bts_trx *trx) return fl1h->hLayer1; } -static int trx_close_compl_cb(struct msgb *l1_msg, void *data) +static int trx_close_compl_cb(struct gsm_bts_trx *trx, struct msgb *l1_msg) { msgb_free(l1_msg); return 0; @@ -454,10 +452,9 @@ static const struct lchan_sapis sapis_for_lchan[_GSM_LCHAN_MAX] = { }, }; -static int lchan_act_compl_cb(struct msgb *l1_msg, void *data) +static int lchan_act_compl_cb(struct gsm_bts_trx *trx, struct msgb *l1_msg) { struct gsm_time *time; - struct gsm_bts_trx *trx = data; struct gsm_lchan *lchan; GsmL1_Prim_t *l1p = msgb_l1prim(l1_msg); GsmL1_MphActivateCnf_t *ic = &l1p->u.mphActivateCnf; @@ -787,9 +784,8 @@ static void dump_lch_par(int logl, GsmL1_LogChParam_t *lch_par, GsmL1_Sapi_t sap LOGPC(DL1C, logl, ")\n"); } -static int chmod_modif_compl_cb(struct msgb *l1_msg, void *data) +static int chmod_modif_compl_cb(struct gsm_bts_trx *trx, struct msgb *l1_msg) { - struct gsm_bts_trx *trx = data; struct gsm_lchan *lchan; GsmL1_Prim_t *l1p = msgb_l1prim(l1_msg); GsmL1_MphConfigCnf_t *cc = &l1p->u.mphConfigCnf; @@ -950,9 +946,8 @@ int bts_model_rsl_mode_modify(struct gsm_lchan *lchan) return 0; } -static int lchan_deact_compl_cb(struct msgb *l1_msg, void *data) +static int lchan_deact_compl_cb(struct gsm_bts_trx *trx, struct msgb *l1_msg) { - struct gsm_bts_trx *trx = data; struct gsm_lchan *lchan; GsmL1_Prim_t *l1p = msgb_l1prim(l1_msg); GsmL1_MphDeactivateCnf_t *ic = &l1p->u.mphDeactivateCnf; |