diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2023-02-01 16:10:52 +0100 |
---|---|---|
committer | Philipp Maier <pmaier@sysmocom.de> | 2023-02-13 12:46:43 +0100 |
commit | 7c3fd98c90481c7b801cde0d9baa52aa462cd9c6 (patch) | |
tree | e78d84ac03428aa242493e912284c490899a3edb /src/pcu_l1_if.cpp | |
parent | d8cea3c618dbd2a343e6c012e5545006d44fc244 (diff) |
pcu_l1_if.cpp: handle TLLI based IMMEDIATE ASSIGNMENT confirmation
The IMMEDIATE ASSIGNMENT for downlink TBFs must be confirmed by the
receiving end (BSC/BTS) in order to set the timers in the PCU correctly.
When the PCU is used in a BSC co-located scheme (Ericsson RBS). The TLLI
is used as an identifier to confirm a specific IMMEDIATE ASSIGNMENT.
Change-Id: Icf7ca34500984239ee877ee71fd9c126b5eb3480
Related: OS#5198
Diffstat (limited to 'src/pcu_l1_if.cpp')
-rw-r--r-- | src/pcu_l1_if.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index 69629db9..02f56ac0 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -512,7 +512,7 @@ static int pcu_rx_data_cnf(struct gprs_rlcmac_bts *bts, struct gsm_pcu_if_data * switch (data_cnf->sapi) { case PCU_IF_SAPI_PCH: if (data_cnf->data[2] == GSM48_MT_RR_IMM_ASS) - bts_rcv_imm_ass_cnf(bts, data_cnf->data, data_cnf->fn); + bts_rcv_imm_ass_cnf(bts, data_cnf->data, GSM_RESERVED_TMSI, data_cnf->fn); break; default: LOGP(DL1IF, LOGL_ERROR, "Received PCU data confirm with " @@ -523,6 +523,26 @@ static int pcu_rx_data_cnf(struct gprs_rlcmac_bts *bts, struct gsm_pcu_if_data * return rc; } +static int pcu_rx_data_cnf_dt(struct gprs_rlcmac_bts *bts, struct gsm_pcu_if_data_cnf_dt *data_cnf_dt) +{ + int rc = 0; + int current_fn = bts_current_frame_number(bts); + + LOGP(DL1IF, LOGL_DEBUG, "Data confirm received: sapi=%d fn=%d cur_fn=%d\n", + data_cnf_dt->sapi, data_cnf_dt->fn, current_fn); + + switch (data_cnf_dt->sapi) { + case PCU_IF_SAPI_PCH: + bts_rcv_imm_ass_cnf(bts, NULL, data_cnf_dt->tlli, data_cnf_dt->fn); + break; + default: + LOGP(DL1IF, LOGL_ERROR, "Received PCU data confirm with unsupported sapi %d\n", data_cnf_dt->sapi); + rc = -EINVAL; + } + + return rc; +} + // FIXME: remove this, when changed from c++ to c. int pcu_rx_rts_req_pdtch(struct gprs_rlcmac_bts *bts, uint8_t trx, uint8_t ts, uint32_t fn, uint8_t block_nr) @@ -1133,6 +1153,10 @@ int pcu_rx(struct gsm_pcu_if *pcu_prim, size_t pcu_prim_length) CHECK_IF_MSG_SIZE(pcu_prim_length, pcu_prim->u.data_cnf); rc = pcu_rx_data_cnf(bts, &pcu_prim->u.data_cnf); break; + case PCU_IF_MSG_DATA_CNF_DT: + CHECK_IF_MSG_SIZE(pcu_prim_length, pcu_prim->u.data_cnf_dt); + rc = pcu_rx_data_cnf_dt(bts, &pcu_prim->u.data_cnf_dt); + break; case PCU_IF_MSG_RTS_REQ: CHECK_IF_MSG_SIZE(pcu_prim_length, pcu_prim->u.rts_req); rc = pcu_rx_rts_req(bts, &pcu_prim->u.rts_req); |