dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34192 )
Change subject: pcuif_proto: use confirmation flag in struct gsm_pcu_if_pch ......................................................................
pcuif_proto: use confirmation flag in struct gsm_pcu_if_pch
Use confirmed_imm_ass flag in struct gsm_pcu_if_pch instead of parsing the received MAC block.
Related: OS#5927 Depends: osmo-pcu.git Ia202862aafc1f0cb6601574ef61eb9155de11f04 Change-Id: I3d2842626b7e8325860ea3160c7d900d39e953a0 --- M include/osmocom/bsc/pcuif_proto.h M src/osmo-bsc/pcu_sock.c 2 files changed, 19 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/92/34192/1
diff --git a/include/osmocom/bsc/pcuif_proto.h b/include/osmocom/bsc/pcuif_proto.h index bf49b06..65a0610 100644 --- a/include/osmocom/bsc/pcuif_proto.h +++ b/include/osmocom/bsc/pcuif_proto.h @@ -271,6 +271,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 MAC block contains an IMMEDIATE ASSIGNMENT message, + * for which a confirmation is required. */ + bool confirmed_imm_ass; } __attribute__((packed));
struct gsm_pcu_if { diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c index 6f48f0f..0a280a5 100644 --- a/src/osmo-bsc/pcu_sock.c +++ b/src/osmo-bsc/pcu_sock.c @@ -528,7 +528,6 @@ uint8_t pag_grp; int rc = 0; struct gsm_pcu_if_pch *pch; - struct gsm48_imm_ass *gsm48_imm_ass;
LOG_BTS(bts, DPCU, LOGL_DEBUG, "Data request received: sapi=%s arfcn=%d " "block=%d data=%s\n", sapi_string[data_req->sapi], @@ -550,9 +549,9 @@ pch = (struct gsm_pcu_if_pch *)data_req->data; pag_grp = gsm0502_calc_paging_group(&bts->si_common.chan_desc, str_to_imsi(pch->imsi));
- gsm48_imm_ass = (struct gsm48_imm_ass *)pch->data; - if (gsm48_imm_ass->msg_type == GSM48_MT_RR_IMM_ASS) + if (pch->confirmed_imm_ass) return pcu_rx_rr_imm_ass_pch(bts, pag_grp, pch); + return pcu_rx_rr_paging_pch(bts, pag_grp, pch); default: LOG_BTS(bts, DPCU, LOGL_ERROR, "Received PCU data request with "