diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2023-08-24 13:10:53 +0200 |
---|---|---|
committer | Philipp Maier <pmaier@sysmocom.de> | 2023-08-29 11:13:13 +0200 |
commit | 55a21dc1c3d63f46fcbb8a941385234239f24b08 (patch) | |
tree | 007b7d698602320561e68771ce92c02bf046fb34 | |
parent | b33502a39b98c0015385253e5713e21970e3c32e (diff) |
pcuif_proto: use confirm flag in struct gsm_pcu_if_pch
The PCU now sets a confirm flag in struct gsm_pcu_if_pch in case the MAC
block (data) requires a confirmation when sent. Use this confirm flag
instead of making the decision locally based on the MAC block contents.
Related: OS#5927
Depends: osmo-pcu.git Ia202862aafc1f0cb6601574ef61eb9155de11f04
Change-Id: I3364d2268bdef9c4d2feeb8e3d51a64e34bca68c
-rw-r--r-- | include/osmo-bts/pcuif_proto.h | 3 | ||||
-rw-r--r-- | src/common/pcu_sock.c | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h index d584ba48..498d9d44 100644 --- a/include/osmo-bts/pcuif_proto.h +++ b/include/osmo-bts/pcuif_proto.h @@ -230,6 +230,9 @@ struct gsm_pcu_if_pch { char imsi[OSMO_IMSI_BUF_SIZE]; /* GSM mac-block (with immediate assignment message) */ uint8_t data[GSM_MACBLOCK_LEN]; + /* Set to true in case the receiving end must send a confirmation + * when the MAC block (data) has been sent. */ + bool confirm; } __attribute__((packed)); struct gsm_pcu_if { diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index 2431e85a..333937ad 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -676,8 +676,6 @@ static int pcu_rx_data_req(struct gsm_bts *bts, uint8_t msg_type, case PCU_IF_SAPI_PCH_2: { const struct gsm_pcu_if_pch *gsm_pcu_if_pch; - const struct gsm48_imm_ass *gsm48_imm_ass; - bool confirm; if (OSMO_UNLIKELY(data_req->len != sizeof(*gsm_pcu_if_pch))) { LOGP(DPCU, LOGL_ERROR, "Rx malformed DATA.req for PCH\n"); @@ -686,10 +684,8 @@ static int pcu_rx_data_req(struct gsm_bts *bts, uint8_t msg_type, } gsm_pcu_if_pch = (struct gsm_pcu_if_pch *)data_req->data; - gsm48_imm_ass = (struct gsm48_imm_ass *)gsm_pcu_if_pch->data; - confirm = (gsm48_imm_ass->msg_type == GSM48_MT_RR_IMM_ASS); rc = paging_add_macblock(bts->paging_state, gsm_pcu_if_pch->msg_id, - gsm_pcu_if_pch->imsi, confirm, gsm_pcu_if_pch->data); + gsm_pcu_if_pch->imsi, gsm_pcu_if_pch->confirm, gsm_pcu_if_pch->data); break; } case PCU_IF_SAPI_AGCH: |