From 7bbc46dbace217770646f363cf3c7aab7950d6d0 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Mon, 24 Jul 2023 11:30:07 +0200 Subject: [PATCH] pdcp_config_req_asn1 bug fix --- openair2/LAYER2/PDCP_v10.1.0/pdcp.c | 63 ++++++++++++++++++++--------- openair2/LAYER2/PDCP_v10.1.0/pdcp.h | 36 ----------------- 2 files changed, 45 insertions(+), 54 deletions(-) diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index b52f3fb9b4..2dcc3e429d 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -135,6 +135,36 @@ pdcp_enb_t pdcp_enb[MAX_NUM_CCs]; extern int oai_exit; pthread_t pdcp_stats_thread_desc; +/*! \fn bool pdcp_config_req_asn1 (const protocol_ctxt_t* const ctxt_pP, srb_flag_t srb_flagP, uint32_t action, rb_id_t rb_id, + * uint8_t rb_sn, uint8_t rb_report, uint16_t header_compression_profile, uint8_t security_mode) \brief Function for RRC to + * configure a Radio Bearer. \param[in] ctxt_pP Running context. \param[in] pdcp_pP Pointer on PDCP + * structure. \param[in] enb_mod_idP Virtualized enb module identifier, Not used if eNB_flagP = 0. \param[in] ue_mod_idP + * Virtualized ue module identifier. \param[in] frame Frame index. \param[in] eNB_flag Flag to indicate eNB + * (1) or UE (0) \param[in] srb_flagP Flag to indicate SRB (1) or DRB (0) \param[in] action add, remove, + * modify a RB \param[in] rb_id radio bearer id \param[in] rb_sn sequence number for this radio bearer + * \param[in] drb_report set a pdcp report for this drb + * \param[in] header_compression set the rohc profile + * \param[in] security_mode set the integrity and ciphering algs + * \param[in] kRRCenc RRC encryption key + * \param[in] kRRCint RRC integrity key + * \param[in] kUPenc User-Plane encryption key + * \return A status about the processing, OK or error code. + */ +static bool pdcp_config_req_asn1(const protocol_ctxt_t *const ctxt_pP, + pdcp_t *const pdcp_pP, + const srb_flag_t srb_flagP, + const rlc_mode_t rlc_modeP, + const config_action_t actionP, + const uint16_t lc_idP, + const uint16_t mch_idP, + const rb_id_t rb_idP, + const uint8_t rb_snP, + const uint8_t rb_reportP, + const uint16_t header_compression_profileP, + const uint8_t security_modeP, + uint8_t *const kRRCenc_pP, + uint8_t *const kRRCint_pP, + uint8_t *const kUPenc_pP); void *pdcp_stats_thread(void *param) { @@ -1880,24 +1910,21 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP, return 0; } - -//----------------------------------------------------------------------------- -bool -pdcp_config_req_asn1(const protocol_ctxt_t *const ctxt_pP, - pdcp_t *const pdcp_pP, - const srb_flag_t srb_flagP, - const rlc_mode_t rlc_modeP, - const config_action_t actionP, - const uint16_t lc_idP, - const uint16_t mch_idP, - const rb_id_t rb_idP, - const uint8_t rb_snP, - const uint8_t rb_reportP, - const uint16_t header_compression_profileP, - const uint8_t security_modeP, - uint8_t *const kRRCenc_pP, - uint8_t *const kRRCint_pP, - uint8_t *const kUPenc_pP) +static bool pdcp_config_req_asn1(const protocol_ctxt_t *const ctxt_pP, + pdcp_t *const pdcp_pP, + const srb_flag_t srb_flagP, + const rlc_mode_t rlc_modeP, + const config_action_t actionP, + const uint16_t lc_idP, + const uint16_t mch_idP, + const rb_id_t rb_idP, + const uint8_t rb_snP, + const uint8_t rb_reportP, + const uint16_t header_compression_profileP, + const uint8_t security_modeP, + uint8_t *const kRRCenc_pP, + uint8_t *const kRRCint_pP, + uint8_t *const kUPenc_pP) //----------------------------------------------------------------------------- { diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h index 9f4cdefb3b..1f1a9ae740 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h @@ -322,42 +322,6 @@ bool rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP, LTE_PMCH_InfoList_r9_t *pmch_InfoList_r9, rb_id_t *const defaultDRB); -/*! \fn bool pdcp_config_req_asn1 (const protocol_ctxt_t* const ctxt_pP, srb_flag_t srb_flagP, uint32_t action, rb_id_t rb_id, uint8_t rb_sn, uint8_t rb_report, uint16_t header_compression_profile, uint8_t security_mode) -* \brief Function for RRC to configure a Radio Bearer. -* \param[in] ctxt_pP Running context. -* \param[in] pdcp_pP Pointer on PDCP structure. -* \param[in] enb_mod_idP Virtualized enb module identifier, Not used if eNB_flagP = 0. -* \param[in] ue_mod_idP Virtualized ue module identifier. -* \param[in] frame Frame index. -* \param[in] eNB_flag Flag to indicate eNB (1) or UE (0) -* \param[in] srb_flagP Flag to indicate SRB (1) or DRB (0) -* \param[in] action add, remove, modify a RB -* \param[in] rb_id radio bearer id -* \param[in] rb_sn sequence number for this radio bearer -* \param[in] drb_report set a pdcp report for this drb -* \param[in] header_compression set the rohc profile -* \param[in] security_mode set the integrity and ciphering algs -* \param[in] kRRCenc RRC encryption key -* \param[in] kRRCint RRC integrity key -* \param[in] kUPenc User-Plane encryption key -* \return A status about the processing, OK or error code. -*/ -bool pdcp_config_req_asn1(const protocol_ctxt_t *const ctxt_pP, - pdcp_t *const pdcp_pP, - const srb_flag_t srb_flagP, - const rlc_mode_t rlc_mode, - const uint32_t action, - const uint16_t lc_id, - const uint16_t mch_id, - const rb_id_t rb_id, - const uint8_t rb_sn, - const uint8_t rb_report, - const uint16_t header_compression_profile, - const uint8_t security_mode, - uint8_t *const kRRCenc, - uint8_t *const kRRCint, - uint8_t *const kUPenc); - /*! \fn void pdcp_add_UE(const protocol_ctxt_t* const ctxt_pP) * \brief Function (for RRC) to add a new UE in PDCP module * \param[in] ctxt_pP Running context.