Commit 1b69c2a0 authored by Masayuki Harada's avatar Masayuki Harada

Remove pdcp_layer_init_for_CU function and merge to pdcp_layer_init.

parent 54666a93
...@@ -625,7 +625,6 @@ static void wait_nfapi_init(char *thread_name) { ...@@ -625,7 +625,6 @@ static void wait_nfapi_init(char *thread_name) {
void init_pdcp(void) { void init_pdcp(void) {
if (!NODE_IS_DU(RC.nrrrc[0]->node_type)) { if (!NODE_IS_DU(RC.nrrrc[0]->node_type)) {
// pdcp_layer_init(); // pdcp_layer_init();
// pdcp_layer_init_for_CU();
uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ? uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ?
(PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT; (PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
if (IS_SOFTMODEM_NOS1) { 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) ...@@ -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) { static void init_pdcp(void) {
if (!NODE_IS_DU(RC.nrrrc[0]->node_type)) { if (!NODE_IS_DU(RC.nrrrc[0]->node_type)) {
// pdcp_layer_init(); pdcp_layer_init();
// pdcp_layer_init_for_CU();
uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ? uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ?
(PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT; (PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
if (IS_SOFTMODEM_NOS1) { if (IS_SOFTMODEM_NOS1) {
...@@ -226,7 +225,6 @@ void *gNB_app_task(void *args_p) ...@@ -226,7 +225,6 @@ void *gNB_app_task(void *args_p)
LOG_E(F1AP, "Create task for F1AP CU failed\n"); LOG_E(F1AP, "Create task for F1AP CU failed\n");
AssertFatal(1==0,"exiting"); AssertFatal(1==0,"exiting");
} }
pdcp_layer_init_for_CU();
} }
if (NODE_IS_DU(RC.nrrrc[0]->node_type)) { if (NODE_IS_DU(RC.nrrrc[0]->node_type)) {
......
...@@ -2086,7 +2086,7 @@ void nr_read_config_and_init(void) { ...@@ -2086,7 +2086,7 @@ void nr_read_config_and_init(void) {
} }
if (NODE_IS_CU(RC.nrrrc[0]->node_type)) { if (NODE_IS_CU(RC.nrrrc[0]->node_type)) {
pdcp_layer_init_for_CU(); pdcp_layer_init();
// nr_DRB_preconfiguration(0x1234); // nr_DRB_preconfiguration(0x1234);
rrc_init_nr_global_param(); rrc_init_nr_global_param();
} }
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#ifndef _NR_PDCP_H_ #ifndef _NR_PDCP_H_
#define _NR_PDCP_H_ #define _NR_PDCP_H_
void pdcp_layer_init_for_CU(void);
void nr_pdcp_layer_init_ue(void); void nr_pdcp_layer_init_ue(void);
void nr_DRB_preconfiguration(uint16_t crnti); void nr_DRB_preconfiguration(uint16_t crnti);
......
...@@ -369,25 +369,12 @@ void pdcp_layer_init(void) ...@@ -369,25 +369,12 @@ void pdcp_layer_init(void)
if (pthread_mutex_unlock(&m) != 0) abort(); if (pthread_mutex_unlock(&m) != 0) abort();
nr_pdcp_ue_manager = new_nr_pdcp_ue_manager(1); nr_pdcp_ue_manager = new_nr_pdcp_ue_manager(1);
init_nr_rlc_data_req_queue();
nr_pdcp_init_timer_thread(nr_pdcp_ue_manager); if ((RC.nrrrc == NULL) || (!NODE_IS_CU(RC.nrrrc[0]->node_type))) {
} init_nr_rlc_data_req_queue();
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); nr_pdcp_init_timer_thread(nr_pdcp_ue_manager);
} }
#include "nfapi/oai_integration/vendor_ext.h" #include "nfapi/oai_integration/vendor_ext.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment