From 59d2809450d8df414963129835456d1eeb1759da Mon Sep 17 00:00:00 2001 From: francescomani Date: Thu, 13 Feb 2025 16:48:23 +0100 Subject: [PATCH] remove nr_rrc_extern.h --- doc/Doxyfile | 1 - openair1/SIMULATION/NR_PHY/psbchsim.c | 1 - openair2/GNB_APP/gnb_config.c | 1 - openair2/RRC/LTE/rrc_vars.h | 1 - openair2/RRC/NR/MESSAGES/asn1_msg.c | 1 - openair2/RRC/NR/nr_rrc_extern.h | 38 --------------------------- openair2/RRC/NR/nr_rrc_proto.h | 2 +- openair2/RRC/NR/rrc_gNB.c | 19 +++++++------- 8 files changed, 11 insertions(+), 53 deletions(-) delete mode 100644 openair2/RRC/NR/nr_rrc_extern.h diff --git a/doc/Doxyfile b/doc/Doxyfile index bc2fb2411f..f283009fb2 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -1862,7 +1862,6 @@ INPUT = \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/nr_rrc_config.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_radio_bearers.h \ -@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/nr_rrc_extern.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_reconfig.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_NGAP.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/mac_rrc_dl_f1ap.c \ diff --git a/openair1/SIMULATION/NR_PHY/psbchsim.c b/openair1/SIMULATION/NR_PHY/psbchsim.c index 23803e133f..a4353bae14 100644 --- a/openair1/SIMULATION/NR_PHY/psbchsim.c +++ b/openair1/SIMULATION/NR_PHY/psbchsim.c @@ -37,7 +37,6 @@ #include "openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h" #include "openair1/SIMULATION/TOOLS/sim.h" #include "common/utils/nr/nr_common.h" -#include "openair2/RRC/NR/nr_rrc_extern.h" #include "openair2/RRC/LTE/rrc_vars.h" #include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h" #include "PHY/INIT/nr_phy_init.h" diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index b345277aec..541e284f86 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -44,7 +44,6 @@ #include "PHY/defs_gNB.h" #include "PHY/defs_nr_common.h" #include "RRC/NR/nr_rrc_config.h" -#include "RRC/NR/nr_rrc_extern.h" #include "RRC_nr_paramsvalues.h" #include "T.h" #include "asn_SEQUENCE_OF.h" diff --git a/openair2/RRC/LTE/rrc_vars.h b/openair2/RRC/LTE/rrc_vars.h index 5574708e44..75c56d2273 100644 --- a/openair2/RRC/LTE/rrc_vars.h +++ b/openair2/RRC/LTE/rrc_vars.h @@ -35,7 +35,6 @@ #include "LAYER2/RLC/rlc.h" #include "COMMON/mac_rrc_primitives.h" #include "LAYER2/MAC/mac.h" -#include "openair2/RRC/NR/nr_rrc_extern.h" UE_PF_PO_t UE_PF_PO[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; pthread_mutex_t ue_pf_po_mutex; diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index e3df557d3d..8b30f4b0ea 100644 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -49,7 +49,6 @@ #include "openair3/SECU/key_nas_deriver.h" -#include "RRC/NR/nr_rrc_extern.h" #include "NR_DL-CCCH-Message.h" #include "NR_UL-CCCH-Message.h" #include "NR_DL-DCCH-Message.h" diff --git a/openair2/RRC/NR/nr_rrc_extern.h b/openair2/RRC/NR/nr_rrc_extern.h deleted file mode 100644 index 66483214a7..0000000000 --- a/openair2/RRC/NR/nr_rrc_extern.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file nr_rrc_extern.h -* \brief rrc external vars -* \author Navid Nikaein and Raymond Knopp, WEI-TAI CHEN -* \date 2011, 2018 -* \version 1.0 -* \company Eurecom, NTUST -* \email: navid.nikaein@eurecom.fr, kroempa@gmail.com -*/ - -#ifndef __OPENAIR_NR_RRC_EXTERN_H__ -#define __OPENAIR_NR_RRC_EXTERN_H__ -#include "nr_rrc_defs.h" -#include "COMMON/mac_rrc_primitives.h" -#include "LAYER2/RLC/rlc.h" -#include "openair2/RRC/common.h" -void openair_rrc_gNB_configuration(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *configuration); -#endif diff --git a/openair2/RRC/NR/nr_rrc_proto.h b/openair2/RRC/NR/nr_rrc_proto.h index e874e29bfb..7dd2fff8a3 100644 --- a/openair2/RRC/NR/nr_rrc_proto.h +++ b/openair2/RRC/NR/nr_rrc_proto.h @@ -129,5 +129,5 @@ void rrc_gNB_generate_UeContextModificationRequest(const gNB_RRC_INST *rrc, pdusession_level_qos_parameter_t *get_qos_characteristics(const int qfi, rrc_pdu_session_param_t *pduSession); f1ap_qos_characteristics_t get_qos_char_from_qos_flow_param(const pdusession_level_qos_parameter_t *qos_param); - +void openair_rrc_gNB_configuration(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *configuration); #endif diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 281af514fa..4e150365aa 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -76,7 +76,6 @@ #include "nr_pdcp/nr_pdcp_entity.h" #include "nr_pdcp/nr_pdcp_oai_api.h" #include "nr_rrc_defs.h" -#include "nr_rrc_extern.h" #include "oai_asn1.h" #include "openair2/F1AP/f1ap_common.h" #include "openair2/F1AP/f1ap_ids.h" @@ -270,8 +269,7 @@ void openair_rrc_gNB_configuration(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *c rrc->configuration = *configuration; /// System Information INIT init_NR_SI(rrc); - return; -} // END openair_rrc_gNB_configuration +} static void rrc_gNB_process_AdditionRequestInformation(const module_id_t gnb_mod_idP, x2ap_ENDC_sgnb_addition_req_t *m) { @@ -421,12 +419,13 @@ static void rrc_gNB_generate_RRCSetup(instance_t instance, freeSRBlist(SRBs); f1_ue_data_t ue_data = cu_get_f1_ue_data(ue_p->rrc_ue_id); RETURN_IF_INVALID_ASSOC_ID(ue_data.du_assoc_id); + int srbid = 0; f1ap_dl_rrc_message_t dl_rrc = { .gNB_CU_ue_id = ue_p->rrc_ue_id, .gNB_DU_ue_id = ue_data.secondary_ue, .rrc_container = buf, .rrc_container_length = size, - .srb_id = CCCH + .srb_id = srbid }; rrc->mac_rrc.dl_rrc_message_transfer(ue_data.du_assoc_id, &dl_rrc); } @@ -451,12 +450,13 @@ static void rrc_gNB_generate_RRCReject(module_id_t module_id, rrc_gNB_ue_context f1_ue_data_t ue_data = cu_get_f1_ue_data(ue_p->rrc_ue_id); RETURN_IF_INVALID_ASSOC_ID(ue_data.du_assoc_id); + int srbid = 0; f1ap_dl_rrc_message_t dl_rrc = { .gNB_CU_ue_id = ue_p->rrc_ue_id, .gNB_DU_ue_id = ue_data.secondary_ue, .rrc_container = buf, .rrc_container_length = size, - .srb_id = CCCH, + .srb_id = srbid, .execute_duplication = 1, .RAT_frequency_priority_information.en_dc = 0 }; @@ -2026,19 +2026,20 @@ static void rrc_CU_process_ue_context_release_request(MessageDef *msg_p, sctp_as gNB_RRC_INST *rrc = RC.nrrrc[instance]; rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context(rrc, req->gNB_CU_ue_id); // TODO what happens if no AMF connected? should also handle, set an_release true + int srbid = 1; if (!ue_context_p) { LOG_W(RRC, "could not find UE context for CU UE ID %u: auto-generate release command\n", req->gNB_CU_ue_id); - uint8_t buffer[RRC_BUF_SIZE] = {0}; - int size = do_NR_RRCRelease(buffer, RRC_BUF_SIZE, rrc_gNB_get_next_transaction_identifier(0)); + uint8_t buffer[NR_RRC_BUF_SIZE] = {0}; + int size = do_NR_RRCRelease(buffer, NR_RRC_BUF_SIZE, rrc_gNB_get_next_transaction_identifier(0)); f1ap_ue_context_release_cmd_t ue_context_release_cmd = { .gNB_CU_ue_id = req->gNB_CU_ue_id, .gNB_DU_ue_id = req->gNB_DU_ue_id, .cause = F1AP_CAUSE_RADIO_NETWORK, .cause_value = 10, // 10 = F1AP_CauseRadioNetwork_normal_release - .srb_id = DCCH, + .srb_id = srbid, }; deliver_ue_ctxt_release_data_t data = {.rrc = rrc, .release_cmd = &ue_context_release_cmd}; - nr_pdcp_data_req_srb(req->gNB_CU_ue_id, DCCH, rrc_gNB_mui++, size, buffer, rrc_deliver_ue_ctxt_release_cmd, &data); + nr_pdcp_data_req_srb(req->gNB_CU_ue_id, srbid, rrc_gNB_mui++, size, buffer, rrc_deliver_ue_ctxt_release_cmd, &data); return; }