dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/34191 )
Change subject: pcuif_proto: use confirm flag in struct gsm_pcu_if_pch ......................................................................
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 --- M include/osmo-bts/pcuif_proto.h M src/common/pcu_sock.c 2 files changed, 19 insertions(+), 5 deletions(-)
Approvals: pespin: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified fixeria: Looks good to me, approved
diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h index d584ba4..498d9d4 100644 --- a/include/osmo-bts/pcuif_proto.h +++ b/include/osmo-bts/pcuif_proto.h @@ -230,6 +230,9 @@ 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 2431e85..333937a 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -676,8 +676,6 @@ 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 @@ }
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: