diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2019-05-29 18:53:14 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2019-05-29 18:53:31 +0700 |
commit | 043136937a836236a9f013b0278a3ffeba51f4f4 (patch) | |
tree | 6555919f2a93c53fbf46d5cf03fe5838de5ad5f6 /src/host | |
parent | 1efe26f41a7fa5bd10dd0c4bf6c1df60c92fd807 (diff) |
trxcon/l1ctl.c: on L1CTL_DM_EST_REQ, determine pchan_config first
It makes sense to do this first, before tuning to a different
ARFCN and changing the training sequence. Otherwise, if no
multi-frame configuration is found, trxcon would switch to
a different channel and then remain inactive there.
Change-Id: I274588ce3a9c49372b5da0629930afece46f799c
Diffstat (limited to 'src/host')
-rw-r--r-- | src/host/trxcon/l1ctl.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c index d7452952..fff1c2b9 100644 --- a/src/host/trxcon/l1ctl.c +++ b/src/host/trxcon/l1ctl.c @@ -637,6 +637,14 @@ static int l1ctl_rx_dm_est_req(struct l1ctl_link *l1l, struct msgb *msg) "(tn=%u, chan_nr=0x%02x, tsc=%u, tch_mode=0x%02x)\n", tn, chan_nr, est_req->tsc, est_req->tch_mode); + /* Determine channel config */ + config = sched_trx_chan_nr2pchan_config(chan_nr); + if (config == GSM_PCHAN_NONE) { + LOGP(DL1C, LOGL_ERROR, "Couldn't determine channel config\n"); + rc = -EINVAL; + goto exit; + } + /* Frequency hopping? */ if (est_req->h) rc = l1ctl_proc_est_req_h1(l1l->trx, &est_req->h1); @@ -648,14 +656,6 @@ static int l1ctl_rx_dm_est_req(struct l1ctl_link *l1l, struct msgb *msg) /* Update TSC (Training Sequence Code) */ l1l->trx->tsc = est_req->tsc; - /* Determine channel config */ - config = sched_trx_chan_nr2pchan_config(chan_nr); - if (config == GSM_PCHAN_NONE) { - LOGP(DL1C, LOGL_ERROR, "Couldn't determine channel config\n"); - rc = -EINVAL; - goto exit; - } - /* Configure requested TS */ rc = sched_trx_configure_ts(l1l->trx, tn, config); ts = l1l->trx->ts_list[tn]; |