This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgReview at https://gerrit.osmocom.org/6703 host/trxcon/l1ctl.c: implement L1CTL_FBSB_CONF Change-Id: I33e4702d590a8d67285410fc8f1241bb9d4c50fc --- M src/host/trxcon/l1ctl.c M src/host/trxcon/l1ctl.h M src/host/trxcon/l1ctl_link.h M src/host/trxcon/sched_lchan_desc.c M src/host/trxcon/sched_lchan_handlers.c 5 files changed, 37 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/03/6703/1 diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c index ab73194..255177e 100644 --- a/src/host/trxcon/l1ctl.c +++ b/src/host/trxcon/l1ctl.c @@ -126,6 +126,31 @@ return l1ctl_link_send(l1l, msg); } +int l1ctl_tx_fbsb_conf(struct l1ctl_link *l1l, uint8_t result, uint8_t bsic) +{ + struct l1ctl_fbsb_conf *conf; + struct msgb *msg; + + msg = l1ctl_alloc_msg(L1CTL_FBSB_CONF); + if (msg == NULL) + return -ENOMEM; + + LOGP(DL1C, LOGL_DEBUG, "Send FBSB Conf (result=%u, bsic=%u)\n", + result, bsic); + + conf = (struct l1ctl_fbsb_conf *) msgb_put(msg, sizeof(*conf)); + conf->result = result; + conf->bsic = bsic; + + /* FIXME: set proper value */ + conf->initial_freq_err = 0; + + /* Ask SCH handler not to send L1CTL_FBSB_CONF anymore */ + l1l->fbsb_conf_sent = 1; + + return l1ctl_link_send(l1l, msg); +} + int l1ctl_tx_data_ind(struct l1ctl_link *l1l, struct l1ctl_info_dl *data) { struct l1ctl_info_dl *dl; @@ -176,6 +201,9 @@ else sched_trx_configure_ts(l1l->trx, 0, GSM_PCHAN_CCCH); + /* Ask SCH handler to send L1CTL_FBSB_CONF */ + l1l->fbsb_conf_sent = 0; + /* Store current ARFCN */ l1l->trx->band_arfcn = band_arfcn; diff --git a/src/host/trxcon/l1ctl.h b/src/host/trxcon/l1ctl.h index 05a2c54..124074b 100644 --- a/src/host/trxcon/l1ctl.h +++ b/src/host/trxcon/l1ctl.h @@ -6,6 +6,7 @@ #include "l1ctl_link.h" #include "l1ctl_proto.h" +int l1ctl_tx_fbsb_conf(struct l1ctl_link *l1l, uint8_t result, uint8_t bsic); int l1ctl_tx_pm_conf(struct l1ctl_link *l1l, uint16_t band_arfcn, int dbm, int last); int l1ctl_tx_reset_conf(struct l1ctl_link *l1l, uint8_t type); diff --git a/src/host/trxcon/l1ctl_link.h b/src/host/trxcon/l1ctl_link.h index 43d187a..b310ee4 100644 --- a/src/host/trxcon/l1ctl_link.h +++ b/src/host/trxcon/l1ctl_link.h @@ -23,6 +23,9 @@ /* Bind TRX instance */ struct trx_instance *trx; + + /* L1CTL handlers specific */ + uint8_t fbsb_conf_sent; }; int l1ctl_link_init(struct l1ctl_link **l1l, const char *sock_path); diff --git a/src/host/trxcon/sched_lchan_desc.c b/src/host/trxcon/sched_lchan_desc.c index 1ff6e14..f82a982 100644 --- a/src/host/trxcon/sched_lchan_desc.c +++ b/src/host/trxcon/sched_lchan_desc.c @@ -71,7 +71,7 @@ { TRXC_SCH, "SCH", 0x00, LID_DEDIC, - 0x00, 0x00, + 0x00, TRX_CH_FLAG_AUTO, /** * We already have clock indications from TRX, diff --git a/src/host/trxcon/sched_lchan_handlers.c b/src/host/trxcon/sched_lchan_handlers.c index 7c18fdd..4d53516 100644 --- a/src/host/trxcon/sched_lchan_handlers.c +++ b/src/host/trxcon/sched_lchan_handlers.c @@ -223,5 +223,9 @@ return -EINVAL; } + /* Send L1CTL_FBSB_CONF to higher layers */ + if (!trx->l1l->fbsb_conf_sent) + l1ctl_tx_fbsb_conf(trx->l1l, 0, bsic); + return 0; } -- To view, visit https://gerrit.osmocom.org/6703 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I33e4702d590a8d67285410fc8f1241bb9d4c50fc Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Harald Welte <laforge at gnumonks.org>