Remove pdcp_layer_init_for_CU function and merge to pdcp_layer_init.
This commit is contained in:
@@ -625,7 +625,6 @@ static void wait_nfapi_init(char *thread_name) {
|
||||
void init_pdcp(void) {
|
||||
if (!NODE_IS_DU(RC.nrrrc[0]->node_type)) {
|
||||
// pdcp_layer_init();
|
||||
// pdcp_layer_init_for_CU();
|
||||
uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ?
|
||||
(PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
|
||||
if (IS_SOFTMODEM_NOS1) {
|
||||
|
||||
@@ -135,8 +135,7 @@ static uint32_t gNB_app_register_x2(uint32_t gnb_id_start, uint32_t gnb_id_end)
|
||||
|
||||
static void init_pdcp(void) {
|
||||
if (!NODE_IS_DU(RC.nrrrc[0]->node_type)) {
|
||||
// pdcp_layer_init();
|
||||
// pdcp_layer_init_for_CU();
|
||||
pdcp_layer_init();
|
||||
uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ?
|
||||
(PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
|
||||
if (IS_SOFTMODEM_NOS1) {
|
||||
@@ -226,7 +225,6 @@ void *gNB_app_task(void *args_p)
|
||||
LOG_E(F1AP, "Create task for F1AP CU failed\n");
|
||||
AssertFatal(1==0,"exiting");
|
||||
}
|
||||
pdcp_layer_init_for_CU();
|
||||
}
|
||||
|
||||
if (NODE_IS_DU(RC.nrrrc[0]->node_type)) {
|
||||
|
||||
@@ -2086,7 +2086,7 @@ void nr_read_config_and_init(void) {
|
||||
}
|
||||
|
||||
if (NODE_IS_CU(RC.nrrrc[0]->node_type)) {
|
||||
pdcp_layer_init_for_CU();
|
||||
pdcp_layer_init();
|
||||
// nr_DRB_preconfiguration(0x1234);
|
||||
rrc_init_nr_global_param();
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#ifndef _NR_PDCP_H_
|
||||
#define _NR_PDCP_H_
|
||||
|
||||
void pdcp_layer_init_for_CU(void);
|
||||
void nr_pdcp_layer_init_ue(void);
|
||||
void nr_DRB_preconfiguration(uint16_t crnti);
|
||||
|
||||
|
||||
@@ -369,27 +369,14 @@ void pdcp_layer_init(void)
|
||||
if (pthread_mutex_unlock(&m) != 0) abort();
|
||||
|
||||
nr_pdcp_ue_manager = new_nr_pdcp_ue_manager(1);
|
||||
init_nr_rlc_data_req_queue();
|
||||
|
||||
if ((RC.nrrrc == NULL) || (!NODE_IS_CU(RC.nrrrc[0]->node_type))) {
|
||||
init_nr_rlc_data_req_queue();
|
||||
}
|
||||
|
||||
nr_pdcp_init_timer_thread(nr_pdcp_ue_manager);
|
||||
}
|
||||
|
||||
void pdcp_layer_init_for_CU(void)
|
||||
{
|
||||
/* hack: be sure to initialize only once */
|
||||
static pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;
|
||||
static int initialized = 0;
|
||||
if (pthread_mutex_lock(&m) != 0) abort();
|
||||
if (initialized) {
|
||||
if (pthread_mutex_unlock(&m) != 0) abort();
|
||||
return;
|
||||
}
|
||||
initialized = 1;
|
||||
if (pthread_mutex_unlock(&m) != 0) abort();
|
||||
|
||||
nr_pdcp_ue_manager = new_nr_pdcp_ue_manager(1);
|
||||
}
|
||||
|
||||
#include "nfapi/oai_integration/vendor_ext.h"
|
||||
#include "targets/RT/USER/lte-softmodem.h"
|
||||
#include "openair2/RRC/NAS/nas_config.h"
|
||||
|
||||
Reference in New Issue
Block a user