diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-09-16 14:46:00 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-09-16 19:31:44 +0200 |
commit | 03e9972695df47ecc42f89e7cd4e157a95909133 (patch) | |
tree | 60443ca733f27cdd7e13822d7784c4b7deab208d | |
parent | c9079d91069eaadf181a6e26e3c7205f1f05cbda (diff) |
Improve logging and error handling receiving act_req for dyn TS not yet configured
Something is wrong currently with dynamic TS and PDCH activation.
Apparently there's a race condition between activation in BTS lower
layers (example in TRXC) and against PCU.
Currently, when a GSM_PCHAN_TCH_F_TCH_H_PDCH is configured, we set
ts->dyn.pchan_want = GSM_PCHAN_PDCH and submit the async activation
through lower layers (CMD SETSLOT), and once the lower layer acks it we
set ts->dyn.pchan_is = pchan_want (when receiving RSP SETSLOT). However,
we seem to be advertising available TS to PCU based on pchan_want,
instead of pchan_is, which means we advertise channels not yet fully
configured. As a result, we may receive a Channel Act coming from PCU
for a given TS for which we didn't receive confirmation from upper
layers, meaning pchan_is is still GSM_PCHAN_NONE. This is by no means
expected in following code, so let's avoid going further over it.
Actual issue will be fixed in follow-up patch.
Change-Id: I9edb5b8a14ffaed3e24c10c2c7a3f618e05f3a01
-rw-r--r-- | src/common/pcu_sock.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index aee42ea7..34489b78 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -689,6 +689,14 @@ static int pcu_rx_act_req(struct gsm_bts *bts, gsm_lchant_name(lchan->type)); return -EINVAL; } + if (lchan->ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH && + lchan->ts->dyn.pchan_is != GSM_PCHAN_PDCH) { + LOGP(DPCU, LOGL_ERROR, + "%s request, but lchan in dyn TS is not configured as PDCH in lower layers (is %s)\n", + (act_req->activate) ? "Activate" : "Deactivate", + gsm_pchan_name(lchan->ts->dyn.pchan_is)); + return -EINVAL; + } if (act_req->activate) l1sap_chan_act(trx, gsm_lchan2chan_nr(lchan), NULL); else |