diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-01-22 15:22:55 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-02-27 09:07:18 +0100 |
commit | 3d383c22c7d1d290e498c7db652e7d1888245e43 (patch) | |
tree | 6aaf842557a40d96f9df380374ee0cafc9772ef2 /src | |
parent | 654fe73b78993c6e421162c8a7b41f009d7d2e40 (diff) |
sysmobts: Remove the is_system_primitive from l1if_req_compl
All users (but the gsm_compl) of the l1if_req_compl use it with
is_system_primitive=1. We can now remove this parameter from the
method. Introduce _l1if_req_compl that will insert the item into
the queue for us.
Diffstat (limited to 'src')
-rw-r--r-- | src/osmo-bts-sysmo/calib_file.c | 2 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/l1_if.c | 18 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/l1_if.h | 2 |
3 files changed, 14 insertions, 8 deletions
diff --git a/src/osmo-bts-sysmo/calib_file.c b/src/osmo-bts-sysmo/calib_file.c index f402e752..43156565 100644 --- a/src/osmo-bts-sysmo/calib_file.c +++ b/src/osmo-bts-sysmo/calib_file.c @@ -217,7 +217,7 @@ static int calib_file_send(struct femtol1_hdl *fl1h, return rc; } - return l1if_req_compl(fl1h, msg, 1, calib_send_compl_cb); + return l1if_req_compl(fl1h, msg, calib_send_compl_cb); } /* completion callback after every SetCalibTbl is confirmed */ diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index b20987f0..7040a5fe 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -181,8 +181,7 @@ static void l1if_req_timeout(void *data) exit(23); } -/* send a request primitive to the L1 and schedule completion call-back */ -int l1if_req_compl(struct femtol1_hdl *fl1h, struct msgb *msg, +static int _l1if_req_compl(struct femtol1_hdl *fl1h, struct msgb *msg, int is_system_prim, l1if_compl_cb *cb) { struct wait_l1_conf *wlc; @@ -241,10 +240,17 @@ int l1if_req_compl(struct femtol1_hdl *fl1h, struct msgb *msg, return 0; } +/* send a request primitive to the L1 and schedule completion call-back */ +int l1if_req_compl(struct femtol1_hdl *fl1h, struct msgb *msg, + l1if_compl_cb *cb) +{ + return _l1if_req_compl(fl1h, msg, 1, cb); +} + int l1if_gsm_req_compl(struct femtol1_hdl *fl1h, struct msgb *msg, l1if_compl_cb *cb) { - return l1if_req_compl(fl1h, msg, 0, cb); + return _l1if_req_compl(fl1h, msg, 0, cb); } /* allocate a msgb containing a GsmL1_Prim_t */ @@ -1012,7 +1018,7 @@ int l1if_activate_rf(struct femtol1_hdl *hdl, int on) sysp->id = SuperFemto_PrimId_DeactivateRfReq; } - return l1if_req_compl(hdl, msg, 1, activate_rf_compl_cb); + return l1if_req_compl(hdl, msg, activate_rf_compl_cb); } /* call-back on arrival of DSP+FPGA version + band capability */ @@ -1064,7 +1070,7 @@ static int l1if_get_info(struct femtol1_hdl *hdl) sysp->id = SuperFemto_PrimId_SystemInfoReq; - return l1if_req_compl(hdl, msg, 1, info_compl_cb); + return l1if_req_compl(hdl, msg, info_compl_cb); } static int reset_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp) @@ -1112,7 +1118,7 @@ int l1if_reset(struct femtol1_hdl *hdl) SuperFemto_Prim_t *sysp = msgb_sysprim(msg); sysp->id = SuperFemto_PrimId_Layer1ResetReq; - return l1if_req_compl(hdl, msg, 1, reset_compl_cb); + return l1if_req_compl(hdl, msg, reset_compl_cb); } /* set the trace flags within the DSP */ diff --git a/src/osmo-bts-sysmo/l1_if.h b/src/osmo-bts-sysmo/l1_if.h index c7b5f645..d564e3dc 100644 --- a/src/osmo-bts-sysmo/l1_if.h +++ b/src/osmo-bts-sysmo/l1_if.h @@ -69,7 +69,7 @@ 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, - int is_system_prim, l1if_compl_cb *cb); + l1if_compl_cb *cb); int l1if_gsm_req_compl(struct femtol1_hdl *fl1h, struct msgb *msg, l1if_compl_cb *cb); |