Use (std) bool instead of custom bool types

OAI is riddled with boolean_t, FALSE, TRUE, etc. This makes no sense, as
there is a standard bool type, and could lead to nasty bugs if a
definition of a bool is non-standard (0 == false, true == !false). This
commit removes all non-standard bools in the whole project.
This commit is contained in:
Robert Schmidt
2022-06-27 10:07:48 +02:00
parent 6d030ea2fa
commit 0b91791f67
176 changed files with 1414 additions and 1573 deletions
+2 -2
View File
@@ -217,7 +217,7 @@ void oai_create_enb(void) {
}
// This will cause phy_config_request to be installed. That will result in RRC configuring the PHY
// that will result in eNB->configured being set to TRUE.
// that will result in eNB->configured being set to true.
// See we need to wait for that to happen otherwise the NFAPI message exchanges won't contain the right parameter values
if (RC.eNB[0][0]->if_inst==0 || RC.eNB[0][0]->if_inst->PHY_config_req==0 || RC.eNB[0][0]->if_inst->schedule_response==0) {
NFAPI_TRACE(NFAPI_TRACE_INFO, "RC.eNB[0][0]->if_inst->PHY_config_req is not installed - install it\n");
@@ -267,7 +267,7 @@ void oai_create_gnb(void) {
// This will cause phy_config_request to be installed. That will result in RRC configuring the PHY
// that will result in gNB->configured being set to TRUE.
// that will result in gNB->configured being set to true.
// See we need to wait for that to happen otherwise the NFAPI message exchanges won't contain the right parameter values
if (RC.gNB[0]->if_inst==0 || RC.gNB[0]->if_inst->NR_PHY_config_req==0 || RC.gNB[0]->if_inst->NR_Schedule_response==0) {
NFAPI_TRACE(NFAPI_TRACE_INFO, "RC.gNB[0][0]->if_inst->NR_PHY_config_req is not installed - install it\n");
+2 -2
View File
@@ -1997,7 +1997,7 @@ int get_narrowband_index(int N_RB_UL,int rb) {
void fill_ulsch(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_ulsch_pdu *ulsch_pdu,int frame,int subframe) {
uint8_t harq_pid;
//uint8_t UE_id;
boolean_t new_ulsch = (find_ulsch(ulsch_pdu->ulsch_pdu_rel8.rnti,eNB,SEARCH_EXIST)==-1) ? TRUE : FALSE;
const bool new_ulsch = find_ulsch(ulsch_pdu->ulsch_pdu_rel8.rnti,eNB,SEARCH_EXIST) == -1;
//AssertFatal((UE_id=find_ulsch(ulsch_pdu->ulsch_pdu_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE))>=0,
// "No existing/free UE ULSCH for rnti %x\n",ulsch_pdu->ulsch_pdu_rel8.rnti);
LTE_eNB_ULSCH_t *ulsch=eNB->ulsch[UE_id];
@@ -2063,7 +2063,7 @@ void fill_ulsch(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_ulsch_pdu *ulsch_pdu
if ((ulsch->harq_processes[harq_pid]->status == SCH_IDLE) ||
(ulsch->harq_processes[harq_pid]->ndi != ulsch_pdu->ulsch_pdu_rel8.new_data_indication) ||
(new_ulsch == TRUE)) {
(new_ulsch == true)) {
ulsch->harq_processes[harq_pid]->status = ACTIVE;
ulsch->harq_processes[harq_pid]->TBS = ulsch_pdu->ulsch_pdu_rel8.size<<3;
ulsch->harq_processes[harq_pid]->Msc_initial = 12*ulsch_pdu->ulsch_pdu_rel8.number_of_resource_blocks;
+1 -1
View File
@@ -509,7 +509,7 @@ typedef struct {
/// Position of first CCE of the dci
int firstCCE;
/// flag to indicate that this is a RA response
boolean_t ra_flag;
bool ra_flag;
/// rnti
rnti_t rnti;
/// Format
@@ -342,7 +342,7 @@ typedef struct {
/// Position of first CCE of the dci
int firstCCE;
/// flag to indicate that this is a RA response
boolean_t ra_flag;
bool ra_flag;
/// rnti
rnti_t rnti;
/// rnti type
+2 -2
View File
@@ -34,7 +34,7 @@ typedef struct OAIgraph {
int h;
int waterFallh;
double *waterFallAvg;
boolean_t initDone;
bool initDone;
int iteration;
void (*funct) (struct OAIgraph *graph, calibData_t *);
} OAIgraph_t;
@@ -159,7 +159,7 @@ static void oai_xygraph_getbuff(OAIgraph_t *graph, float **x, float **y, int len
*y=old_y;
}
static void oai_xygraph(OAIgraph_t *graph, float *x, float *y, int len, int layer, boolean_t NoAutoScale) {
static void oai_xygraph(OAIgraph_t *graph, float *x, float *y, int len, int layer, bool NoAutoScale) {
fl_redraw_object(graph->graph);
if ( NoAutoScale && graph->iteration%NoAutoScale == 0) {
+2 -2
View File
@@ -60,7 +60,7 @@ typedef struct OAIgraph {
int h;
int waterFallh;
double *waterFallAvg;
boolean_t initDone;
bool initDone;
int iteration;
void (*gNBfunct) (struct OAIgraph *graph, scopeData_t *p, int UE_id);
void (*nrUEfunct)(scopeGraphData_t **data, struct OAIgraph *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id);
@@ -208,7 +208,7 @@ static void oai_xygraph_getbuff(OAIgraph_t *graph, float **x, float **y, int len
*y=old_y;
}
static void oai_xygraph(OAIgraph_t *graph, float *x, float *y, int len, int layer, boolean_t NoAutoScale) {
static void oai_xygraph(OAIgraph_t *graph, float *x, float *y, int len, int layer, bool NoAutoScale) {
fl_redraw_object(graph->graph);
if ( NoAutoScale && graph->iteration%NoAutoScale == 0) {
+3 -3
View File
@@ -754,7 +754,7 @@ typedef struct {
/// Position of first CCE of the dci
int firstCCE;
/// flag to indicate that this is a RA response
boolean_t ra_flag;
bool ra_flag;
/// rnti
rnti_t rnti;
/// harq_pid
@@ -775,7 +775,7 @@ typedef struct {
/// Position of first CCE of the dci
int firstCCE;
/// flag to indicate that this is a RA response
boolean_t ra_flag;
bool ra_flag;
/// rnti
rnti_t rnti;
/// Format
@@ -806,7 +806,7 @@ typedef struct {
/// Position of first CCE of the dci
int firstCCE;
/// flag to indicate that this is a RA response
boolean_t ra_flag;
bool ra_flag;
/// rnti
rnti_t rnti;
/// Format
+1 -1
View File
@@ -460,7 +460,7 @@ void ue_compute_srs_occasion(PHY_VARS_UE *ue,
is_pucch2_subframe = (is_ri_TXOp(ue,proc,eNB_id) && (ue->cqi_report_config[eNB_id].CQI_ReportPeriodic.ri_ConfigIndex>0)) || is_pucch2_subframe;
// check ACK/SR transmission
if(frame_parms->soundingrs_ul_config_common.ackNackSRS_SimultaneousTransmission == FALSE) {
if(frame_parms->soundingrs_ul_config_common.ackNackSRS_SimultaneousTransmission == false) {
if(is_SR_TXOp(ue,proc,eNB_id)) {
uint32_t SR_payload = 0;
@@ -165,7 +165,7 @@ void common_pucch_configuration(PHY_VARS_NR_UE *ue, uint8_t gNB_id, int pucch_in
int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
{
int v_return = 0;
bool reset_harq = FALSE;
bool reset_harq = false;
printf("%s", tst_separator);
@@ -175,7 +175,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
common_pucch_configuration(ue, gNB_id, TST_PUCCH_COMMON_CONFIG_INDEX_KO);
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
v_return = -1;
}
@@ -186,7 +186,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
printf("\n => Test : Error due to acknownlegment not set \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
v_return = -1;
}
@@ -194,7 +194,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
printf("\n => Test : Error due to DAI not set \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
v_return = -1;
}
@@ -202,7 +202,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
harq_status->vDAI_DL = NR_DL_MAX_DAI + 1;
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
v_return = -1;
}
@@ -210,7 +210,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
harq_status->vDAI_DL = 0;
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
v_return = -1;
}
@@ -218,7 +218,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
harq_status->send_harq_status = 1; /* ack ready to be send */
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
v_return = -1;
}
@@ -228,7 +228,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
harq_status->vDAI_DL = 1;
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
v_return = -1;
}
@@ -236,7 +236,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
printf("\n => Test : Error due to PUCCH format with multiple cells not already implemented \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
v_return = -1;
}
@@ -260,7 +260,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
{
int v_return = 0;
bool reset_harq = FALSE;
bool reset_harq = false;
printf("%s", tst_separator);
@@ -273,7 +273,7 @@ int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_
printf("\n => Test : PUCCH format from common config in prach mode: one positive downlink ACKnowledgment \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
v_return = -1;
}
@@ -281,7 +281,7 @@ int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_
printf("\n => Test : PUCCH format from common config in prach mode: one negative downlink ACKnowledgment \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
v_return = -1;
}
@@ -304,7 +304,7 @@ int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_
printf("\n => Test : PUCCH format from common config in dedicated mode: two positive downlink ACKnowledgments \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
v_return = -1;
}
@@ -312,7 +312,7 @@ int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_
printf("\n => Test : PUCCH format from common config in dedicated mode: one positive and one negative downlink ACKnowledgments \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
v_return = -1;
}
@@ -320,22 +320,22 @@ int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_
printf("\n => Test : PUCCH format from common config in dedicated mode: two negative downlink ACKnowledgments \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
v_return = -1;
}
harq_status->ack = DL_ACK;
reset_harq = TRUE;
reset_harq = true;
printf("\n => Test : PUCCH format from common config in dedicated mode: no resource is found \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
v_return = -1;
}
printf("\n => Test : PUCCH format from common config in dedicated mode: no PUCCH after reset of pending harq ACKnowledgments \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
v_return = -1;
}
@@ -362,7 +362,7 @@ void init_pucch_dedicated_configuration(PHY_VARS_NR_UE *ue, uint8_t gNB_id)
int i,j;
/* set cell group parameters which are supported */
ue->cell_group_config.physicalCellGroupConfig.harq_ACK_SpatialBundlingPUCCH = FALSE;
ue->cell_group_config.physicalCellGroupConfig.harq_ACK_SpatialBundlingPUCCH = false;
ue->cell_group_config.physicalCellGroupConfig.pdsch_HARQ_ACK_Codebook = dynamic;
ue->PDSCH_ServingCellConfig.codeBlockGroupTransmission = NULL;
@@ -554,7 +554,7 @@ int test_pucch_dedicated_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id,
#define TST_NB_STEP_SINGLE_TRANSPORT_BLOCK (4)
int v_return = 0;
int reset_harq = FALSE;
int reset_harq = false;
int dl_harq_pid[TST_NB_STEP_SINGLE_TRANSPORT_BLOCK] = {TST_DL_HARQ_PID_FIRST, TST_DL_HARQ_PID_SECOND, TST_DL_HARQ_PID_THIRD, TST_DL_HARQ_PID_FOURTH };
int pucch_resource_indicator[TST_NB_STEP_SINGLE_TRANSPORT_BLOCK][2] = { { 0, 4 }, { 1, 0 } , { 1, 3 } , { 5, 7 } };
NR_UE_HARQ_STATUS_t *harq_status;
@@ -575,7 +575,7 @@ int test_pucch_dedicated_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id,
printf("\n => Test : PUCCH format from dedicated config : pucch resource indicator is invalid \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
v_return = -1;
}
@@ -595,14 +595,14 @@ int test_pucch_dedicated_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id,
/* reset ack context on last test */
if ((i == (TST_NB_STEP_SINGLE_TRANSPORT_BLOCK-1)) && (j == 1)) {
reset_harq = TRUE;
reset_harq = true;
}
harq_status->pucch_resource_indicator = pucch_resource_indicator[i][j];
printf("\n => Test : PUCCH format from dedicated config with 1 transport block : with %d downlink ACKnowledgments and pucch resource indicator %d \n", i+1, pucch_resource_indicator[i][j]);
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
v_return = -1;
}
}
@@ -627,11 +627,11 @@ int test_pucch_dedicated_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id,
harq_status->pucch_resource_indicator = pucch_resource_indicator[i][0];
}
reset_harq = TRUE;
reset_harq = true;
printf("\n => Test : PUCCH format from dedicated config with 1 transport block and missed PDSCH : with %d downlink ACKnowledgments and pucch resource indicator %d \n", i+1, pucch_resource_indicator[3][0]);
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
v_return = -1;
}
@@ -659,7 +659,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
#define TST_NB_STEP_TWO_TRANSPORT_BLOCKS (4)
int v_return = 0;
int reset_harq = FALSE;
int reset_harq = false;
int dl_harq_pid[TST_NB_STEP_TWO_TRANSPORT_BLOCKS] = {TST_DL_HARQ_PID_FIRST, TST_DL_HARQ_PID_SECOND, TST_DL_HARQ_PID_THIRD, TST_DL_HARQ_PID_FOURTH };
int pucch_resource_indicator[TST_NB_STEP_TWO_TRANSPORT_BLOCKS][2] = { { 0, 1 }, { 3, 7 } , { 2 , 4 } , { 4 , 6 } };
NR_UE_HARQ_STATUS_t *harq_status;
@@ -694,7 +694,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
/* reset ack context on last test */
if ((i == (TST_NB_STEP_TWO_TRANSPORT_BLOCKS-1)) && (j == 1)) {
reset_harq = TRUE;
reset_harq = true;
}
harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid[i]].harq_ack;
@@ -703,7 +703,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
printf("\n => Test : PUCCH format from dedicated config with 2 transport blocks : with %d downlink ACKnowledgments and pucch resource indicator %d \n", i+1, pucch_resource_indicator[i][j]);
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
@@ -714,7 +714,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
/* some transport blocks have been missed and they need to be nack by UE in order to be retransmitted by the network */
/* here first and third block receptions have been missed */
reset_harq = TRUE;
reset_harq = true;
for (int i = 1; i < TST_NB_STEP_TWO_TRANSPORT_BLOCKS; i = i + 1) {
@@ -743,7 +743,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
printf("\n => Test : PUCCH format from dedicated config with 2 transport blocks and 1 missed PDSCH : with %d downlink ACKnowledgments and pucch resource indicator %d \n", 4, pucch_resource_indicator[3][0]);
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
@@ -775,7 +775,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
}
}
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
@@ -907,7 +907,7 @@ int test_sr_alone_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *p
tst_scheduling_request_payload = 0;
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
printf("Test fail \n");
v_return = -1;
}
@@ -916,7 +916,7 @@ int test_sr_alone_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *p
tst_scheduling_request_payload = 1;
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
@@ -929,7 +929,7 @@ int test_sr_alone_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *p
tst_scheduling_request_payload = 1;
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
@@ -958,7 +958,7 @@ int test_sr_alone_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *p
int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
{
int v_return = 0;
int reset_harq = 0;
bool reset_harq = false;
int sr_config_id = 0;
int sr_resource_id = 0;
int sr_offset = 0;
@@ -988,7 +988,7 @@ int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pro
tst_scheduling_request_payload = 0; /* set sr payload */
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
@@ -997,7 +997,7 @@ int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pro
tst_scheduling_request_payload = 1; /* set sr payload */
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
@@ -1006,7 +1006,7 @@ int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pro
harq_status->pucch_resource_indicator = pucch_resource_indicator[1];
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
@@ -1027,7 +1027,7 @@ int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pro
tst_scheduling_request_payload = 1; /* set sr payload */
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
@@ -1035,9 +1035,9 @@ int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pro
printf("\n => Test : PUCCH format from dedicated config with a positive scheduling request and two positive acks \n");
harq_status->pucch_resource_indicator = pucch_resource_indicator[1];
reset_harq = TRUE;
reset_harq = true;
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
@@ -1065,7 +1065,7 @@ int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pro
int test_csi_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
{
int v_return = 0;
int reset_harq = FALSE;
int reset_harq = false;
int sr_config_id = 0;
int sr_resource_id = 0;
int sr_offset = 0;
@@ -1079,7 +1079,7 @@ int test_csi_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
printf("\n => Test : PUCCH format from dedicated config with CSI alone \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
@@ -1102,7 +1102,7 @@ int test_csi_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
ue->pucch_config_dedicated_nr[gNB_id].formatConfig[2-1]->simultaneousHARQ_ACK_CSI = enable_feature; /* format 2 */
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
@@ -1115,9 +1115,9 @@ int test_csi_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
tst_scheduling_request_payload = 0; /* set sr payload */
reset_harq = TRUE;
reset_harq = true;
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
@@ -1126,7 +1126,7 @@ int test_csi_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
harq_status->pucch_resource_indicator = pucch_resource_indicator[4];
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
@@ -1135,7 +1135,7 @@ int test_csi_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
printf("\n => Test : PUCCH format from dedicated config with positive SR and CSI \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
-21
View File
@@ -43,27 +43,6 @@ Description Contains global common definitions
#include <stddef.h>
#include <stdbool.h>
/* boolean_t is also defined in openair2/COMMON/platform_types.h
* let's protect potential redefinition
*/
#ifndef _BOOLEAN_T_DEFINED_
#define _BOOLEAN_T_DEFINED_
typedef signed char boolean_t;
#if !defined(TRUE)
#define TRUE (boolean_t)0x01
#endif
#if !defined(FALSE)
#define FALSE (boolean_t)0x00
#endif
#define BOOL_NOT(b) (b^TRUE)
#endif /* _BOOLEAN_T_DEFINED_ */
#define NAS_UE_ID_FMT "0x%06x"
/****************************************************************************/
+1 -1
View File
@@ -145,7 +145,7 @@ struct mac_tx_tb_management {
struct mac_rx_tb_management {
unsigned char *data_ptr;
tb_size_t tb_size; // in bits
boolean_t valid_checksum;
bool valid_checksum;
unsigned char first_bit; // 0 if data starts on byte boundary(b7), 1 if b6, 2 if b5, etc
};
+19 -42
View File
@@ -32,35 +32,12 @@
#if !defined(NAS_NETLINK)
#include <stdint.h>
#include <stdbool.h>
#else
#include <linux/types.h>
typedef void * intptr_t;
#endif
//-----------------------------------------------------------------------------
// GENERIC TYPES
//-----------------------------------------------------------------------------
/* boolean_t is also defined in openair2/COMMON/commonDef.h,
* let's protect potential redefinition
*/
#ifndef _BOOLEAN_T_DEFINED_
#define _BOOLEAN_T_DEFINED_
typedef signed char boolean_t;
#if !defined(TRUE)
#define TRUE (boolean_t)0x01
#endif
#if !defined(FALSE)
#define FALSE (boolean_t)0x00
#endif
#define BOOL_NOT(b) (b^TRUE)
#endif /* _BOOLEAN_T_DEFINED_ */
//-----------------------------------------------------------------------------
// GENERIC ACCESS STRATUM TYPES
//-----------------------------------------------------------------------------
@@ -77,25 +54,25 @@ typedef int16_t smodule_id_t;
typedef long rb_id_t;
typedef long srb_id_t;
typedef boolean_t MBMS_flag_t;
#define MBMS_FLAG_NO FALSE
#define MBMS_FLAG_YES TRUE
typedef bool MBMS_flag_t;
#define MBMS_FLAG_NO false
#define MBMS_FLAG_YES true
typedef boolean_t eNB_flag_t;
#define ENB_FLAG_NO FALSE
#define ENB_FLAG_YES TRUE
typedef bool eNB_flag_t;
#define ENB_FLAG_NO false
#define ENB_FLAG_YES true
typedef boolean_t gNB_flag_t;
#define GNB_FLAG_NO FALSE
#define GNB_FLAG_YES TRUE
typedef bool gNB_flag_t;
#define GNB_FLAG_NO false
#define GNB_FLAG_YES true
typedef boolean_t srb_flag_t;
#define SRB_FLAG_NO FALSE
#define SRB_FLAG_YES TRUE
typedef bool srb_flag_t;
#define SRB_FLAG_NO false
#define SRB_FLAG_YES true
typedef boolean_t sl_discovery_flag_t;
#define SL_DISCOVERY_FLAG_NO FALSE
#define SL_DISCOVERY_FLAG_YES TRUE
typedef bool sl_discovery_flag_t;
#define SL_DISCOVERY_FLAG_NO false
#define SL_DISCOVERY_FLAG_YES true
typedef enum link_direction_e {
UNKNOWN_DIR = 0,
@@ -152,8 +129,8 @@ typedef uint16_t rlc_usn_t;
typedef int32_t rlc_buffer_occupancy_t;
typedef signed int rlc_op_status_t;
#define SDU_CONFIRM_NO FALSE
#define SDU_CONFIRM_YES TRUE
#define SDU_CONFIRM_NO false
#define SDU_CONFIRM_YES true
//-----------------------------------------------------------------------------
// PDCP TYPES
//-----------------------------------------------------------------------------
@@ -242,7 +219,7 @@ typedef struct protocol_ctxt_s {
frame_t frame; /*!< \brief LTE frame number.*/
sub_frame_t subframe; /*!< \brief LTE sub frame number.*/
eNB_index_t eNB_index; /*!< \brief valid for UE indicating the index of connected eNB(s) */
boolean_t brOption;
bool brOption;
} protocol_ctxt_t;
// warning time hardcoded
#define PROTOCOL_CTXT_TIME_MILLI_SECONDS(CtXt_h) ((CtXt_h)->frame*10+(CtXt_h)->subframe)
+19 -19
View File
@@ -583,9 +583,9 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
"Failed to parse eNB configuration file %s, enb %u define %s: ENABLE,DISABLE!\n",
RC.config_file_name, i, ENB_CONFIG_STRING_PRACH_HIGH_SPEED);
else if (strcmp(ccparams_lte.prach_high_speed, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].prach_high_speed = TRUE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].prach_high_speed = true;
} else if (strcmp(ccparams_lte.prach_high_speed, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].prach_high_speed = FALSE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].prach_high_speed = false;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for prach_config choice: ENABLE,DISABLE !\n",
@@ -689,9 +689,9 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
"Failed to parse eNB configuration file %s, enb %u define %s: ENABLE,DISABLE!\n",
RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_ENABLE64QAM);
else if (strcmp(ccparams_lte.pusch_enable64QAM, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_enable64QAM = TRUE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_enable64QAM = true;
} else if (strcmp(ccparams_lte.pusch_enable64QAM, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_enable64QAM = FALSE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_enable64QAM = false;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for pusch_enable64QAM choice: ENABLE,DISABLE!\n",
@@ -702,9 +702,9 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
"Failed to parse eNB configuration file %s, enb %u define %s: ENABLE,DISABLE!\n",
RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN);
else if (strcmp(ccparams_lte.pusch_groupHoppingEnabled, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_groupHoppingEnabled = TRUE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_groupHoppingEnabled = true;
} else if (strcmp(ccparams_lte.pusch_groupHoppingEnabled, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_groupHoppingEnabled= FALSE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_groupHoppingEnabled= false;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for pusch_groupHoppingEnabled choice: ENABLE,DISABLE!\n",
@@ -723,9 +723,9 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
"Failed to parse eNB configuration file %s, enb %u define %s: ENABLE,DISABLE!\n",
RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN);
else if (strcmp(ccparams_lte.pusch_sequenceHoppingEnabled, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_sequenceHoppingEnabled = TRUE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_sequenceHoppingEnabled = true;
} else if (strcmp(ccparams_lte.pusch_sequenceHoppingEnabled, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_sequenceHoppingEnabled = FALSE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_sequenceHoppingEnabled = false;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for pusch_sequenceHoppingEnabled choice: ENABLE,DISABLE!\n",
@@ -766,15 +766,15 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].phich_duration,ccparams_lte.phich_duration);
if (strcmp(ccparams_lte.srs_enable, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_enable= TRUE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_enable= true;
} else if (strcmp(ccparams_lte.srs_enable, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_enable= FALSE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_enable= false;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n",
RC.config_file_name, i, ccparams_lte.srs_enable);
if (RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_enable== TRUE) {
if (RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_enable== true) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_BandwidthConfig= ccparams_lte.srs_BandwidthConfig;
if ((ccparams_lte.srs_BandwidthConfig < 0) ||
@@ -791,18 +791,18 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
RC.config_file_name, i, ccparams_lte.srs_SubframeConfig);
if (strcmp(ccparams_lte.srs_ackNackST, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_ackNackST= TRUE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_ackNackST= true;
} else if (strcmp(ccparams_lte.srs_ackNackST, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_ackNackST= FALSE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_ackNackST= false;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n",
RC.config_file_name, i, ccparams_lte.srs_ackNackST);
if (strcmp(ccparams_lte.srs_MaxUpPts, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_MaxUpPts= TRUE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_MaxUpPts= true;
} else if (strcmp(ccparams_lte.srs_MaxUpPts, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_MaxUpPts= FALSE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_MaxUpPts= false;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for srs_MaxUpPts choice: ENABLE,DISABLE !\n",
@@ -921,7 +921,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
RC.config_file_name, i, ccparams_lte.rach_numberOfRA_Preambles);
if (strcmp(ccparams_lte.rach_preamblesGroupAConfig, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preamblesGroupAConfig= TRUE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preamblesGroupAConfig= true;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_sizeOfRA_PreamblesGroupA= (ccparams_lte.rach_sizeOfRA_PreamblesGroupA/4)-1;
if ((ccparams_lte.rach_numberOfRA_Preambles <4) ||
@@ -976,7 +976,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for rach_messagePowerOffsetGroupB choice: minusinfinity,dB0,dB5,dB8,dB10,dB12,dB15,dB18!\n",
RC.config_file_name, i, ccparams_lte.rach_messagePowerOffsetGroupB);
} else if (strcmp(ccparams_lte.rach_preamblesGroupAConfig, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preamblesGroupAConfig= FALSE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preamblesGroupAConfig= false;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for rach_preamblesGroupAConfig choice: ENABLE,DISABLE !\n",
@@ -1254,9 +1254,9 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
"Failed to parse eNB configuration file %s, enb %u define %s: TRUE,FALSE!\n",
RC.config_file_name, i, ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL);
else if (strcmp(ccparams_lte.mbms_dedicated_serving_cell, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = TRUE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = true;
} else if (strcmp(ccparams_lte.mbms_dedicated_serving_cell, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = FALSE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = false;
} else {
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for mbms_dedicated_serving_cell choice: TRUE or FALSE !\n",
+35 -35
View File
@@ -61,18 +61,18 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
if (!strcmp(eMTCconfig->cellSelectionInfoCE_r13, "ENABLE")) {
RRC_CONFIGURATION_REQ(msg_p).cellSelectionInfoCE_r13[cc_idx] = TRUE;
RRC_CONFIGURATION_REQ(msg_p).cellSelectionInfoCE_r13[cc_idx] = true;
RRC_CONFIGURATION_REQ(msg_p).q_RxLevMinCE_r13[cc_idx]= eMTCconfig->q_RxLevMinCE_r13;
// RRC_CONFIGURATION_REQ(msg_p).q_QualMinRSRQ_CE_r13[cc_idx]= calloc(1, sizeof(long));
// *RRC_CONFIGURATION_REQ(msg_p).q_QualMinRSRQ_CE_r13[cc_idx]= q_QualMinRSRQ_CE_r13;
} else {
RRC_CONFIGURATION_REQ(msg_p).cellSelectionInfoCE_r13[cc_idx] = FALSE;
RRC_CONFIGURATION_REQ(msg_p).cellSelectionInfoCE_r13[cc_idx] = false;
}
if (!strcmp(eMTCconfig->bandwidthReducedAccessRelatedInfo_r13, "ENABLE")) {
RRC_CONFIGURATION_REQ(msg_p).bandwidthReducedAccessRelatedInfo_r13[cc_idx] = TRUE;
RRC_CONFIGURATION_REQ(msg_p).bandwidthReducedAccessRelatedInfo_r13[cc_idx] = true;
@@ -106,7 +106,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
}
} else {
RRC_CONFIGURATION_REQ(msg_p).bandwidthReducedAccessRelatedInfo_r13[cc_idx] = FALSE;
RRC_CONFIGURATION_REQ(msg_p).bandwidthReducedAccessRelatedInfo_r13[cc_idx] = false;
}
char schedulingInfoBrPath[MAX_OPTNAME_SIZE * 2];
@@ -127,10 +127,10 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = CALLOC(1, sizeof(BOOLEAN_t));
if (!strcmp(eMTCconfig->fdd_DownlinkOrTddSubframeBitmapBR_r13, "subframePattern40-r13")) {
*RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = FALSE;
*RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = false;
RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_val_r13[cc_idx] = eMTCconfig->fdd_DownlinkOrTddSubframeBitmapBR_val_r13;
} else {
*RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = TRUE;
*RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = true;
RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_val_r13[cc_idx] = eMTCconfig->fdd_DownlinkOrTddSubframeBitmapBR_val_r13;
}
@@ -156,18 +156,18 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
if (!strcmp(eMTCconfig->freqHoppingParametersDL_r13, "ENABLE"))
{
RRC_CONFIGURATION_REQ(msg_p).freqHoppingParametersDL_r13[cc_idx] = TRUE;
RRC_CONFIGURATION_REQ(msg_p).freqHoppingParametersDL_r13[cc_idx] = true;
if (!strcmp(eMTCconfig->interval_DLHoppingConfigCommonModeA_r13, "interval-TDD-r13"))
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13[cc_idx] = FALSE;
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13[cc_idx] = false;
else
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13[cc_idx] = TRUE;
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13[cc_idx] = true;
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13_val[cc_idx] = eMTCconfig->interval_DLHoppingConfigCommonModeA_r13_val;
if (!strcmp(eMTCconfig->interval_DLHoppingConfigCommonModeB_r13, "interval-TDD-r13"))
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13[cc_idx] = FALSE;
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13[cc_idx] = false;
else
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13[cc_idx] = TRUE;
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13[cc_idx] = true;
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13_val[cc_idx] = eMTCconfig->interval_DLHoppingConfigCommonModeB_r13_val;
RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingNB_r13[cc_idx] = calloc(1, sizeof(long));
@@ -188,7 +188,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
}
else
{
RRC_CONFIGURATION_REQ(msg_p).freqHoppingParametersDL_r13[cc_idx] = FALSE;
RRC_CONFIGURATION_REQ(msg_p).freqHoppingParametersDL_r13[cc_idx] = false;
}
/** ------------------------------SIB2/3 BR------------------------------------------ */
@@ -213,9 +213,9 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
config_fname, cell_idx,ENB_CONFIG_STRING_PRACH_HIGH_SPEED);
else if (strcmp(eMTCconfig->ccparams.prach_high_speed, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].prach_high_speed = TRUE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].prach_high_speed = true;
} else if (strcmp(eMTCconfig->ccparams.prach_high_speed, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].prach_high_speed = FALSE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].prach_high_speed = false;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prach_config choice: ENABLE,DISABLE !\n",
@@ -310,9 +310,9 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
config_fname, cell_idx,ENB_CONFIG_STRING_PUSCH_ENABLE64QAM);
else if (strcmp(eMTCconfig->ccparams.pusch_enable64QAM, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_enable64QAM = TRUE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_enable64QAM = true;
} else if (strcmp(eMTCconfig->ccparams.pusch_enable64QAM, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_enable64QAM = FALSE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_enable64QAM = false;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_enable64QAM choice: ENABLE,DISABLE!\n",
@@ -323,9 +323,9 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
config_fname, cell_idx,ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN);
else if (strcmp(eMTCconfig->ccparams.pusch_groupHoppingEnabled, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_groupHoppingEnabled = TRUE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_groupHoppingEnabled = true;
} else if (strcmp(eMTCconfig->ccparams.pusch_groupHoppingEnabled, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_groupHoppingEnabled= FALSE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_groupHoppingEnabled= false;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_groupHoppingEnabled choice: ENABLE,DISABLE!\n",
@@ -343,9 +343,9 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
config_fname, cell_idx,ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN);
else if (strcmp(eMTCconfig->ccparams.pusch_sequenceHoppingEnabled, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_sequenceHoppingEnabled = TRUE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_sequenceHoppingEnabled = true;
} else if (strcmp(eMTCconfig->ccparams.pusch_sequenceHoppingEnabled, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_sequenceHoppingEnabled = FALSE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_sequenceHoppingEnabled = false;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_sequenceHoppingEnabled choice: ENABLE,DISABLE!\n",
@@ -385,15 +385,15 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].phich_duration,eMTCconfig->ccparams.phich_duration);
if (strcmp(eMTCconfig->ccparams.srs_enable, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_enable= TRUE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_enable= true;
} else if (strcmp(eMTCconfig->ccparams.srs_enable, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_enable= FALSE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_enable= false;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n",
config_fname, cell_idx,eMTCconfig->ccparams.srs_enable);
if (RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_enable== TRUE) {
if (RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_enable== true) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_BandwidthConfig= eMTCconfig->ccparams.srs_BandwidthConfig;
if ((eMTCconfig->ccparams.srs_BandwidthConfig < 0) || (eMTCconfig->ccparams.srs_BandwidthConfig >7))
@@ -408,18 +408,18 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
config_fname, cell_idx,eMTCconfig->ccparams.srs_SubframeConfig);
if (strcmp(eMTCconfig->ccparams.srs_ackNackST, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_ackNackST= TRUE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_ackNackST= true;
} else if (strcmp(eMTCconfig->ccparams.srs_ackNackST, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_ackNackST= FALSE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_ackNackST= false;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n",
config_fname, cell_idx,eMTCconfig->ccparams.srs_ackNackST);
if (strcmp(eMTCconfig->ccparams.srs_MaxUpPts, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_MaxUpPts= TRUE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_MaxUpPts= true;
} else if (strcmp(eMTCconfig->ccparams.srs_MaxUpPts, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_MaxUpPts= FALSE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_MaxUpPts= false;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_MaxUpPts choice: ENABLE,DISABLE !\n",
@@ -535,7 +535,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
config_fname, cell_idx,eMTCconfig->ccparams.rach_numberOfRA_Preambles);
if (strcmp(eMTCconfig->ccparams.rach_preamblesGroupAConfig, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preamblesGroupAConfig= TRUE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preamblesGroupAConfig= true;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_sizeOfRA_PreamblesGroupA= (eMTCconfig->ccparams.rach_sizeOfRA_PreamblesGroupA/4)-1;
if ((eMTCconfig->ccparams.rach_numberOfRA_Preambles <4) || (eMTCconfig->ccparams.rach_numberOfRA_Preambles>60) || ((eMTCconfig->ccparams.rach_numberOfRA_Preambles&3)!=0))
@@ -588,7 +588,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_messagePowerOffsetGroupB choice: minusinfinity,dB0,dB5,dB8,dB10,dB12,dB15,dB18!\n",
config_fname, cell_idx,eMTCconfig->ccparams.rach_messagePowerOffsetGroupB);
} else if (strcmp(eMTCconfig->ccparams.rach_preamblesGroupAConfig, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preamblesGroupAConfig= FALSE;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preamblesGroupAConfig= false;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_preamblesGroupAConfig choice: ENABLE,DISABLE !\n",
@@ -847,14 +847,14 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
if (!strcmp(eMTCconfig->prach_ConfigCommon_v1310, "ENABLE")) {
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_ConfigCommon_v1310 = TRUE;
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_ConfigCommon_v1310 = true;
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = calloc(1, sizeof(BOOLEAN_t));
if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13, "tdd-r13")) {
*RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = FALSE;
*RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = false;
} else {
*RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = TRUE;
*RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = true;
}
if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13_val, "v1")) {
@@ -882,7 +882,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_HoppingOffset_r13 = calloc(1, sizeof(long));
*RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_HoppingOffset_r13 = eMTCconfig->prach_HoppingOffset_r13;
} else {
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_ConfigCommon_v1310 = FALSE;
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_ConfigCommon_v1310 = false;
}
@@ -1169,7 +1169,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
/** PCCH CONFIG V1310 */
RRC_CONFIGURATION_REQ(msg_p).pcch_config_v1310[cc_idx] = TRUE;
RRC_CONFIGURATION_REQ(msg_p).pcch_config_v1310[cc_idx] = true;
RRC_CONFIGURATION_REQ(msg_p).paging_narrowbands_r13[cc_idx] = eMTCconfig->paging_narrowbands_r13;
RRC_CONFIGURATION_REQ(msg_p).mpdcch_numrepetition_paging_r13[cc_idx] = eMTCconfig->mpdcch_numrepetition_paging_r13;
@@ -1220,7 +1220,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
/** SIB2 FREQ HOPPING PARAMETERS R13 */
RRC_CONFIGURATION_REQ(msg_p).sib2_freq_hoppingParameters_r13_exists[cc_idx] = TRUE;
RRC_CONFIGURATION_REQ(msg_p).sib2_freq_hoppingParameters_r13_exists[cc_idx] = true;
char sib2FreqHoppingParametersR13Path[MAX_OPTNAME_SIZE*2 + 16];
sprintf(sib2FreqHoppingParametersR13Path, "%s.%s", brparamspath, ENB_CONFIG_STRING_SIB2_FREQ_HOPPINGPARAMETERS_R13);
+4 -4
View File
@@ -127,7 +127,7 @@ int flexran_get_mac_ue_id_rnti(mid_t mod_id, rnti_t rnti) {
/* get the (active) UE with RNTI i */
for (n = 0; n < MAX_MOBILES_PER_ENB; ++n) {
if (RC.mac[mod_id]->UE_info.active[n] == TRUE
if (RC.mac[mod_id]->UE_info.active[n] == true
&& rnti == UE_RNTI(mod_id, n)) {
return n;
}
@@ -143,7 +143,7 @@ int flexran_get_mac_ue_id(mid_t mod_id, int i) {
/* get the (i+1)'th active UE */
for (n = 0; n < MAX_MOBILES_PER_ENB; ++n) {
if (RC.mac[mod_id]->UE_info.active[n] == TRUE) {
if (RC.mac[mod_id]->UE_info.active[n] == true) {
if (i == 0)
return n;
@@ -580,7 +580,7 @@ uint8_t flexran_get_n_SB(mid_t mod_id, uint8_t cc_id) {
Protocol__FlexQam flexran_get_enable64QAM(mid_t mod_id, uint8_t cc_id) {
if (!phy_is_present(mod_id, cc_id)) return 0;
if (RC.eNB[mod_id][cc_id]->frame_parms.pusch_config_common.enable64QAM == TRUE)
if (RC.eNB[mod_id][cc_id]->frame_parms.pusch_config_common.enable64QAM == true)
return PROTOCOL__FLEX_QAM__FLEQ_MOD_64QAM;
else
return PROTOCOL__FLEX_QAM__FLEQ_MOD_16QAM;
@@ -3585,7 +3585,7 @@ int flexran_set_new_plmn_id(mid_t mod_id, int CC_id, size_t n_plmn, Protocol__Fl
int CC_id,
BOOLEAN_t brOption,
RrcConfigurationReq *configuration);
carrier->sizeof_SIB1 = do_SIB1(carrier, mod_id, CC_id, FALSE, conf);
carrier->sizeof_SIB1 = do_SIB1(carrier, mod_id, CC_id, false, conf);
if (carrier->sizeof_SIB1 < 0)
return -1337; /* SIB1 encoding failed, hell will probably break loose */
+13 -13
View File
@@ -32,18 +32,18 @@ void apply_macrlc_config(gNB_RRC_INST *rrc,
abort();
}
boolean_t sdap_data_req(protocol_ctxt_t *ctxt_p,
const srb_flag_t srb_flag,
const rb_id_t rb_id,
const mui_t mui,
const confirm_t confirm,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t pt_mode,
const uint32_t *sourceL2Id,
const uint32_t *destinationL2Id,
const uint8_t qfi,
const boolean_t rqi,
const int pdusession_id) {
bool sdap_data_req(protocol_ctxt_t *ctxt_p,
const srb_flag_t srb_flag,
const rb_id_t rb_id,
const mui_t mui,
const confirm_t confirm,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t pt_mode,
const uint32_t *sourceL2Id,
const uint32_t *destinationL2Id,
const uint8_t qfi,
const bool rqi,
const int pdusession_id) {
abort();
}
-7
View File
@@ -363,13 +363,6 @@
# error "You are compiling f1ap with the wrong version of ASN1C"
#endif
#ifndef FALSE
#define FALSE (0)
#endif
#ifndef TRUE
#define TRUE (!FALSE)
#endif
#define F1AP_UE_ID_FMT "0x%06"PRIX32
#include "assertions.h"
+9 -9
View File
@@ -509,7 +509,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
LOG_I(F1AP, "Received DL RRC Transfer on srb_id %ld\n", srb_id);
rlc_op_status_t rlc_status;
boolean_t ret = TRUE;
bool ret = true;
mem_block_t *pdcp_pdu_p = NULL;
pdcp_pdu_p = get_free_mem_block(rrc_dl_sdu_len, __func__);
@@ -539,27 +539,27 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
switch (rlc_status) {
case RLC_OP_STATUS_OK:
//LOG_I(F1AP, "Data sending request over RLC succeeded!\n");
ret=TRUE;
ret=true;
break;
case RLC_OP_STATUS_BAD_PARAMETER:
LOG_W(F1AP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n");
ret= FALSE;
ret= false;
break;
case RLC_OP_STATUS_INTERNAL_ERROR:
LOG_W(F1AP, "Data sending request over RLC failed with 'Internal Error' reason!\n");
ret= FALSE;
ret= false;
break;
case RLC_OP_STATUS_OUT_OF_RESSOURCES:
LOG_W(F1AP, "Data sending request over RLC failed with 'Out of Resources' reason!\n");
ret= FALSE;
ret= false;
break;
default:
LOG_W(F1AP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status);
ret= FALSE;
ret= false;
break;
} // switch case
@@ -667,9 +667,9 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
UE_sched_ctrl_t *UE_scheduling_control = &(RC.mac[instance]->UE_info.UE_sched_ctrl[UE_id_mac]);
if (UE_scheduling_control->cdrx_waiting_ack == TRUE) {
UE_scheduling_control->cdrx_waiting_ack = FALSE;
UE_scheduling_control->cdrx_configured = TRUE; // Set to TRUE when RRC Connection Reconfiguration Complete is received
if (UE_scheduling_control->cdrx_waiting_ack == true) {
UE_scheduling_control->cdrx_waiting_ack = false;
UE_scheduling_control->cdrx_configured = true; // Set to TRUE when RRC Connection Reconfiguration Complete is received
LOG_I(F1AP, "CDRX configuration activated after RRC Connection Reconfiguration Complete reception\n");
}
+12 -12
View File
@@ -42,16 +42,16 @@
#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
#include <openair3/ocp-gtpu/gtp_itf.h>
boolean_t lteDURecvCb( protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_sizeP,
unsigned char *const sdu_buffer_pP,
const pdcp_transmission_mode_t modeP,
const uint32_t *sourceL2Id,
const uint32_t *destinationL2Id) {
bool lteDURecvCb(protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_sizeP,
unsigned char *const sdu_buffer_pP,
const pdcp_transmission_mode_t modeP,
const uint32_t *sourceL2Id,
const uint32_t *destinationL2Id) {
// The buffer comes from the stack in gtp-u thread, we have a make a separate buffer to enqueue in a inter-thread message queue
mem_block_t *sdu=get_free_mem_block(sdu_buffer_sizeP, __func__);
memcpy(sdu->data, sdu_buffer_pP, sdu_buffer_sizeP);
@@ -704,7 +704,7 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
LOG_E(F1AP,"Not found rnti: %x\n", rnti);
} else {
for (int n = 0; n < MAX_MOBILES_PER_ENB; ++n) {
if (RC.mac[instance]->UE_info.active[n] == TRUE
if (RC.mac[instance]->UE_info.active[n] == true
&& rnti == UE_RNTI(instance, n)) {
UE_out_of_sync = RC.mac[instance]->UE_info.UE_sched_ctrl[n].ul_out_of_sync;
break;
@@ -856,7 +856,7 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
if(RC.rrc && RC.rrc[instance]->node_type == ngran_eNB_DU){
for (int n = 0; n < MAX_MOBILES_PER_ENB; ++n) {
if (RC.mac[instance]->UE_info.active[n] == TRUE
if (RC.mac[instance]->UE_info.active[n] == true
&& rnti == UE_RNTI(instance, n)) {
UE_out_of_sync = RC.mac[instance]->UE_info.UE_sched_ctrl[n].ul_out_of_sync;
break;
+7 -7
View File
@@ -1104,7 +1104,7 @@ void eNB_Config_Local_DRX(instance_t Mod_id,
/* Get struct to modify */
UE_scheduling_control = &(UE_info_mac->UE_sched_ctrl[UE_id]);
UE_scheduling_control->cdrx_configured = FALSE; // will be set to true when no error
UE_scheduling_control->cdrx_configured = false; // will be set to true when no error
/* Check drx_Configuration */
if (drx_Configuration == NULL) {
@@ -1119,9 +1119,9 @@ void eNB_Config_Local_DRX(instance_t Mod_id,
}
/* Modify scheduling control structure according to DRX configuration: doesn't support every configurations! */
UE_scheduling_control->cdrx_configured = FALSE; // will be set to true when receiving RRC Reconfiguration Complete
UE_scheduling_control->cdrx_waiting_ack = TRUE; // waiting for RRC Reconfiguration Complete message
UE_scheduling_control->in_active_time = FALSE;
UE_scheduling_control->cdrx_configured = false; // will be set to true when receiving RRC Reconfiguration Complete
UE_scheduling_control->cdrx_waiting_ack = true; // waiting for RRC Reconfiguration Complete message
UE_scheduling_control->in_active_time = false;
UE_scheduling_control->dci0_ongoing_timer = 0;
UE_scheduling_control->on_duration_timer = 0;
struct LTE_DRX_Config__setup *choiceSetup = &drx_Configuration->choice.setup;
@@ -1297,13 +1297,13 @@ void eNB_Config_Local_DRX(instance_t Mod_id,
}
if (choiceSetup->shortDRX == NULL) {
UE_scheduling_control->in_short_drx_cycle = FALSE;
UE_scheduling_control->in_short_drx_cycle = false;
UE_scheduling_control->drx_shortCycle_timer_value = 0;
UE_scheduling_control->short_drx_cycle_duration = 0;
UE_scheduling_control->drx_shortCycle_timer = 0;
UE_scheduling_control->drx_shortCycle_timer_thres = -1;
} else {
UE_scheduling_control->in_short_drx_cycle = FALSE;
UE_scheduling_control->in_short_drx_cycle = false;
UE_scheduling_control->drx_shortCycle_timer_value = (uint8_t) choiceSetup->shortDRX->drxShortCycleTimer;
switch (choiceSetup->shortDRX->shortDRX_Cycle) {
@@ -1380,7 +1380,7 @@ void eNB_Config_Local_DRX(instance_t Mod_id,
UE_scheduling_control->drx_shortCycle_timer_thres = UE_scheduling_control->drx_shortCycle_timer_value * UE_scheduling_control->short_drx_cycle_duration;
}
UE_scheduling_control->in_long_drx_cycle = FALSE;
UE_scheduling_control->in_long_drx_cycle = false;
UE_scheduling_control->drx_longCycle_timer = 0;
switch (choiceSetup->longDRX_CycleStartOffset.present) {
+5 -6
View File
@@ -243,7 +243,6 @@ typedef struct {
// -1:No UE in list
int tail;
int num_UEs;
//boolean_t active[MAX_MAX_MOBILES_PER_ENB_NB_IoT];
} UE_list_NB_IoT_t;
@@ -403,7 +402,7 @@ typedef struct schedule_result{
// pointer to DCI
void *DCI_pdu;
// when all the procedure related to this DCI, enable this flag
boolean_t DCI_release;
bool DCI_release;
// Indicate the channel which to transmit
channel_NB_IoT_t channel;
// rnti
@@ -452,7 +451,7 @@ typedef enum ce_level_e{
/*! \brief eNB template for the Random access information */
typedef struct RA_TEMPLATE_NB_IoT_s{
boolean_t active;
bool active;
uint32_t msg3_retransmit_count;
uint32_t msg4_retransmit_count;
uint16_t ta;
@@ -461,8 +460,8 @@ typedef struct RA_TEMPLATE_NB_IoT_s{
rnti_t ue_rnti;
rnti_t ra_rnti;
struct RA_TEMPLATE_NB_IoT_s *next, *prev;
boolean_t wait_msg4_ack;
boolean_t wait_msg3_ack;
bool wait_msg4_ack;
bool wait_msg3_ack;
uint8_t rar_buffer[7];
} RA_TEMPLATE_NB_IoT;
@@ -530,7 +529,7 @@ typedef struct {
uint32_t pdus_in_buffer; /*!< \brief Number of PDUs buffered in RLC protocol instance (OBSOLETE). */
uint32_t head_sdu_creation_time; /*!< \brief Head SDU creation time. */
uint32_t head_sdu_remaining_size_to_send; /*!< \brief remaining size of sdu: could be the total size or the remaining size of already segmented sdu */
boolean_t head_sdu_is_segmented; /*!< \brief 0 if head SDU has not been segmented, 1 if already segmented */
bool head_sdu_is_segmented; /*!< \brief 0 if head SDU has not been segmented, 1 if already segmented */
} mac_rlc_status_resp_NB_IoT_t;
// global variables
+22 -22
View File
@@ -135,7 +135,7 @@ void schedule_SRS(module_id_t module_idP,
UE_scheduling_control = &(UE_info->UE_sched_ctrl[UE_id]);
/* Test if Active Time not running since 6+ subframes */
if (UE_scheduling_control->cdrx_configured == TRUE && UE_scheduling_control->in_active_time == FALSE) {
if (UE_scheduling_control->cdrx_configured == true && UE_scheduling_control->in_active_time == false) {
/*
* TODO: 6+ subframes condition not checked here
*/
@@ -204,7 +204,7 @@ void schedule_CSI(module_id_t module_idP,
cc = &eNB->common_channels[CC_id];
for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
if (UE_info->active[UE_id] == FALSE) {
if (UE_info->active[UE_id] == false) {
continue;
}
@@ -223,9 +223,9 @@ void schedule_CSI(module_id_t module_idP,
*/
UE_scheduling_control = &(UE_info->UE_sched_ctrl[UE_id]);
if (UE_scheduling_control->cdrx_configured == TRUE) {
if (UE_scheduling_control->cdrx_configured == true) {
/* Test if CQI masking activated */
if (UE_scheduling_control->cqi_mask_boolean == TRUE) {
if (UE_scheduling_control->cqi_mask_boolean == true) {
// CQI masking => test if onDurationTime not running since 6+ subframe
if (UE_scheduling_control->on_duration_timer == 0) {
/*
@@ -234,7 +234,7 @@ void schedule_CSI(module_id_t module_idP,
continue;
}
} else { // No CQI masking => test if Active Time not running since 6+ subframe
if (UE_scheduling_control->in_active_time == FALSE) {
if (UE_scheduling_control->in_active_time == false) {
/*
* TODO: 6+ subframes condition not checked here
*/
@@ -677,8 +677,8 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
}
/* Set and increment CDRX related timers */
if (UE_scheduling_control->cdrx_configured == TRUE) {
boolean_t harq_active_time_condition = FALSE;
if (UE_scheduling_control->cdrx_configured == true) {
bool harq_active_time_condition = false;
UE_TEMPLATE *UE_template = NULL;
unsigned long active_time_condition = 0; // variable used only for tracing purpose
@@ -721,7 +721,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
UE_scheduling_control->ul_synchronous_harq_timer[CC_id][harq_process_id]++;
if (UE_scheduling_control->ul_synchronous_harq_timer[CC_id][harq_process_id] > 5) {
harq_active_time_condition = TRUE;
harq_active_time_condition = true;
UE_scheduling_control->ul_synchronous_harq_timer[CC_id][harq_process_id] = 0;
active_time_condition = 5; // for tracing purpose
}
@@ -747,24 +747,24 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
/* When timer expires switch into short or long DRX cycle */
if (UE_scheduling_control->drx_shortCycle_timer_thres > 0) {
UE_scheduling_control->in_short_drx_cycle = TRUE;
UE_scheduling_control->in_short_drx_cycle = true;
UE_scheduling_control->drx_shortCycle_timer = 0;
UE_scheduling_control->in_long_drx_cycle = FALSE;
UE_scheduling_control->in_long_drx_cycle = false;
} else {
UE_scheduling_control->in_long_drx_cycle = TRUE;
UE_scheduling_control->in_long_drx_cycle = true;
}
}
}
/* Short DRX Cycle */
if (UE_scheduling_control->in_short_drx_cycle == TRUE) {
if (UE_scheduling_control->in_short_drx_cycle == true) {
UE_scheduling_control->drx_shortCycle_timer++;
/* When the Short DRX cycles are over, switch to long DRX cycle */
if (UE_scheduling_control->drx_shortCycle_timer > UE_scheduling_control->drx_shortCycle_timer_thres) {
UE_scheduling_control->drx_shortCycle_timer = 0;
UE_scheduling_control->in_short_drx_cycle = FALSE;
UE_scheduling_control->in_long_drx_cycle = TRUE;
UE_scheduling_control->in_short_drx_cycle = false;
UE_scheduling_control->in_long_drx_cycle = true;
UE_scheduling_control->drx_longCycle_timer = 0;
}
} else {
@@ -772,7 +772,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
}
/* Long DRX Cycle */
if (UE_scheduling_control->in_long_drx_cycle == TRUE) {
if (UE_scheduling_control->in_long_drx_cycle == true) {
UE_scheduling_control->drx_longCycle_timer++;
if (UE_scheduling_control->drx_longCycle_timer > UE_scheduling_control->drx_longCycle_timer_thres) {
@@ -783,18 +783,18 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
}
/* Check for error cases */
if ((UE_scheduling_control->in_short_drx_cycle == TRUE) && (UE_scheduling_control->in_long_drx_cycle == TRUE)) {
if ((UE_scheduling_control->in_short_drx_cycle == true) && (UE_scheduling_control->in_long_drx_cycle == true)) {
LOG_E(MAC, "Error in C-DRX: UE id %d is in both short and long DRX cycle. Should not happen. Back it to long cycle only\n", UE_id);
UE_scheduling_control->in_short_drx_cycle = FALSE;
UE_scheduling_control->in_short_drx_cycle = false;
}
/* Condition to start On Duration Timer */
if (UE_scheduling_control->in_short_drx_cycle == TRUE && UE_scheduling_control->on_duration_timer == 0) {
if (UE_scheduling_control->in_short_drx_cycle == true && UE_scheduling_control->on_duration_timer == 0) {
if (((frameP * 10) + subframeP) % (UE_scheduling_control->short_drx_cycle_duration) ==
(UE_scheduling_control->drx_start_offset) % (UE_scheduling_control->short_drx_cycle_duration)) {
UE_scheduling_control->on_duration_timer = 1;
}
} else if (UE_scheduling_control->in_long_drx_cycle == TRUE && UE_scheduling_control->on_duration_timer == 0) {
} else if (UE_scheduling_control->in_long_drx_cycle == true && UE_scheduling_control->on_duration_timer == 0) {
if (((frameP * 10) + subframeP) % (UE_scheduling_control->drx_longCycle_timer_thres) ==
(UE_scheduling_control->drx_start_offset)) {
UE_scheduling_control->on_duration_timer = 1;
@@ -811,7 +811,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
/* (a)synchronous HARQ processes handling for Active Time */
for (int harq_process_id = 0; harq_process_id < 8; harq_process_id++) {
if (UE_scheduling_control->drx_retransmission_timer[harq_process_id] > 0) {
harq_active_time_condition = TRUE;
harq_active_time_condition = true;
active_time_condition = 2; // for tracing purpose
break;
}
@@ -822,9 +822,9 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
UE_scheduling_control->drx_inactivity_timer > 1 ||
harq_active_time_condition ||
UE_template->ul_SR > 0) {
UE_scheduling_control->in_active_time = TRUE;
UE_scheduling_control->in_active_time = true;
} else {
UE_scheduling_control->in_active_time = FALSE;
UE_scheduling_control->in_active_time = false;
}
/* BEGIN VCD */
+1 -1
View File
@@ -1225,7 +1225,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
LOG_D(MAC,"[eNB %d][RAPROC] Frame %d, Subframe %d: state:IDLE\n", module_idP, frameP, subframeP);
UE_id = find_UE_id(module_idP, ra->rnti);
DevAssert(UE_id != -1);
mac->UE_info.UE_template[UE_PCCID(module_idP, UE_id)][UE_id].configured = TRUE;
mac->UE_info.UE_template[UE_PCCID(module_idP, UE_id)][UE_id].configured = true;
mac->UE_info.UE_template[UE_PCCID(module_idP, UE_id)][UE_id].pusch_repetition_levels=ra->pusch_repetition_levels;
cancel_ra_proc(module_idP, CC_idP, frameP, ra->rnti);
}
+1 -1
View File
@@ -2075,7 +2075,7 @@ schedule_PCH(module_id_t module_idP,
for (uint16_t i = 0; i < MAX_MOBILES_PER_ENB; i++) {
ue_pf_po = &UE_PF_PO[CC_id][i];
if (ue_pf_po->enable_flag != TRUE) {
if (ue_pf_po->enable_flag != true) {
continue;
}
+12 -12
View File
@@ -69,7 +69,7 @@ int last_ulsch_ue_id_volte[MAX_NUM_CCs] = {-1};
uint16_t pre_nb_rbs_required[2][MAX_NUM_CCs][NUMBER_OF_UE_MAX];
uint8_t dlsch_ue_select_tbl_in_use;
uint8_t new_dlsch_ue_select_tbl_in_use;
boolean_t pre_scd_activeUE[NUMBER_OF_UE_MAX];
bool pre_scd_activeUE[NUMBER_OF_UE_MAX];
eNB_UE_STATS pre_scd_eNB_UE_stats[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
#endif
@@ -125,7 +125,7 @@ void pre_scd_nb_rbs_required( module_id_t module_idP,
UE_info_t *UE_info = &RC.mac[module_idP]->UE_info;
for (UE_id = 0; UE_id <NUMBER_OF_UE_MAX; UE_id++) {
if (pre_scd_activeUE[UE_id] != TRUE)
if (pre_scd_activeUE[UE_id] != true)
continue;
// store dlsch buffer
@@ -210,7 +210,7 @@ void dlsch_scheduler_pre_ue_select_fairRR(
DL_req = &eNB->DL_req[CC_id].dl_config_request_body;
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
if (UE_info->active[UE_id] == FALSE) {
if (UE_info->active[UE_id] == false) {
continue;
}
@@ -331,7 +331,7 @@ void dlsch_scheduler_pre_ue_select_fairRR(
break;
}
if (UE_info->active[UE_id] == FALSE) {
if (UE_info->active[UE_id] == false) {
continue;
}
@@ -459,7 +459,7 @@ void dlsch_scheduler_pre_ue_select_fairRR(
break;
}
if (UE_info->active[UE_id] == FALSE) {
if (UE_info->active[UE_id] == false) {
continue;
}
@@ -607,7 +607,7 @@ static void dlsch_scheduler_pre_processor_reset_fairRR(
if (rnti == NOT_A_RNTI)
continue;
if (UE_info->active[UE_id] != TRUE)
if (UE_info->active[UE_id] != true)
continue;
LOG_D(MAC, "Running preprocessor for UE %d (%x)\n", UE_id, rnti);
@@ -755,7 +755,7 @@ static void assign_rbs_required_fairRR(
// clear rb allocations across all CC_id
for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
if (UE_info->active[UE_id] != TRUE)
if (UE_info->active[UE_id] != true)
continue;
pCCid = UE_PCCID(Mod_id, UE_id);
@@ -945,7 +945,7 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id,
min_rb_unit[CC_id] = get_min_rb_unit(Mod_id, CC_id);
for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
if (UE_info->active[i] != TRUE)
if (UE_info->active[i] != true)
continue;
UE_id = i;
@@ -2241,7 +2241,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
// UE round >0
for ( UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++ ) {
if (UE_info->active[UE_id] == FALSE)
if (UE_info->active[UE_id] == false)
continue;
rnti = UE_RNTI(module_idP,UE_id);
@@ -2251,7 +2251,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
CC_id = UE_PCCID(module_idP,UE_id);
if (UE_info->UE_template[CC_id][UE_id].configured == FALSE)
if (UE_info->UE_template[CC_id][UE_id].configured == false)
continue;
if (UE_info->UE_sched_ctrl[UE_id].ul_failure_timer > 0
@@ -2401,7 +2401,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
}
for ( UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++ ) {
if (UE_info->active[UE_id] == FALSE)
if (UE_info->active[UE_id] == false)
continue;
rnti = UE_RNTI(module_idP,UE_id);
@@ -2414,7 +2414,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
if (UE_id > last_ulsch_ue_id[CC_id])
continue;
if (UE_info->UE_template[CC_id][UE_id].configured == FALSE)
if (UE_info->UE_template[CC_id][UE_id].configured == false)
continue;
if (UE_info->UE_sched_ctrl[UE_id].ul_failure_timer > 0
+12 -12
View File
@@ -1989,7 +1989,7 @@ find_UE_id(module_id_t mod_idP,
return -1;
for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
if (UE_info->active[UE_id] == TRUE) {
if (UE_info->active[UE_id] == true) {
int CC_id = UE_PCCID(mod_idP, UE_id);
if (CC_id>=0 && CC_id<NFAPI_CC_MAX && UE_info->UE_template[CC_id][UE_id].rnti == rntiP) {
return UE_id;
@@ -2063,7 +2063,7 @@ UE_RNTI(module_id_t mod_idP,
}
//------------------------------------------------------------------------------
boolean_t
bool
is_UE_active(module_id_t mod_idP,
int ue_idP)
//------------------------------------------------------------------------------
@@ -2187,20 +2187,20 @@ add_new_ue(module_id_t mod_idP,
UE_info->num_UEs);
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
if (UE_info->active[i] == TRUE)
if (UE_info->active[i] == true)
continue;
UE_id = i;
memset(&UE_info->UE_template[cc_idP][UE_id], 0, sizeof(UE_TEMPLATE));
UE_info->UE_template[cc_idP][UE_id].rnti = rntiP;
UE_info->UE_template[cc_idP][UE_id].configured = FALSE;
UE_info->UE_template[cc_idP][UE_id].configured = false;
UE_info->numactiveCCs[UE_id] = 1;
UE_info->numactiveULCCs[UE_id] = 1;
UE_info->pCC_id[UE_id] = cc_idP;
UE_info->ordered_CCids[0][UE_id] = cc_idP;
UE_info->ordered_ULCCids[0][UE_id] = cc_idP;
UE_info->num_UEs++;
UE_info->active[UE_id] = TRUE;
UE_info->active[UE_id] = true;
add_ue_list(&UE_info->list, UE_id);
dump_ue_list(&UE_info->list);
pp_impl_param_t* dl = &RC.mac[mod_idP]->pre_processor_dl;
@@ -2280,7 +2280,7 @@ rrc_mac_remove_ue(module_id_t mod_idP,
UE_id,
pCC_id,
rntiP);
UE_info->active[UE_id] = FALSE;
UE_info->active[UE_id] = false;
UE_info->num_UEs--;
remove_ue_list(&UE_info->list, UE_id);
@@ -3488,7 +3488,7 @@ has_ul_grant(module_id_t module_idP,
}
//------------------------------------------------------------------------------
boolean_t
bool
CCE_allocation_infeasible(int module_idP,
int CC_idP,
int format_flag,
@@ -3501,7 +3501,7 @@ CCE_allocation_infeasible(int module_idP,
nfapi_dl_config_request_pdu_t *dl_config_pdu = &DL_req->dl_config_pdu_list[DL_req->number_pdu];
nfapi_hi_dci0_request_body_t *HI_DCI0_req = &RC.mac[module_idP]->HI_DCI0_req[CC_idP][subframe].hi_dci0_request_body;
nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci + HI_DCI0_req->number_of_hi];
boolean_t res = TRUE;
bool res = true;
if (format_flag != 2) { // DL DCI
if (DL_req->number_pdu == MAX_NUM_DL_PDU) {
@@ -3517,7 +3517,7 @@ CCE_allocation_infeasible(int module_idP,
subframe, format_flag, rnti, aggregation);
if (allocate_CCEs(module_idP, CC_idP, 0, subframe, 0) != -1)
res = FALSE;
res = false;
DL_req->number_pdu--;
}
@@ -3532,7 +3532,7 @@ CCE_allocation_infeasible(int module_idP,
HI_DCI0_req->number_of_dci++;
if (allocate_CCEs(module_idP, CC_idP, 0, subframe, 0) != -1)
res = FALSE;
res = false;
HI_DCI0_req->number_of_dci--;
}
@@ -5029,7 +5029,7 @@ SR_indication(module_id_t mod_idP,
if (UE_id != -1) {
UE_scheduling_ctrl = &(UE_info->UE_sched_ctrl[UE_id]);
if ((UE_scheduling_ctrl->cdrx_configured == TRUE) &&
if ((UE_scheduling_ctrl->cdrx_configured == true) &&
(UE_scheduling_ctrl->dci0_ongoing_timer > 0) &&
(UE_scheduling_ctrl->dci0_ongoing_timer < 8)) {
LOG_D(MAC, "[eNB %d][SR %x] Frame %d subframeP %d Signaling SR for UE %d on CC_id %d. \
@@ -5052,7 +5052,7 @@ SR_indication(module_id_t mod_idP,
}
UE_info->UE_template[cc_idP][UE_id].ul_SR = 1;
UE_info->UE_template[cc_idP][UE_id].ul_active = TRUE;
UE_info->UE_template[cc_idP][UE_id].ul_active = true;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SR_INDICATION, 1);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SR_INDICATION, 0);
}
+4 -4
View File
@@ -242,7 +242,7 @@ rx_sdu(const module_id_t enb_mod_idP,
}
/* CDRX UL HARQ timers */
if (UE_scheduling_control->cdrx_configured == TRUE) {
if (UE_scheduling_control->cdrx_configured == true) {
/* Synchronous UL HARQ */
UE_scheduling_control->ul_synchronous_harq_timer[CC_idP][harq_pid] = 5;
/*
@@ -1003,7 +1003,7 @@ rx_sdu(const module_id_t enb_mod_idP,
/* CDRX UL HARQ timers */
if (UE_id != -1) {
if (UE_scheduling_control->cdrx_configured == TRUE) {
if (UE_scheduling_control->cdrx_configured == true) {
/* Synchronous UL HARQ */
UE_scheduling_control->ul_synchronous_harq_timer[CC_idP][harq_pid] = 5;
/*
@@ -1447,7 +1447,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
continue;
// don't schedule if Msg5 is not received yet
if (UE_info->UE_template[CC_id][UE_id].configured == FALSE) {
if (UE_info->UE_template[CC_id][UE_id].configured == false) {
LOG_D(MAC,
"[eNB %d] frame %d, subframe %d, UE %d: not configured, skipping "
"UE scheduling \n",
@@ -2033,7 +2033,7 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP,
}
/* Don't schedule if Msg4 is not received yet */
if (UE_template->configured == FALSE) {
if (UE_template->configured == false) {
LOG_D(MAC,"[eNB %d] frame %d subframe %d, UE %d: not configured, skipping UE scheduling \n",
module_idP,
frameP,
+17 -17
View File
@@ -811,9 +811,9 @@ typedef struct {
/// TBS from last UL scheduling
int TBS_UL[8];
/// Flag to indicate UL has been scheduled at least once
boolean_t ul_active;
bool ul_active;
/// Flag to indicate UE has been configured (ACK from RRCConnectionSetup received)
boolean_t configured;
bool configured;
/// MCS from last scheduling
uint8_t mcs[8];
@@ -1026,16 +1026,16 @@ typedef struct {
/* C-DRX related timers */
/* Note: only valid for FDD and LTE UE when this comment is written (11-01-19)*/
/// is TRUE if the cqi mask feature is activated by RRC configuration
boolean_t cqi_mask_boolean;
/// is TRUE if the following drx parameters are configured for UE
boolean_t cdrx_configured;
/// is true if the cqi mask feature is activated by RRC configuration
bool cqi_mask_boolean;
/// is true if the following drx parameters are configured for UE
bool cdrx_configured;
/*
* if TRUE, the eNB has configured the CDRX locally, but is waiting for the UE to acknowledge
* if true, the eNB has configured the CDRX locally, but is waiting for the UE to acknowledge
* the activation. This is needed, during the RRC configuration process, when the context is
* configured on the eNB side, but not yet on the UE side...
*/
boolean_t cdrx_waiting_ack;
bool cdrx_waiting_ack;
/*
* Is set when a ULSCH scheduling is done and run until the first corresponding transmission is done (4 subframes).
* When set, SR cannot be set for the UE. This allows OAI to avoid concidering a SR as uncompleted if the UE sends
@@ -1043,16 +1043,16 @@ typedef struct {
* create a lost in timers synchronization.
*/
uint8_t dci0_ongoing_timer;
/// is TRUE if the UE is in "Active Time", hence listening to PDCCH
boolean_t in_active_time;
/// is true if the UE is in "Active Time", hence listening to PDCCH
bool in_active_time;
/// OnDurationTimer
uint16_t on_duration_timer;
uint16_t on_duration_timer_thres;
/// drx-InactivityTimer
uint16_t drx_inactivity_timer;
uint16_t drx_inactivity_timer_thres;
/// is TRUE if UE is currently in short DRX cycle
boolean_t in_short_drx_cycle;
/// is true if UE is currently in short DRX cycle
bool in_short_drx_cycle;
/// drxShortCycleTimer int (1..16) (number of short DRX cycles duration before long DRX cycles)
uint8_t drx_shortCycle_timer_value;
/// shortDRX-Cycle (duration of one short DRX cycle)
@@ -1060,8 +1060,8 @@ typedef struct {
/// DRX short cycle timer before switching to long DRX cycle = drx_shortCycle_timer_value * short_drx_cycle_duration
uint16_t drx_shortCycle_timer;
uint16_t drx_shortCycle_timer_thres;
/// is TRUE if UE is currently in long DRX cycle
boolean_t in_long_drx_cycle;
/// is true if UE is currently in long DRX cycle
bool in_long_drx_cycle;
/// longDRX-CycleStartOffset (long DRX cycle timer)
uint16_t drx_longCycle_timer;
uint16_t drx_longCycle_timer_thres;
@@ -1183,7 +1183,7 @@ typedef struct {
UE_sched_ctrl_t UE_sched_ctrl[MAX_MOBILES_PER_ENB];
UE_list_t list;
int num_UEs;
boolean_t active[MAX_MOBILES_PER_ENB];
bool active[MAX_MOBILES_PER_ENB];
} UE_info_t;
/*! \brief deleting control information*/
@@ -1191,9 +1191,9 @@ typedef struct {
///rnti of UE
rnti_t rnti;
///remove UE context flag
boolean_t removeContextFlg;
bool removeContextFlg;
///remove RA flag
boolean_t raFlag;
bool raFlag;
} UE_free_ctrl_t;
/*! \brief REMOVE UE list used by eNB to order UEs/CC for deleting*/
typedef struct {
+1 -1
View File
@@ -71,7 +71,7 @@ extern rb_id_t mbms_rab_id;
extern uint16_t pre_nb_rbs_required[2][MAX_NUM_CCs][NUMBER_OF_UE_MAX];
extern uint8_t dlsch_ue_select_tbl_in_use;
extern uint8_t new_dlsch_ue_select_tbl_in_use;
extern boolean_t pre_scd_activeUE[NUMBER_OF_UE_MAX];
extern bool pre_scd_activeUE[NUMBER_OF_UE_MAX];
extern eNB_UE_STATS pre_scd_eNB_UE_stats[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
#endif
+8 -9
View File
@@ -400,7 +400,7 @@ int find_RA_id(module_id_t mod_idP, int CC_idP, rnti_t rntiP);
rnti_t UE_RNTI(module_id_t module_idP, int UE_id);
int UE_PCCID(module_id_t module_idP, int UE_id);
uint8_t find_active_UEs(module_id_t module_idP);
boolean_t is_UE_active(module_id_t module_idP, int UE_id);
bool is_UE_active(module_id_t module_idP, int UE_id);
uint8_t get_aggregation(uint8_t bw_index, uint8_t cqi, uint8_t dci_fmt);
int8_t find_active_UEs_with_traffic(module_id_t module_idP);
@@ -416,11 +416,11 @@ int get_nCCE_offset(int *CCE_table,
int allocate_CCEs(int module_idP, int CC_idP, frame_t frameP, sub_frame_t subframeP, int test_only);
boolean_t CCE_allocation_infeasible(int module_idP,
int CC_idP,
int common_flag,
int subframe,
int aggregation, int rnti);
bool CCE_allocation_infeasible(int module_idP,
int CC_idP,
int common_flag,
int subframe,
int aggregation, int rnti);
/* tries to allocate a CCE. If it succeeds, reserves NFAPI DCI and DLSCH config */
int CCE_try_allocate_dlsch(int module_id,
int CC_id,
@@ -741,13 +741,12 @@ BSR_SHORT *get_bsr_short(module_id_t module_idP, uint8_t bsr_len);
*/
BSR_LONG *get_bsr_long(module_id_t module_idP, uint8_t bsr_len);
/*! \fn boolean_t update_bsr(module_id_t module_idP, frame_t frameP,sub_frame_t subframeP)
/*! \fn bool update_bsr(module_id_t module_idP, frame_t frameP,sub_frame_t subframeP)
\brief get the rlc stats and update the bsr level for each lcid
\param[in] Mod_id instance of the UE
\param[in] frame Frame index
*/
boolean_t update_bsr(module_id_t module_idP, frame_t frameP,
sub_frame_t subframeP, eNB_index_t eNB_index);
bool update_bsr(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, eNB_index_t eNB_index);
/*! \fn locate_BsrIndexByBufferSize (int *table, int size, int value)
\brief locate the BSR level in the table as defined in 36.321. This function requires that he values in table to be monotonic, either increasing or decreasing. The returned value is not less than 0, nor greater than n-1, where n is the size of table.
+1 -1
View File
@@ -638,7 +638,7 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id,
LOG_E(MAC, "UE %d has RNTI NOT_A_RNTI!\n", UE_id);
continue;
}
if (UE_info->active[UE_id] != TRUE) {
if (UE_info->active[UE_id] != true) {
LOG_E(MAC, "UE %d RNTI %x is NOT active!\n", UE_id, rnti);
continue;
}
+14 -14
View File
@@ -2325,8 +2325,8 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
uint8_t bsr_len = 0, bsr_ce_len = 0, bsr_header_len = 0;
uint8_t phr_header_len = 0, phr_ce_len = 0, phr_len = 0;
uint8_t lcid = 0, lcid_rlc_pdu_count = 0;
boolean_t is_lcid_processed = FALSE;
boolean_t is_all_lcid_processed = FALSE;
bool is_lcid_processed = false;
bool is_all_lcid_processed = false;
uint16_t sdu_lengths[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
uint8_t sdu_lcids[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
uint8_t payload_offset = 0, num_sdus = 0;
@@ -2444,11 +2444,11 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
// Check for DCCH first
// TO DO: Multiplex in the order defined by the logical channel prioritization
for (lcid = DCCH;
(lcid < MAX_NUM_LCID) && (is_all_lcid_processed == FALSE); lcid++) {
(lcid < MAX_NUM_LCID) && (is_all_lcid_processed == false); lcid++) {
if (UE_mac_inst[module_idP].scheduling_info.LCID_status[lcid] ==
LCID_NOT_EMPTY) {
lcid_rlc_pdu_count = 0;
is_lcid_processed = FALSE;
is_lcid_processed = false;
lcid_buffer_occupancy_old =
mac_rlc_get_buffer_occupancy_ind(module_idP,
UE_mac_inst[module_idP].
@@ -2536,8 +2536,8 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
//No more remaining TBS after this PDU
//exit the function
rlc_pdu_header_len_last = 1;
is_lcid_processed = TRUE;
is_all_lcid_processed = TRUE;
is_lcid_processed = true;
is_all_lcid_processed = true;
} else {
rlc_pdu_header_len_last =
(sdu_lengths[num_sdus] > 128) ? 3 : 2;
@@ -2547,8 +2547,8 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
(bsr_len + phr_len + total_rlc_pdu_header_len +
rlc_pdu_header_len_last + sdu_length_total)) {
rlc_pdu_header_len_last = 1;
is_lcid_processed = TRUE;
is_all_lcid_processed = TRUE;
is_lcid_processed = true;
is_all_lcid_processed = true;
}
}
@@ -2559,7 +2559,7 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
lcid_rlc_pdu_count++;
} else {
/* avoid infinite loop ... */
is_lcid_processed = TRUE;
is_lcid_processed = true;
}
/* Get updated BO after multiplexing this PDU */
@@ -3164,7 +3164,7 @@ ue_scheduler(const module_id_t module_idP,
}
//Check whether Regular BSR is triggered
if (update_bsr(module_idP, txFrameP, txSubframeP, eNB_indexP) == TRUE) {
if (update_bsr(module_idP, txFrameP, txSubframeP, eNB_indexP) == true) {
// call SR procedure to generate pending SR and BSR for next PUCCH/PUSCH TxOp. This should implement the procedures
// outlined in Sections 5.4.4 an 5.4.5 of 36.321
UE_mac_inst[module_idP].scheduling_info.SR_pending = 1;
@@ -3251,11 +3251,11 @@ ue_scheduler(const module_id_t module_idP,
// to be improved
boolean_t
bool
update_bsr(module_id_t module_idP, frame_t frameP,
sub_frame_t subframeP, eNB_index_t eNB_index) {
mac_rlc_status_resp_t rlc_status;
boolean_t bsr_regular_triggered = FALSE;
bool bsr_regular_triggered = false;
uint8_t lcid;
uint8_t lcgid;
uint8_t num_lcid_with_data = 0; // for LCID with data only if LCGID is defined
@@ -3352,7 +3352,7 @@ update_bsr(module_id_t module_idP, frame_t frameP,
(lcgid_buffer_remain
[UE_mac_inst[module_idP].scheduling_info.LCGID[lcid]] ==
0)) {
bsr_regular_triggered = TRUE;
bsr_regular_triggered = true;
LOG_D(MAC,
"[UE %d] PDCCH Tick : MAC BSR Triggered LCID%d LCGID%d data become available at frame %d subframe %d\n",
module_idP, lcid,
@@ -3364,7 +3364,7 @@ update_bsr(module_id_t module_idP, frame_t frameP,
// Trigger Regular BSR if ReTxBSR Timer has expired and UE has data for transmission
if (UE_mac_inst[module_idP].scheduling_info.retxBSR_SF == 0) {
bsr_regular_triggered = TRUE;
bsr_regular_triggered = true;
if ((UE_mac_inst[module_idP].BSR_reporting_active &
BSR_TRIGGER_REGULAR) == 0) {
@@ -74,7 +74,7 @@ extern uint8_t rb_table[34];
extern uint16_t pre_nb_rbs_required[2][MAX_NUM_CCs][NUMBER_OF_UE_MAX];
extern uint8_t dlsch_ue_select_tbl_in_use;
extern uint8_t new_dlsch_ue_select_tbl_in_use;
extern boolean_t pre_scd_activeUE[NUMBER_OF_UE_MAX];
extern bool pre_scd_activeUE[NUMBER_OF_UE_MAX];
extern eNB_UE_STATS pre_scd_eNB_UE_stats[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
#endif*/
+1 -1
View File
@@ -580,7 +580,7 @@ int nr_rrc_mac_config_req_ue_logicalChannelBearer(
int cc_idP,
uint8_t gNB_index,
long logicalChannelIdentity,
boolean_t status){
bool status){
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
mac->logicalChannelBearer_exist[logicalChannelIdentity] = status;
return 0;
+2 -2
View File
@@ -415,7 +415,7 @@ typedef struct {
uint8_t BSR_reporting_active;
/// LogicalChannelConfig has bearer.
boolean_t logicalChannelBearer_exist[NR_MAX_NUM_LCID];
bool logicalChannelBearer_exist[NR_MAX_NUM_LCID];
NR_UE_SCHEDULING_INFO scheduling_info;
/// PHR
@@ -546,7 +546,7 @@ typedef struct prach_association_pattern {
// SSB details
typedef struct ssb_info {
boolean_t transmitted; // True if the SSB index is transmitted according to the SSB positions map configuration
bool transmitted; // True if the SSB index is transmitted according to the SSB positions map configuration
prach_occasion_info_t *mapped_ro[MAX_NB_RO_PER_SSB_IN_ASSOCIATION_PATTERN]; // List of mapped RACH Occasions to this SSB index
uint16_t nb_mapped_ro; // Total number of mapped ROs to this SSB index
} ssb_info_t;
+8 -10
View File
@@ -85,14 +85,12 @@ int8_t nr_ue_decode_BCCH_DL_SCH(module_id_t module_id,
\param cc_id component carrier id
\param gNB_index gNB index
\param long logicalChannelIdentity
\param boolean_t status*/
int nr_rrc_mac_config_req_ue_logicalChannelBearer(
module_id_t module_id,
int cc_idP,
uint8_t gNB_index,
long logicalChannelIdentity,
boolean_t status
);
\param bool status*/
int nr_rrc_mac_config_req_ue_logicalChannelBearer(module_id_t module_id,
int cc_idP,
uint8_t gNB_index,
long logicalChannelIdentity,
bool status);
/**\brief primitive from RRC layer to MAC layer for configuration L1/L2, now supported 4 rrc messages: MIB, cell_group_config for MAC/PHY, spcell_config(serving cell config)
\param module_id module id
@@ -154,14 +152,14 @@ void fill_scheduled_response(nr_scheduled_response_t *scheduled_response,
*/
int8_t nr_ue_get_SR(module_id_t module_idP, frame_t frameP, slot_t slotP);
/*! \fn boolean_t update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t gNB_index)
/*! \fn bool update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t gNB_index)
\brief get the rlc stats and update the bsr level for each lcid
\param[in] Mod_id instance of the UE
\param[in] frameP Frame index
\param[in] slot slotP number
\param[in] uint8_t gNB_index
*/
boolean_t nr_update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t gNB_index);
bool nr_update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t gNB_index);
/*! \fn nr_locate_BsrIndexByBufferSize (int *table, int size, int value)
\brief locate the BSR level in the table as defined in 38.321. This function requires that he values in table to be monotonic, either increasing or decreasing. The returned value is not less than 0, nor greater than n-1, where n is the size of table.
+1 -1
View File
@@ -325,7 +325,7 @@ void ssb_rach_config(RA_config_t *ra, NR_PRACH_RESOURCES_t *prach_resources, NR_
// =======================================
NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR ssb_perRACH_config = nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present;
boolean_t multiple_ssb_per_ro; // true if more than one or exactly one SSB per RACH occasion, false if more than one RO per SSB
bool multiple_ssb_per_ro; // true if more than one or exactly one SSB per RACH occasion, false if more than one RO per SSB
uint8_t ssb_rach_ratio; // Nb of SSBs per RACH or RACHs per SSB
int total_preambles_per_ssb;
uint8_t ssb_nb_in_ro;
+7 -7
View File
@@ -2002,7 +2002,7 @@ int find_pucch_resource_set(NR_UE_MAC_INST_t *mac, int uci_size) {
* processing slots of reception/transmission
* gNB_id identifier
*
* RETURN : TRUE a valid resource has been found
* RETURN : true a valid resource has been found
*
* DESCRIPTION : return tx harq process identifier for given transmission slot
* TS 38.213 9.2.1 PUCCH Resource Sets
@@ -2132,7 +2132,7 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
int number_harq_feedback = 0;
uint32_t dai_current = 0;
uint32_t dai_max = 0;
bool two_transport_blocks = FALSE;
bool two_transport_blocks = false;
int number_of_code_word = 1;
int U_DAI_c = 0;
int N_m_c_rx = 0;
@@ -2154,7 +2154,7 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
bwpd->pdsch_Config->choice.setup &&
bwpd->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI &&
bwpd->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI[0] == 2) {
two_transport_blocks = TRUE;
two_transport_blocks = true;
number_of_code_word = 2;
}
@@ -2254,7 +2254,7 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
* For a monitoring occasion of a PDCCH with DCI format 1_0 or DCI format 1_1 in at least one serving cell,
* when a UE receives a PDSCH with one transport block and the value of higher layer parameter maxNrofCodeWordsScheduledByDCI is 2,
* the HARQ-ACK response is associated with the first transport block and the UE generates a NACK for the second transport block
* if spatial bundling is not applied (HARQ-ACK-spatial-bundling-PUCCH = FALSE) and generates HARQ-ACK value of ACK for the second
* if spatial bundling is not applied (HARQ-ACK-spatial-bundling-PUCCH = false) and generates HARQ-ACK value of ACK for the second
* transport block if spatial bundling is applied.
*/
@@ -2265,7 +2265,7 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
ack_data[code_word][i] = 0; /* nack data transport block which has been missed */
number_harq_feedback++;
}
if (two_transport_blocks == TRUE) {
if (two_transport_blocks == true) {
dai_total[code_word][i] = dai[code_word][i]; /* for a single cell, dai_total is the same as dai of first cell */
}
}
@@ -2296,7 +2296,7 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
o_ACK = o_ACK | (ack_data[1][m] << O_bit_number_cw1);
}
if (two_transport_blocks == TRUE) {
if (two_transport_blocks == true) {
O_bit_number_cw0 = (8 * j) + 2*(V_temp - 1);
}
else {
@@ -2311,7 +2311,7 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
j = j + 1;
}
if (two_transport_blocks == TRUE) {
if (two_transport_blocks == true) {
O_ACK = 2 * ( 4 * j + V_temp2); /* for two transport blocks */
}
else {
+7 -7
View File
@@ -1247,7 +1247,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
}
//Check whether Regular BSR is triggered
if (nr_update_bsr(mod_id, txFrameP, txSlotP, gNB_indexP) == TRUE) {
if (nr_update_bsr(mod_id, txFrameP, txSlotP, gNB_indexP) == true) {
// call SR procedure to generate pending SR and BSR for next PUCCH/PUSCH TxOp. This should implement the procedures
// outlined in Sections 5.4.4 an 5.4.5 of 38.321
mac->scheduling_info.SR_pending = 1;
@@ -1260,10 +1260,10 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
}
boolean_t
bool
nr_update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t gNB_index) {
mac_rlc_status_resp_t rlc_status;
boolean_t bsr_regular_triggered = FALSE;
bool bsr_regular_triggered = false;
uint8_t lcid;
uint8_t lcgid;
uint8_t num_lcid_with_data = 0; // for LCID with data only if LCGID is defined
@@ -1356,7 +1356,7 @@ nr_update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t gNB_
which belong to any LCG and for which data is already available for transmission
*/
{
bsr_regular_triggered = TRUE;
bsr_regular_triggered = true;
LOG_D(NR_MAC, "[UE %d] PDCCH Tick : MAC BSR Triggered LCID%d LCGID%d data become available at frame %d slot %d\n",
module_idP, lcid,
mac->scheduling_info.LCGID[lcid],
@@ -1367,7 +1367,7 @@ nr_update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t gNB_
// Trigger Regular BSR if ReTxBSR Timer has expired and UE has data for transmission
if (mac->scheduling_info.retxBSR_SF == 0) {
bsr_regular_triggered = TRUE;
bsr_regular_triggered = true;
if ((mac->BSR_reporting_active & NR_BSR_TRIGGER_REGULAR) == 0) {
LOG_I(NR_MAC, "[UE %d] PDCCH Tick : MAC BSR Triggered ReTxBSR Timer expiry at frame %d slot %d\n",
@@ -1628,7 +1628,7 @@ static void build_ro_list(NR_UE_MAC_INST_t *mac) {
int y2; // PRACH Configuration Index table additional variable used to compute the valid frame numbers
uint8_t slot_shift_for_map;
uint8_t map_shift;
boolean_t even_slot_invalid;
bool even_slot_invalid;
int64_t s_map;
uint8_t prach_conf_start_symbol; // Starting symbol of the PRACH occasions in the PRACH slot
uint8_t N_t_slot; // Number of PRACH occasions in a 14-symbols PRACH slot
@@ -1900,7 +1900,7 @@ static void map_ssb_to_ro(NR_UE_MAC_INST_t *mac) {
mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.rach_ConfigCommon->choice.setup;
NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR ssb_perRACH_config = setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present;
boolean_t multiple_ssb_per_ro; // true if more than one or exactly one SSB per RACH occasion, false if more than one RO per SSB
bool multiple_ssb_per_ro; // true if more than one or exactly one SSB per RACH occasion, false if more than one RO per SSB
uint8_t ssb_rach_ratio; // Nb of SSBs per RACH or RACHs per SSB
uint16_t required_nb_of_prach_occasion; // Nb of RACH occasions required to map all the SSBs
uint8_t required_nb_of_prach_conf_period; // Nb of PRACH configuration periods required to map all the SSBs
-1
View File
@@ -673,7 +673,6 @@ typedef struct {
} NR_UE_sched_ctrl_t;
typedef struct {
boolean_t fiveG_connected;
uicc_t *uicc;
} NRUEcontext_t;
+100 -108
View File
@@ -139,7 +139,7 @@ extern volatile int oai_exit;
pthread_t pdcp_stats_thread_desc;
// will be called when 4G F1 implementation will use GTP-U instead of protobuf
boolean_t cu_f1u_data_req(
bool cu_f1u_data_req(
protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_id,
@@ -228,7 +228,7 @@ rlc_op_status_t cu_send_to_du(const protocol_ctxt_t *const ctxt,
__func__, rb_id, size);
extern instance_t CUuniqInstance;
itti_send_msg_to_task(TASK_GTPV1_U, CUuniqInstance, message_p);
return TRUE;
return true;
}
//-----------------------------------------------------------------------------
@@ -239,18 +239,16 @@ rlc_op_status_t cu_send_to_du(const protocol_ctxt_t *const ctxt,
* this mem_block_t to be dissected for testing purposes. For further details see test
* code at targets/TEST/PDCP/test_pdcp.c:test_pdcp_data_req()
*/
boolean_t pdcp_data_req(
protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_sizeP,
unsigned char *const sdu_buffer_pP,
const pdcp_transmission_mode_t modeP,
const uint32_t *const sourceL2Id,
const uint32_t *const destinationL2Id
)
bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_sizeP,
unsigned char *const sdu_buffer_pP,
const pdcp_transmission_mode_t modeP,
const uint32_t *const sourceL2Id,
const uint32_t *const destinationL2Id)
//-----------------------------------------------------------------------------
{
pdcp_t *pdcp_p = NULL;
@@ -261,7 +259,7 @@ boolean_t pdcp_data_req(
uint16_t current_sn = 0;
mem_block_t *pdcp_pdu_p = NULL;
rlc_op_status_t rlc_status;
boolean_t ret = TRUE;
bool ret = true;
hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE;
hashtable_rc_t h_rc;
uint8_t rb_offset= (srb_flagP == 0) ? DTCH -1 : 0;
@@ -277,7 +275,7 @@ boolean_t pdcp_data_req(
if (sdu_buffer_sizeP == 0) {
LOG_W(PDCP, "Handed SDU is of size 0! Ignoring...\n");
return FALSE;
return false;
}
/*
@@ -287,12 +285,12 @@ boolean_t pdcp_data_req(
sdu_buffer_sizeP, MAX_IP_PACKET_SIZE);
if (modeP == PDCP_TRANSMISSION_MODE_TRANSPARENT) {
AssertError (rb_idP < NB_RB_MBMS_MAX, return FALSE, "RB id is too high (%ld/%d) %u %u!\n", rb_idP, NB_RB_MBMS_MAX, ctxt_pP->module_id, ctxt_pP->rnti);
AssertError (rb_idP < NB_RB_MBMS_MAX, return false, "RB id is too high (%ld/%d) %u %u!\n", rb_idP, NB_RB_MBMS_MAX, ctxt_pP->module_id, ctxt_pP->rnti);
} else {
if (srb_flagP) {
AssertError (rb_idP < 3, return FALSE, "RB id is too high (%ld/%d) %u %u!\n", rb_idP, 3, ctxt_pP->module_id, ctxt_pP->rnti);
AssertError (rb_idP < 3, return false, "RB id is too high (%ld/%d) %u %u!\n", rb_idP, 3, ctxt_pP->module_id, ctxt_pP->rnti);
} else {
AssertError (rb_idP < LTE_maxDRB, return FALSE, "RB id is too high (%ld/%d) %u %u!\n", rb_idP, LTE_maxDRB, ctxt_pP->module_id, ctxt_pP->rnti);
AssertError (rb_idP < LTE_maxDRB, return false, "RB id is too high (%ld/%d) %u %u!\n", rb_idP, LTE_maxDRB, ctxt_pP->module_id, ctxt_pP->rnti);
}
}
@@ -304,7 +302,7 @@ boolean_t pdcp_data_req(
LOG_W(PDCP, PROTOCOL_CTXT_FMT" Instance is not configured for rb_id %ld Ignoring SDU...\n",
PROTOCOL_CTXT_ARGS(ctxt_pP),
rb_idP);
return FALSE;
return false;
}
}
@@ -371,7 +369,7 @@ boolean_t pdcp_data_req(
memset(&pdu_header.mac_i[0],0,PDCP_CONTROL_PLANE_DATA_PDU_MAC_I_SIZE);
memset(&pdcp_pdu_p->data[sdu_buffer_sizeP + pdcp_header_len],0,PDCP_CONTROL_PLANE_DATA_PDU_MAC_I_SIZE);
if (pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer((unsigned char *)pdcp_pdu_p->data, &pdu_header) == FALSE) {
if (pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer((unsigned char *)pdcp_pdu_p->data, &pdu_header) == false) {
LOG_E(PDCP, PROTOCOL_PDCP_CTXT_FMT" Cannot fill PDU buffer with relevant header fields!\n",
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_p));
@@ -382,7 +380,7 @@ boolean_t pdcp_data_req(
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ,VCD_FUNCTION_OUT);
return FALSE;
return false;
}
} else {
pdcp_user_plane_data_pdu_header_with_long_sn pdu_header;
@@ -390,7 +388,7 @@ boolean_t pdcp_data_req(
pdu_header.sn = pdcp_get_next_tx_seq_number(pdcp_p);
current_sn = pdu_header.sn ;
if (pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer((unsigned char *)pdcp_pdu_p->data, &pdu_header) == FALSE) {
if (pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer((unsigned char *)pdcp_pdu_p->data, &pdu_header) == false) {
LOG_E(PDCP, PROTOCOL_PDCP_CTXT_FMT" Cannot fill PDU buffer with relevant header fields!\n",
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_p));
@@ -401,7 +399,7 @@ boolean_t pdcp_data_req(
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ,VCD_FUNCTION_OUT);
return FALSE;
return false;
}
}
@@ -422,7 +420,7 @@ boolean_t pdcp_data_req(
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ,VCD_FUNCTION_OUT);
return FALSE;
return false;
}
LOG_D(PDCP, "Sequence number %d is assigned to current PDU\n", current_sn);
@@ -481,7 +479,7 @@ boolean_t pdcp_data_req(
ctxt_pP->module_id,
rb_idP);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ,VCD_FUNCTION_OUT);
return FALSE;
return false;
}
/*
@@ -497,16 +495,16 @@ boolean_t pdcp_data_req(
if (ctxt_pP->enb_flag == ENB_FLAG_YES && NODE_IS_DU(RC.rrc[ctxt_pP->module_id]->node_type)) {
LOG_E(PDCP, "Can't be DU, bad node type %d \n", RC.rrc[ctxt_pP->module_id]->node_type);
ret=FALSE;
ret = false;
} else {
rlc_status = pdcp_params.send_rlc_data_req_func(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP,
confirmP, pdcp_pdu_size, pdcp_pdu_p,sourceL2Id,
destinationL2Id);
ret=FALSE;
ret = false;
switch (rlc_status) {
case RLC_OP_STATUS_OK:
LOG_D(PDCP, "Data sending request over RLC succeeded!\n");
ret=TRUE;
ret=true;
break;
case RLC_OP_STATUS_BAD_PARAMETER:
@@ -544,7 +542,7 @@ boolean_t pdcp_data_req(
itti_send_msg_to_task (TASK_CU_F1, ctxt_pP->module_id, message_p);
//CU_send_DL_RRC_MESSAGE_TRANSFER(ctxt_pP->module_id, message_p);
LOG_I(PDCP, "Send F1AP_DL_RRC_MESSAGE with ITTI\n");
ret=TRUE;
ret=true;
} else {
rlc_status = rlc_data_req(ctxt_pP
, srb_flagP
@@ -561,27 +559,27 @@ boolean_t pdcp_data_req(
switch (rlc_status) {
case RLC_OP_STATUS_OK:
LOG_D(PDCP, "Data sending request over RLC succeeded!\n");
ret=TRUE;
ret=true;
break;
case RLC_OP_STATUS_BAD_PARAMETER:
LOG_W(PDCP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n");
ret= FALSE;
ret= false;
break;
case RLC_OP_STATUS_INTERNAL_ERROR:
LOG_W(PDCP, "Data sending request over RLC failed with 'Internal Error' reason!\n");
ret= FALSE;
ret= false;
break;
case RLC_OP_STATUS_OUT_OF_RESSOURCES:
LOG_W(PDCP, "Data sending request over RLC failed with 'Out of Resources' reason!\n");
ret= FALSE;
ret= false;
break;
default:
LOG_W(PDCP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status);
ret= FALSE;
ret= false;
break;
} // switch case
}
@@ -596,7 +594,7 @@ boolean_t pdcp_data_req(
/*
* Control arrives here only if rlc_data_req() returns RLC_OP_STATUS_OK
* so we return TRUE afterwards
* so we return true afterwards
*/
for (pdcp_uid=0; pdcp_uid< MAX_MOBILES_PER_ENB; pdcp_uid++) {
@@ -619,7 +617,7 @@ boolean_t pdcp_data_req(
//-----------------------------------------------------------------------------
boolean_t
bool
pdcp_data_ind(
const protocol_ctxt_t *const ctxt_pP,
const srb_flag_t srb_flagP,
@@ -638,7 +636,7 @@ pdcp_data_ind(
pdcp_sn_t sequence_number = 0;
volatile sdu_size_t payload_offset = 0;
rb_id_t rb_id = rb_idP;
boolean_t packet_forwarded = FALSE;
bool packet_forwarded = false;
hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE;
hashtable_rc_t h_rc;
uint8_t rb_offset= (srb_flagP == 0) ? DTCH -1 :0;
@@ -654,7 +652,7 @@ pdcp_data_ind(
"[MSG] PDCP UL %s PDU on rb_id %ld\n", (srb_flagP)? "CONTROL" : "DATA", rb_idP);
if (MBMS_flagP) {
AssertError (rb_idP < NB_RB_MBMS_MAX, return FALSE,
AssertError (rb_idP < NB_RB_MBMS_MAX, return false,
"RB id is too high (%ld/%d) %u rnti %x!\n",
rb_idP,
NB_RB_MBMS_MAX,
@@ -680,12 +678,12 @@ pdcp_data_ind(
}
} else {
rb_id = rb_idP % LTE_maxDRB;
AssertError (rb_id < LTE_maxDRB, return FALSE, "RB id is too high (%ld/%d) %u UE %x!\n",
AssertError (rb_id < LTE_maxDRB, return false, "RB id is too high (%ld/%d) %u UE %x!\n",
rb_id,
LTE_maxDRB,
ctxt_pP->module_id,
ctxt_pP->rnti);
AssertError (rb_id > 0, return FALSE, "RB id is too low (%ld/%d) %u UE %x!\n",
AssertError (rb_id > 0, return false, "RB id is too low (%ld/%d) %u UE %x!\n",
rb_id,
LTE_maxDRB,
ctxt_pP->module_id,
@@ -700,14 +698,14 @@ pdcp_data_ind(
key);
free_mem_block(sdu_buffer_pP, __func__);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_OUT);
return FALSE;
return false;
}
}
if (sdu_buffer_sizeP == 0) {
LOG_W(PDCP, "SDU buffer size is zero! Ignoring this chunk!\n");
return FALSE;
return false;
}
if (ctxt_pP->enb_flag) {
@@ -764,13 +762,13 @@ pdcp_data_ind(
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_OUT);
return FALSE;
return false;
}
#if 0
/* Removed by Cedric */
if (pdcp_is_rx_seq_number_valid(sequence_number, pdcp_p, srb_flagP) == TRUE) {
if (pdcp_is_rx_seq_number_valid(sequence_number, pdcp_p, srb_flagP) == true) {
LOG_T(PDCP, "Incoming PDU has a sequence number (%d) in accordance with RX window\n", sequence_number);
/* if (dc == PDCP_DATA_PDU )
LOG_D(PDCP, "Passing piggybacked SDU to NAS driver...\n");
@@ -788,7 +786,7 @@ pdcp_data_ind(
*/
LOG_W(PDCP, "Ignoring PDU...\n");
free_mem_block(sdu_buffer_pP, __func__);
return FALSE;
return false;
}
#endif
@@ -837,7 +835,7 @@ pdcp_data_ind(
LOG_W(PDCP, "Ignoring PDU...\n");
free_mem_block(sdu_buffer_pP, __func__);
/* TODO: indicate integrity verification failure to upper layer */
return FALSE;
return false;
}
if (sequence_number < pdcp_p->next_pdcp_rx_sn)
@@ -864,7 +862,7 @@ pdcp_data_ind(
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_OUT);
return TRUE;
return true;
} /* if (srb_flagP) */
/*
@@ -892,7 +890,7 @@ pdcp_data_ind(
LOG_W(PDCP, "Ignoring PDU...\n");
free_mem_block(sdu_buffer_pP, __func__);
/* TODO: indicate integrity verification failure to upper layer */
return FALSE;
return false;
} else if (pdcp_p->next_pdcp_rx_sn - sequence_number > reordering_window) {
pdcp_p->rx_hfn++;
rx_hfn_for_count = pdcp_p->rx_hfn;
@@ -948,7 +946,7 @@ pdcp_data_ind(
LOG_W(PDCP, "Ignoring PDU...\n");
free_mem_block(sdu_buffer_pP, __func__);
/* TODO: indicate integrity verification failure to upper layer */
return FALSE;
return false;
}
/* TODO: specs say we have to store this PDU in a list and then deliver
@@ -1015,7 +1013,7 @@ pdcp_data_ind(
LOG_W(PDCP, "Ignoring PDU...\n");
free_mem_block(sdu_buffer_pP, __func__);
/* TODO: indicate integrity verification failure to upper layer */
return FALSE;
return false;
}
break;
@@ -1039,7 +1037,7 @@ pdcp_data_ind(
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_OUT);
return TRUE;
return true;
}
// XXX Decompression would be done at this point
@@ -1051,7 +1049,7 @@ pdcp_data_ind(
*/
if (LINK_ENB_PDCP_TO_GTPV1U) {
if ((TRUE == ctxt_pP->enb_flag) && (FALSE == srb_flagP)) {
if ((true == ctxt_pP->enb_flag) && (false == srb_flagP)) {
LOG_D(PDCP, "Sending packet to GTP, Calling GTPV1U_ENB_TUNNEL_DATA_REQ ue %x rab %ld len %u\n",
ctxt_pP->rnti,
rb_id + 4,
@@ -1069,10 +1067,10 @@ pdcp_data_ind(
GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).rnti = ctxt_pP->rnti;
GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).rab_id = rb_id + 4;
itti_send_msg_to_task(TASK_GTPV1_U, INSTANCE_DEFAULT, message_p);
packet_forwarded = TRUE;
packet_forwarded = true;
}
} else {
packet_forwarded = FALSE;
packet_forwarded = false;
}
#ifdef MBMS_MULTICAST_OUT
@@ -1086,13 +1084,13 @@ pdcp_data_ind(
// dest_addr.sin_addr.s_addr = ip_header->daddr;
// sendto(mbms_socket, &sdu_buffer_pP->data[payload_offset], sdu_buffer_sizeP - payload_offset, MSG_DONTWAIT, (struct sockaddr*)&dest_addr, sizeof(dest_addr));
// //packet_forwarded = TRUE;
// //packet_forwarded = true;
}
#endif
if (FALSE == packet_forwarded) {
if (false == packet_forwarded) {
notifiedFIFO_elt_t * new_sdu_p = newNotifiedFIFO_elt(sdu_buffer_sizeP - payload_offset + sizeof (pdcp_data_ind_header_t), 0, NULL, NULL);
if ((MBMS_flagP == 0) && (pdcp_p->rlc_mode == RLC_MODE_AM)) {
@@ -1185,7 +1183,7 @@ pdcp_data_ind(
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_OUT);
return TRUE;
return true;
}
void pdcp_update_stats(const protocol_ctxt_t *const ctxt_pP) {
@@ -1297,7 +1295,7 @@ pdcp_run (
NULL, NULL
);
if (result != TRUE)
if (result != true)
LOG_E(PDCP, "PDCP data request failed!\n");
// Message buffer has been processed, free it now.
@@ -1420,7 +1418,7 @@ pdcp_mbms_run (
// NULL, NULL
// );
//
// if (result != TRUE)
// if (result != true)
// LOG_E(PDCP, "PDCP data request failed!\n");
//
// // Message buffer has been processed, free it now.
@@ -1549,10 +1547,7 @@ void pdcp_add_UE(const protocol_ctxt_t *const ctxt_pP) {
}
//-----------------------------------------------------------------------------
boolean_t
pdcp_remove_UE(
const protocol_ctxt_t *const ctxt_pP
)
bool pdcp_remove_UE(const protocol_ctxt_t *const ctxt_pP)
//-----------------------------------------------------------------------------
{
LTE_DRB_Identity_t srb_id = 0;
@@ -1599,19 +1594,17 @@ pdcp_remove_UE(
//-----------------------------------------------------------------------------
boolean_t
rrc_pdcp_config_asn1_req (
const protocol_ctxt_t *const ctxt_pP,
LTE_SRB_ToAddModList_t *const srb2add_list_pP,
LTE_DRB_ToAddModList_t *const drb2add_list_pP,
LTE_DRB_ToReleaseList_t *const drb2release_list_pP,
const uint8_t security_modeP,
uint8_t *const kRRCenc_pP,
uint8_t *const kRRCint_pP,
uint8_t *const kUPenc_pP,
LTE_PMCH_InfoList_r9_t *const pmch_InfoList_r9_pP,
rb_id_t *const defaultDRB
)
bool
rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
LTE_SRB_ToAddModList_t *const srb2add_list_pP,
LTE_DRB_ToAddModList_t *const drb2add_list_pP,
LTE_DRB_ToReleaseList_t *const drb2release_list_pP,
const uint8_t security_modeP,
uint8_t *const kRRCenc_pP,
uint8_t *const kRRCint_pP,
uint8_t *const kUPenc_pP,
LTE_PMCH_InfoList_r9_t *const pmch_InfoList_r9_pP,
rb_id_t *const defaultDRB)
//-----------------------------------------------------------------------------
{
long int lc_id = 0;
@@ -1669,7 +1662,7 @@ rrc_pdcp_config_asn1_req (
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
key);
free(pdcp_p);
return TRUE;
return true;
} else {
LOG_D(PDCP, PROTOCOL_PDCP_CTXT_FMT" CONFIG_ACTION_ADD key 0x%"PRIx64"\n",
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
@@ -1784,13 +1777,13 @@ rrc_pdcp_config_asn1_req (
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
key_defaultDRB);
free(pdcp_p);
return TRUE;
return true;
} else if (h_rc != HASH_TABLE_OK) {
LOG_E(PDCP, PROTOCOL_PDCP_CTXT_FMT" CONFIG_ACTION_ADD ADD key 0x%"PRIx64" FAILED\n",
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
key);
free(pdcp_p);
return TRUE;
return true;
} else {
LOG_D(PDCP, PROTOCOL_PDCP_CTXT_FMT" CONFIG_ACTION_ADD ADD key 0x%"PRIx64"\n",
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
@@ -1944,7 +1937,7 @@ rrc_pdcp_config_asn1_req (
if (ctxt_pP->enb_flag) {
drb_id = (mch_id * LTE_maxSessionPerPMCH ) + lc_id ;//+ (LTE_maxDRB + 3)*MAX_MOBILES_PER_ENB; // 1
if (pdcp_mbms_array_eNB[ctxt_pP->module_id][mch_id][lc_id].instanciated_instance == TRUE) {
if (pdcp_mbms_array_eNB[ctxt_pP->module_id][mch_id][lc_id].instanciated_instance == true) {
action = CONFIG_ACTION_MBMS_MODIFY;
} else {
action = CONFIG_ACTION_MBMS_ADD;
@@ -1952,7 +1945,7 @@ rrc_pdcp_config_asn1_req (
} else {
drb_id = (mch_id * LTE_maxSessionPerPMCH ) + lc_id; // + (LTE_maxDRB + 3); // 15
if (pdcp_mbms_array_ue[ctxt_pP->module_id][mch_id][lc_id].instanciated_instance == TRUE) {
if (pdcp_mbms_array_ue[ctxt_pP->module_id][mch_id][lc_id].instanciated_instance == true) {
action = CONFIG_ACTION_MBMS_MODIFY;
} else {
action = CONFIG_ACTION_MBMS_ADD;
@@ -1990,23 +1983,22 @@ rrc_pdcp_config_asn1_req (
}
//-----------------------------------------------------------------------------
boolean_t
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)
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)
//-----------------------------------------------------------------------------
{
@@ -2015,7 +2007,7 @@ pdcp_config_req_asn1 (
DevAssert(pdcp_pP != NULL);
if (ctxt_pP->enb_flag == ENB_FLAG_YES) {
pdcp_pP->is_ue = FALSE;
pdcp_pP->is_ue = false;
pdcp_add_UE(ctxt_pP);
//pdcp_eNB_UE_instance_to_rnti[ctxtP->module_id] = ctxt_pP->rnti;
@@ -2035,11 +2027,11 @@ pdcp_config_req_asn1 (
//pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % MAX_MOBILES_PER_ENB;
} else {
pdcp_pP->is_ue = TRUE;
pdcp_pP->is_ue = true;
pdcp_UE_UE_module_id_to_rnti[ctxt_pP->module_id] = ctxt_pP->rnti;
}
pdcp_pP->is_srb = (srb_flagP == SRB_FLAG_YES) ? TRUE : FALSE;
pdcp_pP->is_srb = srb_flagP == SRB_FLAG_YES;
pdcp_pP->lcid = lc_idP;
pdcp_pP->rb_id = rb_idP;
pdcp_pP->header_compression_profile = header_compression_profileP;
@@ -2162,10 +2154,10 @@ pdcp_config_req_asn1 (
rb_idP);
if (ctxt_pP->enb_flag == ENB_FLAG_YES) {
pdcp_mbms_array_eNB[ctxt_pP->module_id][mch_idP][lc_idP].instanciated_instance = TRUE ;
pdcp_mbms_array_eNB[ctxt_pP->module_id][mch_idP][lc_idP].instanciated_instance = true ;
pdcp_mbms_array_eNB[ctxt_pP->module_id][mch_idP][lc_idP].rb_id = rb_idP;
} else {
pdcp_mbms_array_ue[ctxt_pP->module_id][mch_idP][lc_idP].instanciated_instance = TRUE ;
pdcp_mbms_array_ue[ctxt_pP->module_id][mch_idP][lc_idP].instanciated_instance = true ;
pdcp_mbms_array_ue[ctxt_pP->module_id][mch_idP][lc_idP].rb_id = rb_idP;
}
@@ -2245,10 +2237,10 @@ void rrc_pdcp_config_req (
pdcp_p->rb_id = rb_idP;
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
pdcp_p->is_ue = TRUE;
pdcp_p->is_ue = true;
pdcp_UE_UE_module_id_to_rnti[ctxt_pP->module_id] = ctxt_pP->rnti;
} else {
pdcp_p->is_ue = FALSE;
pdcp_p->is_ue = false;
}
pdcp_p->next_pdcp_tx_sn = 0;
@@ -2321,10 +2313,10 @@ void rrc_pdcp_config_req (
pdcp_p->rb_id = rb_idP;
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
pdcp_p->is_ue = TRUE;
pdcp_p->is_ue = true;
pdcp_UE_UE_module_id_to_rnti[ctxt_pP->module_id] = ctxt_pP->rnti;
} else {
pdcp_p->is_ue = FALSE;
pdcp_p->is_ue = false;
}
pdcp_p->next_pdcp_tx_sn = 0;
+56 -65
View File
@@ -51,7 +51,7 @@ typedef rlc_op_status_t (*send_rlc_data_req_func_t)(const protocol_ctxt_t *cons
const rb_id_t, const mui_t,
confirm_t, sdu_size_t, mem_block_t *,const uint32_t *const, const uint32_t *const);
typedef boolean_t (pdcp_data_ind_t)( const protocol_ctxt_t *, const srb_flag_t,
typedef bool (pdcp_data_ind_t)( const protocol_ctxt_t *, const srb_flag_t,
const MBMS_flag_t, const rb_id_t, const sdu_size_t,
mem_block_t *,const uint32_t *const, const uint32_t *const);
typedef pdcp_data_ind_t* pdcp_data_ind_func_t;
@@ -153,14 +153,13 @@ typedef struct pdcp_stats_s {
typedef struct pdcp_s {
//boolean_t instanciated_instance;
uint16_t header_compression_profile;
/* SR: added this flag to distinguish UE/eNB instance as pdcp_run for virtual
* mode can receive data on NETLINK for eNB while eNB_flag = 0 and for UE when eNB_flag = 1
*/
boolean_t is_ue;
boolean_t is_srb;
bool is_ue;
bool is_srb;
/* Configured security algorithms */
uint8_t cipheringAlgorithm;
@@ -217,7 +216,7 @@ typedef struct pdcp_s {
} pdcp_t;
typedef struct pdcp_mbms_s {
boolean_t instanciated_instance;
bool instanciated_instance;
rb_id_t rb_id;
} pdcp_mbms_t;
@@ -230,7 +229,7 @@ typedef struct pdcp_mbms_s {
* under targets/TEST/PDCP/
*/
/*! \fn boolean_t pdcp_data_req(const protocol_ctxt_t* const , srb_flag_t , rb_id_t , mui_t , confirm_t ,sdu_size_t , unsigned char* , pdcp_transmission_mode_t )
/*! \fn bool pdcp_data_req(const protocol_ctxt_t* const , srb_flag_t , rb_id_t , mui_t , confirm_t ,sdu_size_t , unsigned char* , pdcp_transmission_mode_t )
* \brief This functions handles data transfer requests coming either from RRC or from IP
* \param[in] ctxt_pP Running context.
* \param[in] rab_id Radio Bearer ID
@@ -239,38 +238,34 @@ typedef struct pdcp_mbms_s {
* \param[in] sdu_buffer_size Size of incoming SDU in bytes
* \param[in] sdu_buffer Buffer carrying SDU
* \param[in] mode flag to indicate whether the userplane data belong to the control plane or data plane or transparent
* \return TRUE on success, FALSE otherwise
* \return true on success, false otherwise
* \note None
* @ingroup _pdcp
*/
boolean_t pdcp_data_req(
protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_id,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t mode,
const uint32_t * sourceL2Id,
const uint32_t * destinationL2Id
);
bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_id,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t mode,
const uint32_t * sourceL2Id,
const uint32_t * destinationL2Id);
boolean_t cu_f1u_data_req(
protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_id,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t mode,
const uint32_t *const sourceL2Id,
const uint32_t *const destinationL2Id
);
bool cu_f1u_data_req(protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_id,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t mode,
const uint32_t *const sourceL2Id,
const uint32_t *const destinationL2Id);
/*! \fn boolean_t pdcp_data_ind(const protocol_ctxt_t* const, srb_flag_t, MBMS_flag_t, rb_id_t, sdu_size_t, mem_block_t*, boolean_t)
/*! \fn bool pdcp_data_ind(const protocol_ctxt_t* const, srb_flag_t, MBMS_flag_t, rb_id_t, sdu_size_t, mem_block_t*, bool)
* \brief This functions handles data transfer indications coming from RLC
* \param[in] ctxt_pP Running context.
* \param[in] Shows if rb is SRB
@@ -279,7 +274,7 @@ boolean_t cu_f1u_data_req(
* \param[in] sdu_buffer_size Size of incoming SDU in bytes
* \param[in] sdu_buffer Buffer carrying SDU
* \param[in] is_data_plane flag to indicate whether the userplane data belong to the control plane or data plane
* \return TRUE on success, FALSE otherwise
* \return TRUE on success, false otherwise
* \note None
* @ingroup _pdcp
*/
@@ -316,20 +311,18 @@ void rrc_pdcp_config_req (
* \param[in] defaultDRB Default DRB ID
* \return A status about the processing, OK or error code.
*/
boolean_t rrc_pdcp_config_asn1_req (
const protocol_ctxt_t *const ctxt_pP,
LTE_SRB_ToAddModList_t *const srb2add_list,
LTE_DRB_ToAddModList_t *const drb2add_list,
LTE_DRB_ToReleaseList_t *const drb2release_list,
const uint8_t security_modeP,
uint8_t *const kRRCenc,
uint8_t *const kRRCint,
uint8_t *const kUPenc,
LTE_PMCH_InfoList_r9_t *pmch_InfoList_r9,
rb_id_t *const defaultDRB
);
bool rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
LTE_SRB_ToAddModList_t *const srb2add_list,
LTE_DRB_ToAddModList_t *const drb2add_list,
LTE_DRB_ToReleaseList_t *const drb2release_list,
const uint8_t security_modeP,
uint8_t *const kRRCenc,
uint8_t *const kRRCint,
uint8_t *const kUPenc,
LTE_PMCH_InfoList_r9_t *pmch_InfoList_r9,
rb_id_t *const defaultDRB);
/*! \fn boolean_t 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)
/*! \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.
@@ -349,22 +342,21 @@ boolean_t rrc_pdcp_config_asn1_req (
* \param[in] kUPenc User-Plane encryption key
* \return A status about the processing, OK or error code.
*/
boolean_t 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);
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
@@ -373,13 +365,12 @@ boolean_t pdcp_config_req_asn1 (
*/
void pdcp_add_UE(const protocol_ctxt_t *const ctxt_pP);
/*! \fn boolean_t pdcp_remove_UE(const protocol_ctxt_t* const ctxt_pP)
/*! \fn bool pdcp_remove_UE(const protocol_ctxt_t* const ctxt_pP)
* \brief Function for RRC to remove UE from PDCP module hashtable
* \param[in] ctxt_pP Running context.
* \return A status about the processing, OK or error code.
*/
boolean_t pdcp_remove_UE(
const protocol_ctxt_t *const ctxt_pP);
bool pdcp_remove_UE(const protocol_ctxt_t *const ctxt_pP);
/*! \fn void rrc_pdcp_config_release( const protocol_ctxt_t* const, rb_id_t)
* \brief This functions is unused
+17 -16
View File
@@ -32,7 +32,7 @@
#include "pdcp.h"
#include "pdcp_primitives.h"
extern boolean_t util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index);
extern bool util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index);
/*
* Parses data/control field out of buffer of User Plane PDCP Data PDU with
@@ -123,13 +123,13 @@ uint8_t pdcp_get_sequence_number_of_pdu_with_SRB_sn(unsigned char* pdu_buffer)
* Fills the incoming buffer with the fields of the header for srb sn
*
* @param pdu_buffer PDCP PDU buffer
* @return TRUE on success, FALSE otherwise
* @return true on success, false otherwise
*/
boolean_t pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(unsigned char* pdu_buffer, \
pdcp_control_plane_data_pdu_header* pdu)
bool pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(unsigned char* pdu_buffer,
pdcp_control_plane_data_pdu_header* pdu)
{
if (pdu_buffer == NULL || pdu == NULL) {
return FALSE;
return false;
}
/*
@@ -138,20 +138,20 @@ boolean_t pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(unsigned char
uint8_t sequence_number = pdu->sn;
pdu_buffer[0] = sequence_number & 0x1F; // 5bit sn
return TRUE;
return true;
}
/*
* Fills the incoming buffer with the fields of the header for long sn
*
* @param pdu_buffer PDCP PDU buffer
* @return TRUE on success, FALSE otherwise
* @return true on success, false otherwise
*/
boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char* pdu_buffer, \
pdcp_user_plane_data_pdu_header_with_long_sn* pdu)
bool pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char* pdu_buffer,
pdcp_user_plane_data_pdu_header_with_long_sn* pdu)
{
if (pdu_buffer == NULL || pdu == NULL) {
return FALSE;
return false;
}
/*
@@ -170,7 +170,7 @@ boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char*
pdu_buffer[0] |= 0x80; // set the first bit as 1
}
return TRUE;
return true;
}
/*
@@ -178,13 +178,14 @@ boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char*
*
* @param pdu_buffer The buffer that PDU will be serialized into
* @param pdu A status report header
* @return TRUE on success, FALSE otherwise
* @return true on success, false otherwise
*/
boolean_t pdcp_serialize_control_pdu_for_pdcp_status_report(unsigned char* pdu_buffer, \
uint8_t bitmap[512], pdcp_control_pdu_for_pdcp_status_report* pdu)
bool pdcp_serialize_control_pdu_for_pdcp_status_report(unsigned char* pdu_buffer,
uint8_t bitmap[512],
pdcp_control_pdu_for_pdcp_status_report* pdu)
{
if (pdu_buffer == NULL || pdu == NULL) {
return FALSE;
return false;
}
/*
@@ -205,6 +206,6 @@ boolean_t pdcp_serialize_control_pdu_for_pdcp_status_report(unsigned char* pdu_b
*/
memcpy(pdu_buffer + 2, bitmap, 512);
return TRUE;
return true;
}
+10 -9
View File
@@ -142,18 +142,18 @@ uint8_t pdcp_get_sequence_number_of_pdu_with_SRB_sn(unsigned char* pdu_buffer);
* Fills the incoming buffer with the fields of the header for SRB1
*
* @param pdu_buffer PDCP PDU buffer
* @return TRUE on success, FALSE otherwise
* @return true on success, false otherwise
*/
boolean_t pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(unsigned char* pdu_buffer, \
pdcp_control_plane_data_pdu_header* pdu);
bool pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(unsigned char* pdu_buffer,
pdcp_control_plane_data_pdu_header* pdu);
/*
* Fills the incoming buffer with the fields of the header for long SN (RLC UM and AM)
*
* @param pdu_buffer PDCP PDU buffer
* @return TRUE on success, FALSE otherwise
* @return true on success, false otherwise
*/
boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char* pdu_buffer, \
pdcp_user_plane_data_pdu_header_with_long_sn* pdu);
bool pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char* pdu_buffer,
pdcp_user_plane_data_pdu_header_with_long_sn* pdu);
/*
* Fills the incoming status report header with given value of bitmap
@@ -162,10 +162,11 @@ boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char*
* @param FMS First Missing PDCP SN
* @param bitmap Received/Missing sequence number bitmap
* @param pdu A status report header
* @return TRUE on success, FALSE otherwise
* @return true on success, false otherwise
*/
boolean_t pdcp_serialize_control_pdu_for_pdcp_status_report(unsigned char* pdu_buffer, \
uint8_t bitmap[512], pdcp_control_pdu_for_pdcp_status_report* pdu);
bool pdcp_serialize_control_pdu_for_pdcp_status_report(unsigned char* pdu_buffer,
uint8_t bitmap[512],
pdcp_control_pdu_for_pdcp_status_report* pdu);
int pdcp_netlink_dequeue_element(const protocol_ctxt_t* const ctxt_pP,
struct pdcp_netlink_element_s **data_ppP);
@@ -33,12 +33,12 @@
/*
* Initializes sequence numbering state
* @param pdcp_entity The PDCP entity to be initialized
* @return boolean_t TRUE on success, FALSE otherwise
* @return bool true on success, false otherwise
*/
boolean_t pdcp_init_seq_numbers(pdcp_t* pdcp_entity)
bool pdcp_init_seq_numbers(pdcp_t* pdcp_entity)
{
if (pdcp_entity == NULL) {
return FALSE;
return false;
}
/* Sequence number state variables */
@@ -55,34 +55,34 @@ boolean_t pdcp_init_seq_numbers(pdcp_t* pdcp_entity)
// Shall UE and eNB behave differently on initialization? (see 7.1.e)
pdcp_entity->last_submitted_pdcp_rx_sn = 4095;
return TRUE;
return true;
}
boolean_t pdcp_is_seq_num_size_valid(pdcp_t* pdcp_entity)
bool pdcp_is_seq_num_size_valid(pdcp_t* pdcp_entity)
{
if (pdcp_entity == NULL) {
return FALSE;
return false;
}
// Check if the size of SN is valid (see 3GPP TS 36.323 v10.1.0 item 6.3.2)
if (pdcp_entity->seq_num_size != 5 && pdcp_entity->seq_num_size != 7 && pdcp_entity->seq_num_size != 12) {
LOG_W(PDCP, "Incoming SN size is invalid! (Expected: {5 | 7 | 12}, Received: %d\n", pdcp_entity->seq_num_size);
return FALSE;
return false;
}
return TRUE;
return true;
}
/**
* Check if SN number is in the range according to SN size
*/
boolean_t pdcp_is_seq_num_valid(uint16_t seq_num, uint8_t seq_num_size)
bool pdcp_is_seq_num_valid(uint16_t seq_num, uint8_t seq_num_size)
{
if (seq_num >= 0 && seq_num <= pdcp_calculate_max_seq_num_for_given_size(seq_num_size)) {
return TRUE;
return true;
}
return FALSE;
return false;
}
uint16_t pdcp_calculate_max_seq_num_for_given_size(uint8_t seq_num_size)
@@ -96,7 +96,7 @@ uint16_t pdcp_calculate_max_seq_num_for_given_size(uint8_t seq_num_size)
uint16_t pdcp_get_next_tx_seq_number(pdcp_t* pdcp_entity)
{
if (pdcp_is_seq_num_size_valid(pdcp_entity) == FALSE) {
if (pdcp_is_seq_num_size_valid(pdcp_entity) == false) {
return -1;
}
@@ -118,10 +118,10 @@ uint16_t pdcp_get_next_tx_seq_number(pdcp_t* pdcp_entity)
return pdcp_seq_num;
}
boolean_t pdcp_advance_rx_window(pdcp_t* pdcp_entity)
bool pdcp_advance_rx_window(pdcp_t* pdcp_entity)
{
if (pdcp_is_seq_num_size_valid(pdcp_entity) == FALSE) {
return FALSE;
if (pdcp_is_seq_num_size_valid(pdcp_entity) == false) {
return false;
}
/*
@@ -137,10 +137,10 @@ boolean_t pdcp_advance_rx_window(pdcp_t* pdcp_entity)
pdcp_entity->next_pdcp_rx_sn++;
}
return TRUE;
return true;
}
boolean_t pdcp_mark_current_pdu_as_received(uint16_t seq_num, pdcp_t* pdcp_entity)
bool pdcp_mark_current_pdu_as_received(uint16_t seq_num, pdcp_t* pdcp_entity)
{
/*
* Incoming sequence number and PDCP entity were already
@@ -158,5 +158,5 @@ boolean_t pdcp_mark_current_pdu_as_received(uint16_t seq_num, pdcp_t* pdcp_entit
LOG_D(PDCP, "Marking %d. bit of %d. octet of status bitmap\n", (seq_num % 8) + 1, octet_index);
util_mark_nth_bit_of_octet(&pdcp_entity->missing_pdu_bitmap[octet_index], seq_num % 8);
util_print_binary_representation((uint8_t*)"Current state of relevant octet: ", pdcp_entity->missing_pdu_bitmap[octet_index]);
return TRUE;
return true;
}
@@ -35,17 +35,17 @@
* @param pdcp_entity The PDCP entity to be initialized
* @return none
*/
boolean_t pdcp_init_seq_numbers(pdcp_t* pdcp_entity);
bool pdcp_init_seq_numbers(pdcp_t* pdcp_entity);
/**
* Checks if incoming PDCP entitiy pointer and relevant sequence number size is valid
* @return TRUE (0x01) if it is valid, FALSE (0x00) otherwise
* @return true (0x01) if it is valid, false (0x00) otherwise
*/
boolean_t pdcp_is_seq_num_size_valid(pdcp_t* pdcp_entity);
bool pdcp_is_seq_num_size_valid(pdcp_t* pdcp_entity);
/**
* Check if SN number is in the range according to SN size
* @return TRUE if it is valid, FALSE otherwise
* @return true if it is valid, false otherwise
*/
boolean_t pdcp_is_seq_num_valid(uint16_t seq_num, uint8_t seq_num_size);
bool pdcp_is_seq_num_valid(uint16_t seq_num, uint8_t seq_num_size);
/**
* Returns the maximum allowed sequence number value for given size of SN field
* @return Max sequence number value
@@ -58,11 +58,11 @@ uint16_t pdcp_get_next_tx_seq_number(pdcp_t* pdcp_entity);
/**
* Advances the RX window state of given PDCP entity upon successfull receipt of a SDU
*/
boolean_t pdcp_advance_rx_window(pdcp_t* pdcp_entity);
bool pdcp_advance_rx_window(pdcp_t* pdcp_entity);
/**
* Updates missing PDU bitmap with incoming sequence number
* @return TRUE if successful, FALSE otherwise
* @return true if successful, false otherwise
*/
boolean_t pdcp_mark_current_pdu_as_received(uint16_t seq_num, pdcp_t* pdcp_entity);
bool pdcp_mark_current_pdu_as_received(uint16_t seq_num, pdcp_t* pdcp_entity);
#endif
+3 -3
View File
@@ -130,9 +130,9 @@ void util_print_binary_representation(unsigned char* message, uint8_t octet)
*
* @param octet 8-bit data
* @param index Index of bit to be set
* @return TRUE on success, FALSE otherwise
* @return true on success, false otherwise
*/
boolean_t util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index)
bool util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index)
{
uint8_t mask = 0x80;
@@ -148,6 +148,6 @@ boolean_t util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index)
*/
*octet |= mask;
return TRUE;
return true;
}
+2 -2
View File
@@ -66,8 +66,8 @@ void util_print_binary_representation(unsigned char* message, uint8_t octet);
*
* @param octet Octet
* @param index Index
* @return TRUE on success, FALSE otherwise
* @return true on success, false otherwise
*/
boolean_t util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index);
bool util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index);
#endif // PDCP_UTIL_H
+1 -1
View File
@@ -52,7 +52,7 @@ rlc_am_get_status_pdu_buffer_occupancy(
rlc_sn_t sn_cursor = rlc_pP->vr_r;
rlc_sn_t sn_prev = rlc_pP->vr_r;
rlc_sn_t sn_end = rlc_pP->vr_ms;
boolean_t segment_loop_end = false;
bool segment_loop_end = false;
if (sn_prev != sn_end) {
while ((RLC_AM_DIFF_SN(sn_prev,rlc_pP->vr_r) < RLC_AM_DIFF_SN(sn_end,rlc_pP->vr_r)) && (cursor_p != NULL)) {
@@ -54,7 +54,7 @@ typedef struct rlc_am_entity_s {
rb_id_t rb_id; /*!< \brief Radio bearer identifier, for statistics and trace purpose. */
logical_chan_id_t channel_id; /*!< \brief Transport channel identifier. */
boolean_t is_data_plane; /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */
bool is_data_plane; /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */
rlc_buffer_occupancy_t sdu_buffer_occupancy; /*!< \brief Number of bytes of unsegmented SDUs. */
rlc_buffer_occupancy_t status_buffer_occupancy; /*!< \brief Number of bytes of control PDUs waiting for transmission. */
@@ -76,7 +76,7 @@ typedef struct rlc_am_entity_s {
rlc_am_tx_data_pdu_management_t *tx_data_pdu_buffer; /*!< \brief Transmission PDU data buffer. Used also for retransmissions */
signed int retrans_num_pdus; /*!< \brief Number of PDUs in the retransmission buffer. */
signed int retrans_num_bytes_to_retransmit; /*!< \brief Number of bytes in the retransmission buffer to be retransmitted. Only payload is taken into account */
boolean_t force_poll; /*!< \brief force poll due to t_poll_retransmit time-out. */
bool force_poll; /*!< \brief force poll due to t_poll_retransmit time-out. */
//---------------------------------------------------------------------
// RX BUFFERS
@@ -186,8 +186,8 @@ typedef struct rlc_am_entity_s {
// note occupancy of other buffers is deducted from nb elements in lists
rlc_buffer_occupancy_t buffer_occupancy_retransmission_buffer; /*!< \brief Number of PDUs. */
boolean_t initialized; /*!< \brief Boolean for rlc_am_entity_t struct initialization. */
boolean_t configured; /*!< \brief Boolean for rlc_am_entity_t struct configuration. */
bool initialized; /*!< \brief Boolean for rlc_am_entity_t struct initialization. */
bool configured; /*!< \brief Boolean for rlc_am_entity_t struct configuration. */
} rlc_am_entity_t;
/** @} */
# endif
+5 -5
View File
@@ -32,7 +32,7 @@ rlc_am_init(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP)
{
if (rlc_pP->initialized == TRUE) {
if (rlc_pP->initialized == true) {
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[AM INIT] INITIALIZATION ALREADY DONE, DOING NOTHING\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
} else {
@@ -79,7 +79,7 @@ rlc_am_init(
rlc_pP->last_absolute_subframe_status_indication = 0xFFFFFFFF; // any value > 1
rlc_pP->initialized = TRUE;
rlc_pP->initialized = true;
}
}
//-----------------------------------------------------------------------------
@@ -134,7 +134,7 @@ rlc_am_reestablish(
rlc_pP->last_absolute_subframe_status_indication = 0xFFFFFFFF; // any value > 1
rlc_pP->initialized = TRUE;
rlc_pP->initialized = true;
}
@@ -197,7 +197,7 @@ rlc_am_configure(
const uint32_t t_reorderingP,
const uint32_t t_status_prohibitP)
{
if (rlc_pP->configured == TRUE) {
if (rlc_pP->configured == true) {
LOG_I(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RECONFIGURE] max_retx_threshold %d poll_pdu %d poll_byte %d t_poll_retransmit %d t_reordering %d t_status_prohibit %d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
max_retx_thresholdP,
@@ -235,7 +235,7 @@ rlc_am_configure(
rlc_am_init_timer_reordering (ctxt_pP, rlc_pP, t_reorderingP);
rlc_am_init_timer_status_prohibit(ctxt_pP, rlc_pP, t_status_prohibitP);
rlc_pP->configured = TRUE;
rlc_pP->configured = true;
}
}
@@ -183,12 +183,10 @@ rlc_am_send_sdu (
}
}
//-----------------------------------------------------------------------------
void
rlc_am_reassemble_pdu(
const protocol_ctxt_t *const ctxt_pP,
rlc_am_entity_t *const rlc_pP,
mem_block_t *const tb_pP,
boolean_t free_rlc_pdu) {
void rlc_am_reassemble_pdu(const protocol_ctxt_t *const ctxt_pP,
rlc_am_entity_t *const rlc_pP,
mem_block_t *const tb_pP,
bool free_rlc_pdu) {
int i,j;
rlc_am_pdu_info_t *pdu_info = &((rlc_am_rx_pdu_management_t *)(tb_pP->data))->pdu_info;
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[REASSEMBLY PDU] TRY REASSEMBLY PDU SN=%03d\n",
@@ -57,14 +57,14 @@ void rlc_am_reassembly (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t *
*/
void rlc_am_send_sdu (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP);
/*! \fn void rlc_am_reassemble_pdu(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, const mem_block_t* const tb_pP,boolean_t free_rlc_pdu)
/*! \fn void rlc_am_reassemble_pdu(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, const mem_block_t* const tb_pP, bool free_rlc_pdu)
* \brief Reassembly a RLC AM PDU, depending of the content of this PDU, data will be reassemblied to the current output SDU, the current will be sent to higher layers or not, after or before the reassembly, or no send of SDU will be triggered, depending on FI field in PDU header.
* \param[in] ctxtP Running context.
* \param[in] rlc_pP RLC AM protocol instance pointer.
* \param[in] tb_pP RLC AM PDU embedded in a mem_block_t.
* \param[in] free_rlc_pdu Flag for freeing RLC AM PDU after reassembly.
*/
void rlc_am_reassemble_pdu(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, mem_block_t* const tb_pP,boolean_t free_rlc_pdu);
void rlc_am_reassemble_pdu(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, mem_block_t* const tb_pP, bool free_rlc_pdu);
/** @} */
#endif
@@ -328,7 +328,7 @@ rlc_am_receive_process_data_pdu (
rlc_am_pdu_info_t* pdu_info_p = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
rlc_am_pdu_sn_10_t* rlc_am_pdu_sn_10_p = (rlc_am_pdu_sn_10_t*)first_byte_pP;
rlc_am_rx_pdu_status_t pdu_status = RLC_AM_DATA_PDU_STATUS_OK;
boolean_t reassemble = false;
bool reassemble = false;
if (rlc_am_get_data_pdu_infos(ctxt_pP,rlc_pP, rlc_am_pdu_sn_10_p, tb_size_in_bytesP, pdu_info_p) >= 0) {
@@ -29,13 +29,12 @@
#include "LAYER2/MAC/mac_extern.h"
#include "common/utils/LOG/log.h"
//-----------------------------------------------------------------------------
boolean_t rlc_am_nack_pdu (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP,
const rlc_sn_t snP,
const rlc_sn_t prev_nack_snP,
sdu_size_t so_startP,
sdu_size_t so_endP)
bool rlc_am_nack_pdu(const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP,
const rlc_sn_t snP,
const rlc_sn_t prev_nack_snP,
sdu_size_t so_startP,
sdu_size_t so_endP)
{
// 5.2.1 Retransmission
// ...
@@ -54,8 +53,8 @@ boolean_t rlc_am_nack_pdu (
rlc_am_tx_data_pdu_management_t *tx_data_pdu_buffer_p = &rlc_pP->tx_data_pdu_buffer[snP % RLC_AM_WINDOW_SIZE];
//int pdu_sdu_index;
//int sdu_index;
boolean_t status = TRUE;
boolean_t retx_count_increment = FALSE;
bool status = true;
bool retx_count_increment = false;
sdu_size_t pdu_data_to_retx = 0;
if (mb_p != NULL) {
@@ -63,7 +62,7 @@ boolean_t rlc_am_nack_pdu (
if(so_startP > so_endP) {
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[NACK-PDU] ERROR NACK MISSING PDU, so_startP %d, so_endP %d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),so_startP, so_endP);
status = FALSE;
status = false;
}
// Handle full PDU NACK first
else if ((so_startP == 0) && (so_endP == 0x7FFF)) {
@@ -71,9 +70,7 @@ boolean_t rlc_am_nack_pdu (
pdu_data_to_retx = tx_data_pdu_buffer_p->payload_size;
/* Increment VtReTxNext if this is the first NACK or if some segments have already been transmitted */
if ((tx_data_pdu_buffer_p->flags.retransmit == 0) || (tx_data_pdu_buffer_p->nack_so_start))
{
retx_count_increment = TRUE;
}
retx_count_increment = true;
tx_data_pdu_buffer_p->nack_so_start = 0;
tx_data_pdu_buffer_p->num_holes = 0;
@@ -89,11 +86,11 @@ boolean_t rlc_am_nack_pdu (
if(tx_data_pdu_buffer_p->nack_so_start >= tx_data_pdu_buffer_p->payload_size){
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[NACK-PDU] ERROR NACK MISSING PDU, nack_so_start %d, payload_size %d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),tx_data_pdu_buffer_p->nack_so_start, tx_data_pdu_buffer_p->payload_size);
status = FALSE;
status = false;
}
}
else {
status = FALSE;
status = false;
}
}
else if (tx_data_pdu_buffer_p->flags.max_retransmit == 0) {
@@ -107,9 +104,8 @@ boolean_t rlc_am_nack_pdu (
if (prev_nack_snP != snP) {
/* New NACK_SN with SO */
/* check whether a new segment is to be placed in Retransmission Buffer, then increment vrReTx */
if ((tx_data_pdu_buffer_p->flags.retransmit == 0) || (so_startP < tx_data_pdu_buffer_p->nack_so_start)) {
retx_count_increment = TRUE;
}
if ((tx_data_pdu_buffer_p->flags.retransmit == 0) || (so_startP < tx_data_pdu_buffer_p->nack_so_start))
retx_count_increment = true;
tx_data_pdu_buffer_p->num_holes = 1;
tx_data_pdu_buffer_p->retx_hole_index = 0;
@@ -129,21 +125,18 @@ boolean_t rlc_am_nack_pdu (
tx_data_pdu_buffer_p->nack_so_stop = so_endP;
tx_data_pdu_buffer_p->num_holes ++;
pdu_data_to_retx = so_endP - so_startP + 1;
} else {
status = false;
}
else {
status = FALSE;
}
}
else {
status = FALSE;
} else {
status = false;
}
}
else {
status = FALSE;
status = false;
}
}
else {
status = FALSE;
} else {
status = false;
}
if (status) {
@@ -175,17 +168,16 @@ boolean_t rlc_am_nack_pdu (
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[NACK-PDU] ERROR NACK MISSING PDU SN %05d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
snP);
status = FALSE;
status = false;
}
return status;
}
//-----------------------------------------------------------------------------
void rlc_am_ack_pdu (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP,
const rlc_sn_t snP,
boolean_t free_pdu)
void rlc_am_ack_pdu(const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP,
const rlc_sn_t snP,
bool free_pdu)
{
mem_block_t* mb_p = rlc_pP->tx_data_pdu_buffer[snP % RLC_AM_WINDOW_SIZE].mem_block;
rlc_am_tx_data_pdu_management_t *tx_data_pdu_buffer = &rlc_pP->tx_data_pdu_buffer[snP % RLC_AM_WINDOW_SIZE];
@@ -283,7 +275,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
sdu_size_t retx_so_start,retx_so_stop; //starting and ending SO for retransmission in this PDU
rlc_sn_t sn = pdu_mngt->sn;
uint16_t header_so_part;
boolean_t fi_start, fi_end;
bool fi_start, fi_end;
uint8_t sdu_index = 0;
uint8_t sdu_segment_index = 0;
uint8_t num_LIs_pdu_segment = pdu_mngt->nb_sdus - 1;
@@ -377,11 +369,11 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
/* Set FI part to false if SO Start and SO End are different from PDU boundaries */
if (retx_so_start)
{
fi_start = FALSE;
fi_start = false;
}
if (retx_so_stop < pdu_mngt->payload_size - 1)
{
fi_end = FALSE;
fi_end = false;
}
/* Header content is filled at the end */
@@ -423,7 +415,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
else
{
/* if retx_so_start is still not included then set data_size with full original PDU data size */
/* Set fi_start to FALSE in this case */
/* Set fi_start to false in this case */
data_size = pdu_mngt->payload_size;
}
sdu_index ++;
@@ -432,7 +424,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
if (retx_so_start == data_size)
{
/* Set FI Start if retx_so_start = cumulated data size */
fi_start = TRUE;
fi_start = true;
/* there must be at least one SDU more */
//Assertion(eNB)_PRAN_DesignDocument_annex No.778
if(sdu_index >= pdu_mngt->nb_sdus)
@@ -464,8 +456,8 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
}
else if (retx_so_start != 0)
{
/* in all other cases set fi_start to FALSE if it SO Start is not 0 */
fi_start = FALSE;
/* in all other cases set fi_start to false if it SO Start is not 0 */
fi_start = false;
}
/* Set first SDU portion of the segment */
@@ -582,10 +574,10 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
"RLC AM Tx PDU Segment Data Error: retx_so_stop=%d OriginalPDUDataLength=%d SOStart=%d SegmentLength=%d numLISegment=%d numLIPDU=%d sn=%d LcId=%d !\n",
retx_so_stop,pdu_mngt->payload_size,retx_so_start,*payload_sizeP,num_LIs_pdu_segment,pdu_mngt->nb_sdus - 1,sn,rlc_pP->channel_id);
*/
/* init FI End to FALSE if retx_so_stop is not end of PDU */
/* init FI End to false if retx_so_stop is not end of PDU */
if (retx_so_stop != pdu_mngt->payload_size - 1)
{
fi_end = FALSE;
fi_end = false;
}
/* Check consistency between sdus_segment_size and payload_sizeP */
@@ -596,7 +588,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
data_size += sdus_segment_size[i];
if ((retx_so_stop == data_size - 1) && (i < num_LIs_pdu_segment))
{
fi_end = TRUE;
fi_end = true;
}
}
//Assertion(eNB)_PRAN_DesignDocument_annex No.782
@@ -665,7 +657,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
pdu_mngt->nack_so_start = pdu_mngt->hole_so_start[pdu_mngt->retx_hole_index];
}
/* Content is supposed to be init with 0 so with FIStart=FIEnd=TRUE */
/* Content is supposed to be init with 0 so with FIStart=FIEnd=true */
RLC_AM_PDU_SET_D_C(*pdu_segment_header_p);
RLC_AM_PDU_SET_RF(*pdu_segment_header_p);
/* Change FI */
@@ -35,7 +35,7 @@
# ifndef __RLC_AM_RETRANSMIT_H__
# define __RLC_AM_RETRANSMIT_H__
//-----------------------------------------------------------------------------
/*! \fn boolean_t rlc_am_nack_pdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, int16_t snP, int16_t prev_nack_snP,sdu_size_t so_startP, sdu_size_t so_endP)
/*! \fn bool rlc_am_nack_pdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, int16_t snP, int16_t prev_nack_snP,sdu_size_t so_startP, sdu_size_t so_endP)
* \brief The RLC AM PDU which have the sequence number snP is marked NACKed with segment offset fields.
* \param[in] ctxtP Running context.
* \param[in] rlcP RLC AM protocol instance pointer.
@@ -46,13 +46,12 @@
* \return OK/KO
* \note It may appear a new hole in the retransmission buffer depending on the segment offset informations. Depending on the state of the retransmission buffer, negative confirmation can be sent to higher layers about the drop by the RLC AM instance of a particular SDU.
*/
boolean_t rlc_am_nack_pdu (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlcP,
const rlc_sn_t snP,
const rlc_sn_t prev_nack_snP,
sdu_size_t so_startP,
sdu_size_t so_endP);
bool rlc_am_nack_pdu(const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlcP,
const rlc_sn_t snP,
const rlc_sn_t prev_nack_snP,
sdu_size_t so_startP,
sdu_size_t so_endP);
/*! \fn void rlc_am_ack_pdu (const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t *rlcP, rlc_sn_t snP)
* \brief The RLC AM PDU which have the sequence number snP is marked ACKed.
@@ -62,11 +61,10 @@ boolean_t rlc_am_nack_pdu (
* \param[in] free_pdu Boolean indicating that the PDU can be freed because smaller than new vtA.
* \note Depending on the state of the retransmission buffer, positive confirmation can be sent to higher layers about the receiving by the peer RLC AM instance of a particular SDU.
*/
void rlc_am_ack_pdu (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlcP,
const rlc_sn_t snP,
boolean_t free_pdu);
void rlc_am_ack_pdu(const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlcP,
const rlc_sn_t snP,
bool free_pdu);
/*! \fn mem_block_t* rlc_am_retransmit_get_copy (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, rlc_sn_t snP)
* \brief The RLC AM PDU which have the sequence number snP is marked ACKed.
+17 -18
View File
@@ -31,14 +31,13 @@
#include "common/utils/LOG/log.h"
boolean_t rlc_am_rx_check_vr_reassemble(
const protocol_ctxt_t* const ctxt_pP,
const rlc_am_entity_t* const rlc_pP)
bool rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,
const rlc_am_entity_t* const rlc_pP)
{
mem_block_t* cursor_p = rlc_pP->receiver_buffer.head;
rlc_am_rx_pdu_management_t * pdu_cursor_mgnt_p = NULL;
sdu_size_t next_waited_so = 0;
boolean_t reassemble = FALSE;
bool reassemble = false;
if (cursor_p != NULL) {
@@ -48,7 +47,7 @@ boolean_t rlc_am_rx_check_vr_reassemble(
if (sn_ref != rlc_pP->vr_r) {
/* Case vrR has advanced from head : most likely case */
reassemble = TRUE;
reassemble = true;
/* Handle first SN if it is made of PDU segments : set them all to be reassembled */
if (pdu_info_p->rf) {
pdu_cursor_mgnt_p = (rlc_am_rx_pdu_management_t *) (cursor_p->data);
@@ -58,7 +57,7 @@ boolean_t rlc_am_rx_check_vr_reassemble(
{
LOG_E(RLC, "AM Rx Check Reassembly head SN=%d with PDU segments != vrR=%d should be fully received LCID=%d\n",
sn_ref,rlc_pP->vr_r,rlc_pP->channel_id);
return FALSE;
return false;
}
/*
AssertFatal(pdu_cursor_mgnt_p->all_segments_received > 0,"AM Rx Check Reassembly head SN=%d with PDU segments != vrR=%d should be fully received LCID=%d\n",
@@ -94,7 +93,7 @@ boolean_t rlc_am_rx_check_vr_reassemble(
{
LOG_E(RLC, "AM Rx Check Reassembly vr=%d should be partly received SNHead=%d LCID=%d\n",
rlc_pP->vr_r,sn_ref,rlc_pP->channel_id);
return FALSE;
return false;
}
/*
AssertFatal(pdu_cursor_mgnt_p->all_segments_received == 0,"AM Rx Check Reassembly vr=%d should be partly received SNHead=%d LCID=%d\n",
@@ -123,7 +122,7 @@ boolean_t rlc_am_rx_check_vr_reassemble(
{
LOG_E(RLC, "AM Rx Check Reassembly SNHead=vr=%d should be partly received LCID=%d\n",
rlc_pP->vr_r,rlc_pP->channel_id);
return FALSE;
return false;
}
/*
AssertFatal(pdu_cursor_mgnt_p->all_segments_received == 0,"AM Rx Check Reassembly SNHead=vr=%d should be partly received LCID=%d\n",
@@ -132,7 +131,7 @@ boolean_t rlc_am_rx_check_vr_reassemble(
while ((cursor_p != NULL) && (pdu_info_p->sn == rlc_pP->vr_r) && (pdu_info_p->so == next_waited_so)) {
if (pdu_cursor_mgnt_p->segment_reassembled == RLC_AM_RX_PDU_SEGMENT_REASSEMBLE_NO) {
pdu_cursor_mgnt_p->segment_reassembled = RLC_AM_RX_PDU_SEGMENT_REASSEMBLE_PENDING;
reassemble = TRUE;
reassemble = true;
}
next_waited_so += pdu_info_p->payload_size;
cursor_p = cursor_p->next;
@@ -157,7 +156,7 @@ mem_block_t * create_new_segment_from_pdu(
int16_t new_li_list[RLC_AM_MAX_SDU_IN_PDU];
int16_t header_size = 0;
uint8_t num_li = 0;
boolean_t fi_start, fi_end, lsf;
bool fi_start, fi_end, lsf;
/* Init some PDU Segment header fixed parameters */
fi_start = !((pdu_rx_info_p->fi & 0x2) >> 1);
@@ -170,11 +169,11 @@ mem_block_t * create_new_segment_from_pdu(
header_size = RLC_AM_PDU_SEGMENT_HEADER_MIN_SIZE;
if (so_offset) {
fi_start = FALSE;
fi_start = false;
}
if (so_offset + data_length_to_copy != pdu_rx_info_p->payload_size) {
fi_end = FALSE;
lsf = FALSE;
fi_end = false;
lsf = false;
}
} // end no LI in original segment
else {
@@ -185,7 +184,7 @@ mem_block_t * create_new_segment_from_pdu(
/* set LSF to false if we know that end of the original segment will not be copied */
if (so_offset + data_length_to_copy != pdu_rx_info_p->payload_size) {
lsf = FALSE;
lsf = false;
}
/* catch the first LI containing so_offset */
@@ -223,7 +222,7 @@ mem_block_t * create_new_segment_from_pdu(
num_li = j;
/* set FI End if remaining size = 0 */
if (remaining_size == 0) {
fi_end = TRUE;
fi_end = true;
}
}
}
@@ -263,7 +262,7 @@ mem_block_t * create_new_segment_from_pdu(
}
/* Fill Header part in the buffer */
/* Content is supposed to be init with 0 so with FIStart=FIEnd=TRUE */
/* Content is supposed to be init with 0 so with FIStart=FIEnd=true */
/* copy first two bytes from original: D/C + RF + FI + E+ SN*/
memset(pdu_segment_header_p, 0, header_size);
RLC_AM_PDU_SET_D_C(*pdu_segment_header_p);
@@ -1106,7 +1105,7 @@ rlc_am_rx_list_reassemble_rlc_sdus(
do {
if (rlc_am_rx_pdu_management_p->all_segments_received > 0) {
cursor_p = list2_remove_head(&rlc_pP->receiver_buffer);
rlc_am_reassemble_pdu(ctxt_pP, rlc_pP, cursor_p,TRUE);
rlc_am_reassemble_pdu(ctxt_pP, rlc_pP, cursor_p, true);
rlc_am_rx_old_pdu_management = rlc_am_rx_pdu_management_p;
cursor_p = list2_get_head(&rlc_pP->receiver_buffer);
@@ -1123,7 +1122,7 @@ rlc_am_rx_list_reassemble_rlc_sdus(
else if (rlc_am_rx_pdu_management_p->segment_reassembled == RLC_AM_RX_PDU_SEGMENT_REASSEMBLE_PENDING) {
rlc_am_rx_pdu_management_p->segment_reassembled = RLC_AM_RX_PDU_SEGMENT_REASSEMBLED;
rlc_am_reassemble_pdu(ctxt_pP, rlc_pP, cursor_p,FALSE);
rlc_am_reassemble_pdu(ctxt_pP, rlc_pP, cursor_p, false);
rlc_am_rx_old_pdu_management = rlc_am_rx_pdu_management_p;
cursor_p = cursor_p->next;
@@ -61,13 +61,13 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_check_duplicate_insert_pdu(const protocol_
*/
signed int rlc_am_rx_list_insert_pdu(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP, mem_block_t* const tbP);
/*! \fn boolean_t rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP)
/*! \fn bool rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP)
* \brief Check if reassembly taking into account potential new vrR value
* \param[in] ctxt_pP Running context.
* \param[in] rlcP RLC AM protocol instance pointer.
* \return TRUE if reassembly must be done, FALSE else
* \return true if reassembly must be done, false else
*/
boolean_t rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP);
bool rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP);
/*! \fn void rlc_am_rx_check_all_byte_segments(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP, mem_block_t* const tbP)
* \brief Check if all sub-segments of a PDU are received, if yes then call rlc_am_rx_mark_all_segments_received() procedure.
@@ -32,12 +32,11 @@
#include "common/utils/LOG/log.h"
//-----------------------------------------------------------------------------
void rlc_am_pdu_polling (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP,
rlc_am_pdu_sn_10_t *const pdu_pP,
const int16_t payload_sizeP,
boolean_t is_new_pdu)
void rlc_am_pdu_polling(const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP,
rlc_am_pdu_sn_10_t *const pdu_pP,
const int16_t payload_sizeP,
bool is_new_pdu)
{
// 5.2.2 Polling
// An AM RLC entity can poll its peer AM RLC entity in order to trigger STATUS reporting at the peer AM RLC entity.
@@ -36,14 +36,14 @@
# define __RLC_AM_SEGMENT_H__
//-----------------------------------------------------------------------------
/*! \fn void rlc_am_pdu_polling (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *const rlcP, rlc_am_pdu_sn_10_t *pduP, int16_t payload_sizeP,boolean_t is_new_pdu)
/*! \fn void rlc_am_pdu_polling (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *const rlcP, rlc_am_pdu_sn_10_t *pduP, int16_t payload_sizeP, bool is_new_pdu)
* \brief Set or not the poll bit in the PDU header depending on RLC AM protocol variables.
* \param[in] ctxt_pP Running context.
* \param[in] rlcP RLC AM protocol instance pointer.
* \param[in] pduP Pointer on the header of the PDU in order to be able to set the poll bit if necessary.
* \param[in] payload_sizeP Size of the payload of the PDU.
*/
void rlc_am_pdu_polling (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *const rlcP, rlc_am_pdu_sn_10_t *pduP, int16_t payload_sizeP,boolean_t is_new_pdu);
void rlc_am_pdu_polling (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *const rlcP, rlc_am_pdu_sn_10_t *pduP, int16_t payload_sizeP, bool is_new_pdu);
/*! \fn void rlc_am_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlcP)
* \brief Segment a PDU with 10 bits sequence number, based on segmentation information given by MAC (size to transmit).
@@ -237,7 +237,7 @@ rlc_am_receive_process_control_pdu(
rlc_sn_t nack_sn,prev_nack_sn;
sdu_size_t data_cnf_so_stop = 0x7FFF;
unsigned int nack_index;
boolean_t status = TRUE;
bool status = true;
if (rlc_am_get_control_pdu_infos(rlc_am_pdu_sn_10_p, tb_size_in_bytes_pP, &rlc_pP->control_pdu_info) >= 0) {
rlc_am_tx_buffer_display(ctxt_pP, rlc_pP, " TX BUFFER BEFORE PROCESS OF STATUS PDU");
@@ -282,7 +282,7 @@ rlc_am_receive_process_control_pdu(
if (RLC_AM_DIFF_SN(rlc_pP->vt_s,rlc_pP->vt_a) >= RLC_AM_DIFF_SN(ack_sn,rlc_pP->vt_a)) {
if (rlc_pP->control_pdu_info.num_nack == 0) {
while (sn_cursor != ack_sn) {
rlc_am_ack_pdu(ctxt_pP, rlc_pP, sn_cursor,TRUE);
rlc_am_ack_pdu(ctxt_pP, rlc_pP, sn_cursor, true);
sn_cursor = RLC_AM_NEXT_SN(sn_cursor);
}
@@ -294,7 +294,7 @@ rlc_am_receive_process_control_pdu(
prev_nack_sn = 0x3FFF;
while (sn_cursor != nack_sn) {
rlc_am_ack_pdu(ctxt_pP, rlc_pP, sn_cursor,TRUE);
rlc_am_ack_pdu(ctxt_pP, rlc_pP, sn_cursor, true);
sn_cursor = RLC_AM_NEXT_SN(sn_cursor);
}
@@ -316,7 +316,7 @@ rlc_am_receive_process_control_pdu(
rlc_am_ack_pdu(ctxt_pP,
rlc_pP,
sn_cursor,
FALSE);
false);
} else {
status = rlc_am_nack_pdu (ctxt_pP,
rlc_pP,
@@ -348,13 +348,13 @@ rlc_am_receive_process_control_pdu(
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT" WARNING CONTROL PDU ACK SN %d OUT OF WINDOW vtA=%d vtS=%d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),ack_sn,rlc_pP->vt_a,rlc_pP->vt_s);
*tb_size_in_bytes_pP = 0;
status = FALSE;
status = false;
}
} else {
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT" ERROR IN DECODING CONTROL PDU\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
*tb_size_in_bytes_pP = 0;
status = FALSE;
status = false;
}
if (status) {
@@ -480,8 +480,8 @@ rlc_am_send_status_pdu(
int waited_so = 0;
mem_block_t *tb_p = NULL;
sdu_size_t pdu_size = 0;
boolean_t status_report_completed = false;
boolean_t segment_loop_end = false;
bool status_report_completed = false;
bool segment_loop_end = false;
memset(&control_pdu_info, 0, sizeof(rlc_am_control_pdu_info_t));
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] nb_bits_to_transmit %d (15 already allocated for header)\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
+1 -1
View File
@@ -1170,7 +1170,7 @@ void rlc_am_v9_3_0_test(void)
{
// initscr();
// cbreak();
// keypad(stdscr, TRUE);
// keypad(stdscr, true);
// under test
pool_buffer_init();
set_comp_log(RLC, LOG_ERR, LOG_MED, 1);
@@ -111,7 +111,7 @@ rlc_am_check_timer_poll_retransmit(
}
rlc_pP->force_poll= TRUE;
rlc_pP->force_poll = true;
//BugFix : new ms_time_out is computed when next poll is transmitter
}
}
+5 -7
View File
@@ -31,13 +31,11 @@
#include "list.h"
#include "LAYER2/MAC/mac_extern.h"
//-----------------------------------------------------------------------------
void
rlc_tm_send_sdu (
const protocol_ctxt_t* const ctxt_pP,
rlc_tm_entity_t * const rlc_pP,
const boolean_t error_indicationP,
uint8_t * const srcP,
const sdu_size_t length_in_bitsP)
void rlc_tm_send_sdu(const protocol_ctxt_t* const ctxt_pP,
rlc_tm_entity_t * const rlc_pP,
const bool error_indicationP,
uint8_t * const srcP,
const sdu_size_t length_in_bitsP)
{
int length_in_bytes;
#if DEBUG_RLC_TM_DISPLAY_ASCII_DATA
+6 -7
View File
@@ -51,7 +51,7 @@
/*! \fn void rlc_tm_send_sdu (
* const protocol_ctxt_t* const ctxt_pP,
* rlc_tm_entity_t * const rlc_pP,
* const boolean_t error_indicationP,
* const bool error_indicationP,
* uint8_t * const srcP,
* const sdu_size_t length_in_bitsP)
* \brief Send SDU if any reassemblied to upper layer.
@@ -60,12 +60,11 @@
* \param[in] srcP SDU data pointer.
* \param[in] length_in_bitsP Length of SDU in bits.
*/
void rlc_tm_send_sdu (
const protocol_ctxt_t* const ctxt_pP,
rlc_tm_entity_t * const rlc_pP,
const boolean_t error_indicationP,
uint8_t * const srcP,
const sdu_size_t length_in_bitsP);
void rlc_tm_send_sdu(const protocol_ctxt_t* const ctxt_pP,
rlc_tm_entity_t * const rlc_pP,
const bool error_indicationP,
uint8_t * const srcP,
const sdu_size_t length_in_bitsP);
/*! \fn void rlc_tm_no_segment (const protocol_ctxt_t* const ctxt_pP, rlc_tm_entity_t * const rlcP)
* \brief Schedule a SDU to be transmited by lower layers.
@@ -40,14 +40,13 @@
* \brief Structure containing a RLC TM instance protocol variables, allocation variables, buffers and other miscellaneous variables.
*/
typedef struct rlc_tm_entity {
boolean_t allocation; /*!< \brief Boolean for rlc_tm_entity_t struct allocation. */
bool allocation; /*!< \brief Boolean for rlc_tm_entity_t struct allocation. */
rlc_protocol_state_t protocol_state; /*!< \brief Protocol state, can be RLC_NULL_STATE, RLC_DATA_TRANSFER_READY_STATE, RLC_LOCAL_SUSPEND_STATE. */
boolean_t is_uplink_downlink; /*!< \brief Is this instance is a transmitter, a receiver or both? */
boolean_t is_data_plane; /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */
bool is_uplink_downlink; /*!< \brief Is this instance is a transmitter, a receiver or both? */
bool is_data_plane; /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */
// for stats and trace purpose :
logical_chan_id_t channel_id; /*!< \brief Transport channel identifier. */
rb_id_t rb_id; /*!< \brief Radio bearer identifier, for statistics and trace purpose. */
//boolean_t is_enb; /*!< \brief To know if the RLC belongs to a eNB or UE. */
//-----------------------------
// tranmission
//-----------------------------
+3 -4
View File
@@ -133,10 +133,9 @@ rlc_tm_cleanup (
}
//-----------------------------------------------------------------------------
void rlc_tm_configure(
const protocol_ctxt_t* const ctxt_pP,
rlc_tm_entity_t * const rlcP,
const boolean_t is_uplink_downlinkP)
void rlc_tm_configure(const protocol_ctxt_t* const ctxt_pP,
rlc_tm_entity_t * const rlcP,
const bool is_uplink_downlinkP)
{
rlcP->is_uplink_downlink = is_uplink_downlinkP;
rlc_tm_reset_state_variables (ctxt_pP, rlcP);
+7 -10
View File
@@ -78,27 +78,24 @@ void rlc_tm_init (
* \brief Reset protocol variables and state variables to initial values.
* \param[in] rlcP RLC TM protocol instance pointer.
*/
void rlc_tm_reset_state_variables (
const protocol_ctxt_t* const ctxt_pP,
rlc_tm_entity_t * const rlcP);
void rlc_tm_reset_state_variables(const protocol_ctxt_t* const ctxt_pP,
rlc_tm_entity_t * const rlcP);
/*! \fn void rlc_tm_cleanup(rlc_tm_entity_t * const rlcP)
* \brief Free all allocated memory (lists and buffers) previously allocated by this RLC TM instance.
* \param[in] rlcP RLC TM protocol instance pointer.
*/
void rlc_tm_cleanup(
rlc_tm_entity_t * const rlcP);
void rlc_tm_cleanup(rlc_tm_entity_t * const rlcP);
/*! \fn void rlc_tm_configure(const protocol_ctxt_t* const ctxt_pP,rlc_tm_entity_t * const rlcP, const boolean_t is_uplink_downlinkP)
/*! \fn void rlc_tm_configure(const protocol_ctxt_t* const ctxt_pP,rlc_tm_entity_t * const rlcP, const bool is_uplink_downlinkP)
* \brief Configure RLC TM protocol parameters.
* \param[in] rlcP RLC TM protocol instance pointer.
* \param[in] is_uplink_downlinkP Is this instance is TRANSMITTER_ONLY,
RECEIVER_ONLY, or TRANSMITTER_AND_RECEIVER.
*/
void rlc_tm_configure(
const protocol_ctxt_t* const ctxt_pP,
rlc_tm_entity_t * const rlcP,
const boolean_t is_uplink_downlinkP);
void rlc_tm_configure(const protocol_ctxt_t* const ctxt_pP,
rlc_tm_entity_t * const rlcP,
const bool is_uplink_downlinkP);
/*! \fn void rlc_tm_set_debug_infos(const protocol_ctxt_t* const ctxt_pP, rlc_tm_entity_t * const rlcP, const rb_id_t rb_idP, const srb_flag_t srb_flagP)
* \brief Set debug informations for a RLC TM protocol instance, these informations are only for trace purpose.
@@ -263,7 +263,7 @@ rlc_um_init (
}
rlc_pP->first_pdu = 1;
rlc_pP->initialized = TRUE;
rlc_pP->initialized = true;
}
}
//-----------------------------------------------------------------------------
@@ -53,12 +53,11 @@ typedef struct rlc_um_timer_s {
*/
typedef struct rlc_um_entity_s {
boolean_t initialized; /*!< \brief Boolean for rlc_am_entity_t struct initialization. */
boolean_t is_uplink_downlink; /*!< \brief Is this instance is a transmitter, a receiver or both? */
bool initialized; /*!< \brief Boolean for rlc_am_entity_t struct initialization. */
bool is_uplink_downlink; /*!< \brief Is this instance is a transmitter, a receiver or both? */
rlc_protocol_state_t protocol_state; /*!< \brief Protocol state, can be RLC_NULL_STATE, RLC_DATA_TRANSFER_READY_STATE, RLC_LOCAL_SUSPEND_STATE. */
boolean_t is_data_plane; /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */
//boolean_t is_enb; /*!< \brief To know if the RLC belongs to a eNB or UE. */
boolean_t is_mxch; /*!< \brief To know if the RLC belongs to a MBMS bearer. */
bool is_data_plane; /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */
bool is_mxch; /*!< \brief To know if the RLC belongs to a MBMS bearer. */
//-----------------------------
// PROTOCOL VARIABLES
//-----------------------------
@@ -114,7 +113,7 @@ typedef struct rlc_um_entity_s {
//-----------------------------
// STATISTICS
//-----------------------------
boolean_t first_pdu; /*!< \brief Act as a boolean, tells if the next PDU is the first PDU to be received. */
bool first_pdu; /*!< \brief Act as a boolean, tells if the next PDU is the first PDU to be received. */
unsigned int stat_tx_pdcp_sdu; /*!< \brief Number of SDUs received from upper layers. */
unsigned int stat_tx_pdcp_bytes; /*!< \brief Number of SDU bytes received from upper layers. */
+7 -8
View File
@@ -41,13 +41,12 @@
#include "common/ran_context.h"
extern RAN_CONTEXT_t RC;
extern boolean_t pdcp_data_ind(
const protocol_ctxt_t *const ctxt_pP,
const srb_flag_t srb_flagP,
const MBMS_flag_t MBMS_flagP,
const rb_id_t rb_idP,
const sdu_size_t sdu_buffer_sizeP,
mem_block_t *const sdu_buffer_pP);
extern bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
const srb_flag_t srb_flagP,
const MBMS_flag_t MBMS_flagP,
const rb_id_t rb_idP,
const sdu_size_t sdu_buffer_sizeP,
mem_block_t *const sdu_buffer_pP);
#define DEBUG_RLC_PDCP_INTERFACE 1
//#define TRACE_RLC_PAYLOAD 1
@@ -397,7 +396,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_IN);
if (MBMS_flagP == TRUE) {
if (MBMS_flagP == true) {
if (ctxt_pP->enb_flag) {
log_ch_id = rlc_mbms_enb_get_lcid_by_rb_id(ctxt_pP->module_id,rb_idP);
mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->module_id][log_ch_id];
+1 -1
View File
@@ -107,7 +107,7 @@ typedef struct {
rlc_buffer_occupancy_t pdus_in_buffer; /*!< \brief Number of PDUs buffered in RLC protocol instance (OBSOLETE). */
frame_t head_sdu_creation_time; /*!< \brief Head SDU creation time. */
sdu_size_t head_sdu_remaining_size_to_send; /*!< \brief remaining size of sdu: could be the total size or the remaining size of already segmented sdu */
boolean_t head_sdu_is_segmented; /*!< \brief 0 if head SDU has not been segmented, 1 if already segmented */
bool head_sdu_is_segmented; /*!< \brief 0 if head SDU has not been segmented, 1 if already segmented */
} mac_rlc_status_resp_t;
+2 -2
View File
@@ -425,8 +425,8 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(
/* Assumptions : for UE only */
/* At each TTI, Buffer Occupancy is first computed in mac_rlc_status_ind called by MAC ue_scheduler() function */
/* Then this function is called during MAC multiplexing ue_get_sdu(), and it may be call several times for the same bearer if it is in AM mode and there are several PDU types to transmit */
//AssertFatal(enb_flagP == FALSE,"RLC Tx mac_rlc_get_buffer_occupancy_ind function is not implemented for eNB LcId=%d\n", channel_idP);
if(enb_flagP != FALSE) {
//AssertFatal(enb_flagP == false,"RLC Tx mac_rlc_get_buffer_occupancy_ind function is not implemented for eNB LcId=%d\n", channel_idP);
if(enb_flagP != false) {
LOG_E(RLC, "Tx mac_rlc_get_buffer_occupancy_ind function is not implemented for eNB LcId=%u\n", channel_idP);
return 0;
}
+5 -5
View File
@@ -480,7 +480,7 @@ rlc_op_status_t rrc_rlc_remove_rlc (
/* for no gcc warnings */
(void)lcid;
if (MBMS_flagP == TRUE) {
if (MBMS_flagP == true) {
if (ctxt_pP->enb_flag) {
lcid = rlc_mbms_enb_get_lcid_by_rb_id(ctxt_pP->module_id,rb_idP);
mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->module_id][lcid];
@@ -581,7 +581,7 @@ rlc_union_t *rrc_rlc_add_rlc (
rlc_mbms_id_t *mbms_id_p = NULL;
logical_chan_id_t lcid = 0;
if (MBMS_flagP == FALSE) {
if (MBMS_flagP == false) {
//AssertFatal (rb_idP < NB_RB_MAX, "RB id is too high (%u/%d)!\n", rb_idP, NB_RB_MAX);
//AssertFatal (chan_idP < RLC_MAX_LC, "LC id is too high (%u/%d)!\n", chan_idP, RLC_MAX_LC);
if(rb_idP >= NB_RB_MAX) {
@@ -595,7 +595,7 @@ rlc_union_t *rrc_rlc_add_rlc (
}
}
if (MBMS_flagP == TRUE) {
if (MBMS_flagP == true) {
if (ctxt_pP->enb_flag) {
lcid = rlc_mbms_enb_get_lcid_by_rb_id(ctxt_pP->module_id,rb_idP);
mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->module_id][lcid];
@@ -640,11 +640,11 @@ rlc_union_t *rrc_rlc_add_rlc (
} else if (h_rc == HASH_TABLE_KEY_NOT_EXISTS) {
rlc_union_p = calloc(1, sizeof(rlc_union_t));
h_rc = hashtable_insert(rlc_coll_p, key, rlc_union_p);
if(MBMS_flagP != TRUE)
if(MBMS_flagP != true)
h_lcid_rc = hashtable_insert(rlc_coll_p, key_lcid, rlc_union_p);
if ((h_rc == HASH_TABLE_OK) && (h_lcid_rc == HASH_TABLE_OK)) {
if (MBMS_flagP == TRUE) {
if (MBMS_flagP == true) {
LOG_I(RLC, PROTOCOL_CTXT_FMT" RLC service id %u session id %u rrc_rlc_add_rlc\n",
PROTOCOL_CTXT_ARGS(ctxt_pP),
mbms_id_p->service_id,
+67 -79
View File
@@ -359,15 +359,14 @@ static void enqueue_pdcp_data_ind(
if (pthread_mutex_unlock(&pq.m) != 0) abort();
}
boolean_t pdcp_data_ind(
const protocol_ctxt_t *const ctxt_pP,
const srb_flag_t srb_flagP,
const MBMS_flag_t MBMS_flagP,
const rb_id_t rb_id,
const sdu_size_t sdu_buffer_size,
mem_block_t *const sdu_buffer,
const uint32_t *const srcID,
const uint32_t *const dstID)
bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
const srb_flag_t srb_flagP,
const MBMS_flag_t MBMS_flagP,
const rb_id_t rb_id,
const sdu_size_t sdu_buffer_size,
mem_block_t *const sdu_buffer,
const uint32_t *const srcID,
const uint32_t *const dstID)
{
enqueue_pdcp_data_ind(ctxt_pP,
srb_flagP,
@@ -438,7 +437,7 @@ static void *enb_tun_read_thread(void *_)
ctxt.rnti = rnti;
uint8_t qfi = 7;
boolean_t rqi = 0;
bool rqi = 0;
int pdusession_id = 10;
sdap_data_req(&ctxt, SRB_FLAG_NO, rb_id, RLC_MUI_UNDEFINED,
@@ -484,7 +483,7 @@ static void *ue_tun_read_thread(void *_)
ctxt.rnti = rnti;
boolean_t dc = SDAP_HDR_UL_DATA_PDU;
bool dc = SDAP_HDR_UL_DATA_PDU;
uint8_t qfi = 7;
int pdusession_id = 10;
@@ -858,7 +857,7 @@ void pdcp_run(const protocol_ctxt_t *const ctxt_pP)
RRC_DCCH_DATA_REQ(msg_p).mode,
NULL, NULL);
if (result != TRUE)
if (result != true)
LOG_E(PDCP, "PDCP data request failed!\n");
result = itti_free(ITTI_MSG_ORIGIN_ID(msg_p), RRC_DCCH_DATA_REQ(msg_p).sdu_p);
AssertFatal(result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
@@ -950,7 +949,7 @@ static void add_drb_am(int is_gnb, int rnti, struct NR_DRB_ToAddMod *s,
int has_sdap = 0;
int has_sdapULheader=0;
int has_sdapDLheader=0;
boolean_t is_sdap_DefaultDRB = false;
bool is_sdap_DefaultDRB = false;
NR_QFI_t *mappedQFIs2Add = NULL;
uint8_t mappedQFIs2AddCount=0;
if (s->cnAssociation->present == NR_DRB_ToAddMod__cnAssociation_PR_eps_BearerIdentity)
@@ -1033,20 +1032,18 @@ static void add_drb(int is_gnb, int rnti, struct NR_DRB_ToAddMod *s,
LOG_I(PDCP, "%s:%s:%d: added DRB for UE RNTI %x\n", __FILE__, __FUNCTION__, __LINE__, rnti);
}
boolean_t nr_rrc_pdcp_config_asn1_req(
const protocol_ctxt_t *const ctxt_pP,
NR_SRB_ToAddModList_t *const srb2add_list,
NR_DRB_ToAddModList_t *const drb2add_list,
NR_DRB_ToReleaseList_t *const drb2release_list,
const uint8_t security_modeP,
uint8_t *const kRRCenc,
uint8_t *const kRRCint,
uint8_t *const kUPenc,
uint8_t *const kUPint
,LTE_PMCH_InfoList_r9_t *pmch_InfoList_r9
,rb_id_t *const defaultDRB,
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list)
//struct NR_RLC_Config *rlc_Config)
bool nr_rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
NR_SRB_ToAddModList_t *const srb2add_list,
NR_DRB_ToAddModList_t *const drb2add_list,
NR_DRB_ToReleaseList_t *const drb2release_list,
const uint8_t security_modeP,
uint8_t *const kRRCenc,
uint8_t *const kRRCint,
uint8_t *const kUPenc,
uint8_t *const kUPint,
LTE_PMCH_InfoList_r9_t *pmch_InfoList_r9,
rb_id_t *const defaultDRB,
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list)
{
int rnti = ctxt_pP->rnti;
int i;
@@ -1104,17 +1101,16 @@ boolean_t nr_rrc_pdcp_config_asn1_req(
}
/* Dummy function due to dependency from LTE libraries */
boolean_t rrc_pdcp_config_asn1_req(
const protocol_ctxt_t *const ctxt_pP,
LTE_SRB_ToAddModList_t *const srb2add_list,
LTE_DRB_ToAddModList_t *const drb2add_list,
LTE_DRB_ToReleaseList_t *const drb2release_list,
const uint8_t security_modeP,
uint8_t *const kRRCenc,
uint8_t *const kRRCint,
uint8_t *const kUPenc
,LTE_PMCH_InfoList_r9_t *pmch_InfoList_r9
,rb_id_t *const defaultDRB)
bool rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
LTE_SRB_ToAddModList_t *const srb2add_list,
LTE_DRB_ToAddModList_t *const drb2add_list,
LTE_DRB_ToReleaseList_t *const drb2release_list,
const uint8_t security_modeP,
uint8_t *const kRRCenc,
uint8_t *const kRRCint,
uint8_t *const kUPenc,
LTE_PMCH_InfoList_r9_t *pmch_InfoList_r9,
rb_id_t *const defaultDRB)
{
return 0;
}
@@ -1219,8 +1215,7 @@ uint64_t get_pdcp_optmask(void)
return pdcp_optmask;
}
boolean_t pdcp_remove_UE(
const protocol_ctxt_t *const ctxt_pP)
bool pdcp_remove_UE(const protocol_ctxt_t *const ctxt_pP)
{
int rnti = ctxt_pP->rnti;
@@ -1275,13 +1270,12 @@ void pdcp_config_set_security(
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
}
static boolean_t pdcp_data_req_srb(
protocol_ctxt_t *ctxt_pP,
const rb_id_t rb_id,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer)
static bool pdcp_data_req_srb(protocol_ctxt_t *ctxt_pP,
const rb_id_t rb_id,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer)
{
LOG_D(PDCP, "%s() called, size %d\n", __func__, sdu_buffer_size);
nr_pdcp_ue_t *ue;
@@ -1322,13 +1316,12 @@ static boolean_t pdcp_data_req_srb(
}
static boolean_t pdcp_data_req_drb(
protocol_ctxt_t *ctxt_pP,
const rb_id_t rb_id,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer)
static bool pdcp_data_req_drb(protocol_ctxt_t *ctxt_pP,
const rb_id_t rb_id,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer)
{
LOG_D(PDCP, "%s() called, size %d\n", __func__, sdu_buffer_size);
nr_pdcp_ue_t *ue;
@@ -1368,19 +1361,16 @@ static boolean_t pdcp_data_req_drb(
return 1;
}
boolean_t cu_f1u_data_req(
protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_id,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t mode
,const uint32_t *const sourceL2Id
,const uint32_t *const destinationL2Id
) {
bool cu_f1u_data_req(protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_id,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t mode,
const uint32_t *const sourceL2Id,
const uint32_t *const destinationL2Id) {
//Force instance id to 0, OAI incoherent instance management
ctxt_pP->instance=0;
mem_block_t *memblock = get_free_mem_block(sdu_buffer_size, __func__);
@@ -1397,18 +1387,16 @@ boolean_t cu_f1u_data_req(
return ret;
}
boolean_t pdcp_data_req(
protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_id,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t mode
,const uint32_t *const sourceL2Id
,const uint32_t *const destinationL2Id
)
bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_id,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t mode,
const uint32_t *const sourceL2Id,
const uint32_t *const destinationL2Id)
{
if (srb_flagP) {
return pdcp_data_req_srb(ctxt_pP, rb_id, muiP, confirmP, sdu_buffer_size, sdu_buffer);
-5
View File
@@ -55,11 +55,6 @@
# define M2AP_PORT 36423
#endif
#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif
extern int asn1_xer_print;
#if defined(ENB_MODE)
+1 -1
View File
@@ -306,7 +306,7 @@ rrc_rx_tx(
LOG_D(RRC,"SFN.SN %d.%d => release timer %d/%d\n",ctxt_pP->frame,ctxt_pP->subframe,
ue_context_p->ue_context.ue_release_timer,ue_context_p->ue_context.ue_release_timer_thres);
if ((ctxt_pP->frame == 0) && (ctxt_pP->subframe==0)) {
if (ue_context_p->ue_context.Initialue_identity_s_TMSI.presence == TRUE) {
if (ue_context_p->ue_context.Initialue_identity_s_TMSI.presence == true) {
LOG_I(RRC,"UE rnti %x:S-TMSI %x failure timer %d/20000\n",
ue_context_p->ue_context.rnti,
ue_context_p->ue_context.Initialue_identity_s_TMSI.m_tmsi,
+1 -1
View File
@@ -299,7 +299,7 @@ mac_rrc_data_ind(
const uint8_t *sduP,
const sdu_size_t sdu_lenP,
const uint8_t mbsfn_sync_areaP,
const boolean_t brOption
const bool brOption
)
//--------------------------------------------------------------------------
{
+2 -2
View File
@@ -58,7 +58,7 @@ rrc_data_req(
{
if(sdu_sizeP == 255) {
LOG_I(RRC,"sdu_sizeP == 255");
return FALSE;
return false;
}
MessageDef *message_p;
@@ -94,7 +94,7 @@ rrc_data_req(
if (ctxt_pP->enb_flag && NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type))
pdcp_run(ctxt_pP);
return TRUE; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
return true; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
}
//------------------------------------------------------------------------------
+1 -1
View File
@@ -298,7 +298,7 @@ rrc_data_req_ue(
TASK_PDCP_UE,
ctxt_pP->instance,
message_p);
return TRUE; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
return true; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
}
}
+6 -6
View File
@@ -343,7 +343,7 @@ uint8_t do_MIB_SL(const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,
if (in_coverage > 0 ) {
//in coverage
mib_sl->inCoverage_r12 = TRUE;
mib_sl->inCoverage_r12 = true;
mib_sl->sl_Bandwidth_r12 = *UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index]->freqInfo.ul_Bandwidth;
if (UE_rrc_inst[ctxt_pP->module_id].sib1[eNB_index]->tdd_Config) {
@@ -366,7 +366,7 @@ uint8_t do_MIB_SL(const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,
} else {
//Todo - out of coverage for V2X
// Todo - UE has a selected SyncRef UE
mib_sl->inCoverage_r12 = FALSE;
mib_sl->inCoverage_r12 = false;
//set sl-Bandwidth, subframeAssignmentSL and reserved from the pre-configured parameters
}
@@ -989,7 +989,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
sib1_1250->nonCriticalExtension = NULL;
////Rel1310
if ((configuration->schedulingInfoSIB1_BR_r13[CC_id] != 0) &&
(brOption==TRUE)) {
(brOption==true)) {
sib1_1250->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v1310_IEs_t));
memset(sib1_1250->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v1310_IEs_t));
LTE_SystemInformationBlockType1_v1310_IEs_t *sib1_1310 = sib1_1250->nonCriticalExtension;
@@ -1279,7 +1279,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
*sib2 = &sib2_part->choice.sib2;
*sib3 = &sib3_part->choice.sib3;
if ((configuration->eMBMS_configured > 0) && (brOption==FALSE)) {
if ((configuration->eMBMS_configured > 0) && (brOption==false)) {
sib13_part = CALLOC(1,sizeof(struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
memset(sib13_part,0,sizeof(struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
sib13_part->present = LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib13_v920;
@@ -2781,7 +2781,7 @@ do_RRCConnectionSetup(
mac_MainConfig->ul_SCH_Config->maxHARQ_Tx = maxHARQ_Tx; // max number of UL HARQ transmission
mac_MainConfig->ul_SCH_Config->periodicBSR_Timer = periodicBSR_Timer;
mac_MainConfig->ul_SCH_Config->retxBSR_Timer = LTE_RetxBSR_Timer_r12_sf320; // LTE_RetxBSR_Timer_r12_sf5120 // regular BSR timer
mac_MainConfig->ul_SCH_Config->ttiBundling = 0; // FALSE
mac_MainConfig->ul_SCH_Config->ttiBundling = 0; // false
//* timeAlignmentTimerDedicated *//
mac_MainConfig->timeAlignmentTimerDedicated = LTE_TimeAlignmentTimer_infinity;
//* DRX Config *//
@@ -3135,7 +3135,7 @@ uint8_t do_RRCConnectionSetup_BR(
//mac_MainConfig->ul_SCH_Config->maxHARQ_Tx = maxHARQ_Tx;
mac_MainConfig->ul_SCH_Config->periodicBSR_Timer = periodicBSR_Timer;
mac_MainConfig->ul_SCH_Config->retxBSR_Timer = LTE_RetxBSR_Timer_r12_sf320;
mac_MainConfig->ul_SCH_Config->ttiBundling = 0; // FALSE
mac_MainConfig->ul_SCH_Config->ttiBundling = 0; // false
mac_MainConfig->timeAlignmentTimerDedicated = LTE_TimeAlignmentTimer_infinity;
mac_MainConfig->drx_Config = NULL;
mac_MainConfig->phr_Config = CALLOC(1, sizeof(*mac_MainConfig->phr_Config));
+1 -1
View File
@@ -156,7 +156,7 @@ typedef struct UE_RRC_INFO_NB_IoT_s {
#define RRC_TRANSACTION_IDENTIFIER_NUMBER 3
typedef struct UE_S_TMSI_NB_IoT_s {
boolean_t presence;
bool presence;
mme_code_t mme_code;
m_tmsi_t m_tmsi;
} __attribute__ ((__packed__)) UE_S_TMSI_NB_IoT;
+4 -5
View File
@@ -4351,8 +4351,8 @@ void rrc_ue_generate_nrMeasurementReport(protocol_ctxt_t *const ctxt_pP, uint8_t
AssertFatal(size >= 0, "do_nrMeasurementReport failed \n");
LOG_I(RRC, "[UE %d] Frame %d : Generating Measurement Report for eNB %d\n",
ctxt_pP->module_id, ctxt_pP->frame, eNB_index);
int result = pdcp_data_req(ctxt_pP, SRB_FLAG_YES, DCCH, rrc_mui++, 0, size, buffer, PDCP_TRANSMISSION_MODE_DATA,NULL, NULL);
AssertFatal (result == TRUE, "PDCP data request failed!\n");
const bool result = pdcp_data_req(ctxt_pP, SRB_FLAG_YES, DCCH, rrc_mui++, 0, size, buffer, PDCP_TRANSMISSION_MODE_DATA,NULL, NULL);
AssertFatal (result == true, "PDCP data request failed!\n");
}
}
}
@@ -4370,7 +4370,6 @@ void rrc_ue_generate_MeasurementReport(protocol_ctxt_t *const ctxt_pP, uint8_t e
long nElem, nElem1;
float rsrp_filtered, rsrq_filtered;
static frame_t pframe=0;
int result;
nElem = 98;
nElem1 = 35;
target_eNB_offset = UE_rrc_inst[ctxt_pP->module_id].Info[0].handoverTarget; // eNB_offset of target eNB: used to obtain the mod_id of target eNB
@@ -4420,8 +4419,8 @@ void rrc_ue_generate_MeasurementReport(protocol_ctxt_t *const ctxt_pP, uint8_t e
AssertFatal(size >= 0, "do_MeasurementReport failed \n");
LOG_I(RRC, "[UE %d] Frame %d : Generating Measurement Report for eNB %d. Size is %zu\n",
ctxt_pP->module_id, ctxt_pP->frame, eNB_index, size);
result = pdcp_data_req(ctxt_pP, SRB_FLAG_YES, DCCH, rrc_mui++, 0, size, buffer, PDCP_TRANSMISSION_MODE_DATA,NULL, NULL);
AssertFatal (result == TRUE, "PDCP data request failed!\n");
const bool result = pdcp_data_req(ctxt_pP, SRB_FLAG_YES, DCCH, rrc_mui++, 0, size, buffer, PDCP_TRANSMISSION_MODE_DATA,NULL, NULL);
AssertFatal (result == true, "PDCP data request failed!\n");
//LOG_D(RRC, "[UE %d] Frame %d Sending MeasReport (%d bytes) through DCCH%d to PDCP \n",ue_mod_idP,frameP, size, DCCH);
}
+2 -2
View File
@@ -367,7 +367,7 @@ typedef struct UE_RRC_INFO_s {
} __attribute__ ((__packed__)) UE_RRC_INFO;
typedef struct UE_S_TMSI_s {
boolean_t presence;
bool presence;
mme_code_t mme_code;
m_tmsi_t m_tmsi;
} __attribute__ ((__packed__)) UE_S_TMSI;
@@ -931,7 +931,7 @@ typedef struct UE_RRC_INST_s {
} UE_RRC_INST;
typedef struct UE_PF_PO_s {
boolean_t enable_flag; /* flag indicate whether current object is used */
bool enable_flag; /* flag indicate whether current object is used */
uint16_t ue_index_value; /* UE index value */
uint8_t PF_min; /* minimal value of Paging Frame (PF) */
uint8_t PO; /* Paging Occasion (PO) */
+31 -34
View File
@@ -150,7 +150,7 @@ init_SI(
LTE_SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext=(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL;
LOG_D(RRC,"%s()\n\n\n\n",__FUNCTION__);
if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == TRUE) {
if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == true) {
LOG_A(RRC, "Configuring MIB FeMBMS (N_RB_DL %d)\n",
(int)configuration->N_RB_DL[CC_id]);
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].MIB_FeMBMS = (uint8_t *) malloc16(4);
@@ -266,7 +266,7 @@ init_SI(
carrier->sizeof_SIB1 = do_SIB1(&rrc->carrier[CC_id],
ctxt_pP->module_id,
CC_id,
FALSE,
false,
configuration
);
AssertFatal(carrier->sizeof_SIB1 != 255,"FATAL, RC.rrc[enb_mod_idP].carrier[CC_id].sizeof_SIB1 == 255");
@@ -276,7 +276,7 @@ init_SI(
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_BR = (uint8_t *) malloc16(32);
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_BR = do_SIB1(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],
ctxt_pP->module_id,
CC_id, TRUE, configuration);
CC_id, true, configuration);
}
}
@@ -285,7 +285,7 @@ init_SI(
AssertFatal(carrier->SIB23!=NULL,"cannot allocate memory for SIB");
carrier->sizeof_SIB23 = do_SIB23(ctxt_pP->module_id,
CC_id,
FALSE,
false,
configuration
);
LOG_I(RRC,"do_SIB23, size %d \n ", carrier->sizeof_SIB23);
@@ -295,7 +295,7 @@ init_SI(
if (configuration->schedulingInfoSIB1_BR_r13[CC_id]>0) {
carrier->SIB23_BR = (uint8_t *) malloc16(64);
AssertFatal(carrier->SIB23_BR!=NULL,"cannot allocate memory for SIB");
carrier->sizeof_SIB23_BR = do_SIB23(ctxt_pP->module_id, CC_id, TRUE, configuration);
carrier->sizeof_SIB23_BR = do_SIB23(ctxt_pP->module_id, CC_id, true, configuration);
}
LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" SIB2/3 Contents (partial)\n",
@@ -661,7 +661,7 @@ rrc_eNB_get_next_transaction_identifier(
////-----------------------------------------------------------------------------
//{
//
// boolean_t reg = FALSE;
// bool reg = false;
// module_id_t i;
//
// AssertFatal(enb_mod_idP < NB_eNB_INST, "eNB index invalid (%d/%d)!", enb_mod_idP, NB_eNB_INST);
@@ -669,12 +669,12 @@ rrc_eNB_get_next_transaction_identifier(
// for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
// if (RC.rrc[enb_mod_idP]->Info.UE_info[i] == UE_identity) {
// // UE_identity already registered
// reg = TRUE;
// reg = true;
// break;
// }
// }
//
// if (reg == FALSE) {
// if (reg == false) {
// return (UE_MODULE_INVALID);
// } else
// return (i);
@@ -713,7 +713,7 @@ rrc_eNB_ue_context_stmsi_exist(
m_tmsiP, mme_codeP, ue_context_p,
ue_context_p->ue_context.rnti);
if (ue_context_p->ue_context.Initialue_identity_s_TMSI.presence == TRUE) {
if (ue_context_p->ue_context.Initialue_identity_s_TMSI.presence == true) {
printf("=> S-TMSI %x, MME %x\n",
ue_context_p->ue_context.Initialue_identity_s_TMSI.m_tmsi,
ue_context_p->ue_context.Initialue_identity_s_TMSI.mme_code);
@@ -986,7 +986,7 @@ void remove_UE_from_freelist(module_id_t mod_id, rnti_t rnti) {
pthread_mutex_unlock(&lock_ue_freelist);
}
void put_UE_in_freelist(module_id_t mod_id, rnti_t rnti, boolean_t removeFlag) {
void put_UE_in_freelist(module_id_t mod_id, rnti_t rnti, bool removeFlag) {
UE_free_list_t *free_list = NULL;
eNB_MAC_INST *eNB_MAC = RC.mac[mod_id];
pthread_mutex_lock(&lock_ue_freelist);
@@ -1013,7 +1013,7 @@ void release_UE_in_freeList(module_id_t mod_id) {
PHY_VARS_eNB *eNB_PHY = NULL;
struct rrc_eNB_ue_context_s *ue_context_pP = NULL;
eNB_MAC_INST *eNB_MAC = RC.mac[mod_id];
boolean_t remove_UEContext;
bool remove_UEContext;
rnti_t rnti;
int head, tail, ue_num;
pthread_mutex_lock(&lock_ue_freelist);
@@ -1678,7 +1678,7 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
ue_context_pP->ue_context.rnti = ctxt_pP->rnti;
if (EPC_MODE_ENABLED) {
uint8_t send_security_mode_command = FALSE;
uint8_t send_security_mode_command = false;
rrc_pdcp_config_security(
ctxt_pP,
ue_context_pP,
@@ -2332,7 +2332,7 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t *co
// PDCP
PDCP_rlc_AM = CALLOC(1, sizeof(*PDCP_rlc_AM));
DRB_pdcp_config->rlc_AM = PDCP_rlc_AM;
PDCP_rlc_AM->statusReportRequired = FALSE;
PDCP_rlc_AM->statusReportRequired = false;
break;
default :
@@ -2590,7 +2590,7 @@ rrc_eNB_modify_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t *cons
PDCP_rlc_AM = CALLOC(1, sizeof(*PDCP_rlc_AM));
DRB_pdcp_config->rlc_AM = PDCP_rlc_AM;
PDCP_rlc_AM->statusReportRequired = FALSE;
PDCP_rlc_AM->statusReportRequired = false;
break;
default :
@@ -2951,7 +2951,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
#ifdef RRC_DEFAULT_RAB_IS_AM // EXMIMO_IOT
PDCP_rlc_AM = CALLOC(1, sizeof(*PDCP_rlc_AM));
DRB_pdcp_config->rlc_AM = PDCP_rlc_AM;
PDCP_rlc_AM->statusReportRequired = FALSE;
PDCP_rlc_AM->statusReportRequired = false;
#else
PDCP_rlc_UM = CALLOC(1, sizeof(*PDCP_rlc_UM));
DRB_pdcp_config->rlc_UM = PDCP_rlc_UM;
@@ -3347,7 +3347,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.eventId.present = LTE_ReportConfigInterRAT__triggerType__event__eventId_PR_eventB1_NR_r15;
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.eventId.choice.eventB1_NR_r15.b1_ThresholdNR_r15.present = LTE_ThresholdNR_r15_PR_nr_RSRP_r15;
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.eventId.choice.eventB1_NR_r15.b1_ThresholdNR_r15.choice.nr_RSRP_r15 = 0;
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.eventId.choice.eventB1_NR_r15.reportOnLeave_r15 = FALSE;
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.eventId.choice.eventB1_NR_r15.reportOnLeave_r15 = false;
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.hysteresis = 2;
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.timeToTrigger = LTE_TimeToTrigger_ms80;
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.maxReportCells = 4;
@@ -3361,9 +3361,9 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
if (ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.ext7->reportQuantityCellNR_r15 == NULL) exit(1);
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.ext7->reportQuantityCellNR_r15->ss_rsrp = TRUE;
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.ext7->reportQuantityCellNR_r15->ss_rsrq = TRUE;
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.ext7->reportQuantityCellNR_r15->ss_sinr = TRUE;
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.ext7->reportQuantityCellNR_r15->ss_rsrp = true;
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.ext7->reportQuantityCellNR_r15->ss_rsrq = true;
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.ext7->reportQuantityCellNR_r15->ss_sinr = true;
ASN_SEQUENCE_ADD(&ReportConfig_list->list, ReportConfig_NR);
LOG_A(RRC, "Generating RRCCConnectionReconfigurationRequest (NRUE Measurement Report Request).\n");
}
@@ -3714,7 +3714,7 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
#ifdef RRC_DEFAULT_RAB_IS_AM // EXMIMO_IOT
PDCP_rlc_AM = CALLOC(1, sizeof(*PDCP_rlc_AM));
DRB_pdcp_config->rlc_AM = PDCP_rlc_AM;
PDCP_rlc_AM->statusReportRequired = FALSE;
PDCP_rlc_AM->statusReportRequired = 0; // FALSE
#else
PDCP_rlc_UM = CALLOC(1, sizeof(*PDCP_rlc_UM));
DRB_pdcp_config->rlc_UM = PDCP_rlc_UM;
@@ -5052,7 +5052,7 @@ check_handovers(
&& ue_context_p->ue_context.handover_info != NULL &&
ue_context_p->ue_context.handover_info->forwarding_state == FORWARDING_NO_EMPTY ) {
MessageDef *msg_p;
int result;
bool result;
protocol_ctxt_t ctxt;
do {
@@ -5090,7 +5090,7 @@ check_handovers(
GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).mode, NULL, NULL
);
if (result != TRUE) {
if (result != true) {
LOG_E(RRC, "target enb send data forwarding buffer to PDCP request failed!\n");
} else {
LOG_D(RRC, "target enb send data forwarding buffer to PDCP!\n");
@@ -5158,7 +5158,7 @@ check_handovers(
GTPV1U_ENB_END_MARKER_IND (msg_p).mode, NULL, NULL
);
if (result != TRUE) {
if (result != true) {
LOG_E(RRC, "target enb send spgw buffer to PDCP request failed!\n");
} else {
LOG_D(RRC, "target enb send spgw buffer to PDCP!\n");
@@ -5390,7 +5390,7 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
#ifdef RRC_DEFAULT_RAB_IS_AM // EXMIMO_IOT
PDCP_rlc_AM = CALLOC(1, sizeof(*PDCP_rlc_AM));
DRB_pdcp_config->rlc_AM = PDCP_rlc_AM;
PDCP_rlc_AM->statusReportRequired = FALSE;
PDCP_rlc_AM->statusReportRequired = 0; // FALSE
#else
PDCP_rlc_UM = CALLOC(1, sizeof(*PDCP_rlc_UM));
DRB_pdcp_config->rlc_UM = PDCP_rlc_UM;
@@ -6280,10 +6280,7 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc
ctxt_pP,
ue_context_p,
ue_context_p->ue_context.kenb);
rrc_pdcp_config_security(
ctxt_pP,
ue_context_p,
FALSE);
rrc_pdcp_config_security(ctxt_pP, ue_context_p, false);
}
// Add a new user (called during the HO procedure)
@@ -6361,9 +6358,9 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
UE_sched_ctrl_t *UE_scheduling_control = &(RC.mac[module_id]->UE_info.UE_sched_ctrl[UE_id_mac]);
if (UE_scheduling_control->cdrx_waiting_ack == TRUE) {
UE_scheduling_control->cdrx_waiting_ack = FALSE;
UE_scheduling_control->cdrx_configured = TRUE; // Set to TRUE when RRC Connection Reconfiguration is received
if (UE_scheduling_control->cdrx_waiting_ack == true) {
UE_scheduling_control->cdrx_waiting_ack = false;
UE_scheduling_control->cdrx_configured = true; // Set to TRUE when RRC Connection Reconfiguration is received
LOG_I(RRC, "CDRX configuration activated after RRC Connection Reconfiguration Complete reception\n");
}
}
@@ -6627,7 +6624,7 @@ rrc_eNB_generate_RRCConnectionSetup(
)
//-----------------------------------------------------------------------------
{
boolean_t is_mtc = ctxt_pP->brOption;
bool is_mtc = ctxt_pP->brOption;
LTE_LogicalChannelConfig_t *SRB1_logicalChannelConfig; //,*SRB2_logicalChannelConfig;
LTE_SRB_ToAddModList_t **SRB_configList;
LTE_SRB_ToAddMod_t *SRB1_config;
@@ -7284,7 +7281,7 @@ rrc_eNB_decode_ccch(
LOG_E(RRC, "%s:%d:%s: rrc_eNB_get_next_free_ue_context returned NULL\n", __FILE__, __LINE__, __FUNCTION__);
if (ue_context_p != NULL) {
ue_context_p->ue_context.Initialue_identity_s_TMSI.presence = TRUE;
ue_context_p->ue_context.Initialue_identity_s_TMSI.presence = true;
ue_context_p->ue_context.Initialue_identity_s_TMSI.mme_code = mme_code;
ue_context_p->ue_context.Initialue_identity_s_TMSI.m_tmsi = m_tmsi;
} else {
@@ -8766,7 +8763,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
if ((ctxt_pP->frame&127) == 0 && ctxt_pP->subframe ==0) {
if (fd) {
if (ue_context_p->ue_context.Initialue_identity_s_TMSI.presence == TRUE) {
if (ue_context_p->ue_context.Initialue_identity_s_TMSI.presence == true) {
fprintf(fd,"RRC UE rnti %x: S-TMSI %x failure timer %d/8\n",
ue_context_p->ue_context.rnti,
ue_context_p->ue_context.Initialue_identity_s_TMSI.m_tmsi,
+22 -26
View File
@@ -84,23 +84,20 @@ rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(
}
//------------------------------------------------------------------------------
boolean_t
gtpv_data_req(
const protocol_ctxt_t* const ctxt_pP,
const rb_id_t rb_idP,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_sizeP,
uint8_t* const buffer_pP,
const pdcp_transmission_mode_t modeP,
uint32_t task_id
)
bool gtpv_data_req(const protocol_ctxt_t* const ctxt_pP,
const rb_id_t rb_idP,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_sizeP,
uint8_t* const buffer_pP,
const pdcp_transmission_mode_t modeP,
uint32_t task_id)
//------------------------------------------------------------------------------
{
if(sdu_sizeP == 0)
{
LOG_I(GTPU,"gtpv_data_req sdu_sizeP == 0");
return FALSE;
return false;
}
LOG_D(GTPU,"gtpv_data_req ue rnti %x sdu_sizeP %d rb id %ld", ctxt_pP->rnti, sdu_sizeP, rb_idP);
MessageDef *message_p;
@@ -129,7 +126,7 @@ gtpv_data_req(
GTPV1U_ENB_DATA_FORWARDING_IND (message_p).eNB_index = ctxt_pP->eNB_index;
itti_send_msg_to_task (TASK_DATA_FORWARDING, ctxt_pP->instance, message_p);
return TRUE; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
return true; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
} else if (task_id == TASK_END_MARKER){
LOG_I(GTPU,"gtpv_data_req task_id = TASK_END_MARKER\n");
@@ -152,23 +149,22 @@ gtpv_data_req(
GTPV1U_ENB_END_MARKER_IND (message_p).eNB_index = ctxt_pP->eNB_index;
itti_send_msg_to_task (TASK_END_MARKER, ctxt_pP->instance, message_p);
return TRUE; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
return true; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
}
LOG_E(RRC, "Impossible state\n");
return FALSE;
return false;
}
boolean_t gtpv_data_req_new (
protocol_ctxt_t *ctxt,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_sizeP,
unsigned char *const sdu_buffer_pP,
const pdcp_transmission_mode_t modeP,
const uint32_t *sourceL2Id,
const uint32_t *destinationL2Id) {
bool gtpv_data_req_new(protocol_ctxt_t *ctxt,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_sizeP,
unsigned char *const sdu_buffer_pP,
const pdcp_transmission_mode_t modeP,
const uint32_t *sourceL2Id,
const uint32_t *destinationL2Id) {
int task;
if (sdu_buffer_sizeP==0)
+8 -11
View File
@@ -60,16 +60,13 @@ void rrc_eNB_send_GTPV1U_ENB_DELETE_TUNNEL_REQ(
rrc_eNB_ue_context_t* ue_context_pP
);
boolean_t
gtpv_data_req(
const protocol_ctxt_t* const ctxt_pP,
const rb_id_t rb_idP,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_sizeP,
uint8_t* const buffer_pP,
const pdcp_transmission_mode_t modeP,
uint32_t task_id
);
bool gtpv_data_req(const protocol_ctxt_t* const ctxt_pP,
const rb_id_t rb_idP,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_sizeP,
uint8_t* const buffer_pP,
const pdcp_transmission_mode_t modeP,
uint32_t task_id);
#endif /* RRC_ENB_GTPV1U_H_ */
+25 -27
View File
@@ -402,15 +402,13 @@ static e_LTE_SecurityAlgorithmConfig__integrityProtAlgorithm rrc_eNB_select_inte
*\param mod_id Instance ID of eNB.
*\param ue_index Instance ID of UE in the eNB.
*\param security_capabilities The security capabilities received from S1AP.
*\return TRUE if at least one algorithm has been changed else FALSE.
*\return true if at least one algorithm has been changed else false.
*/
int
rrc_eNB_process_security(
const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP,
security_capabilities_t *security_capabilities_pP
) {
boolean_t changed = FALSE;
rrc_eNB_process_security(const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP,
security_capabilities_t *security_capabilities_pP) {
bool changed = false;
LTE_CipheringAlgorithm_r12_t cipheringAlgorithm;
e_LTE_SecurityAlgorithmConfig__integrityProtAlgorithm integrityProtAlgorithm;
/* Save security parameters */
@@ -428,14 +426,14 @@ rrc_eNB_process_security(
if (ue_context_pP->ue_context.ciphering_algorithm != cipheringAlgorithm) {
ue_context_pP->ue_context.ciphering_algorithm = cipheringAlgorithm;
changed = TRUE;
changed = true;
}
integrityProtAlgorithm = rrc_eNB_select_integrity (ue_context_pP->ue_context.security_capabilities.integrity_algorithms);
if (ue_context_pP->ue_context.integrity_algorithm != integrityProtAlgorithm) {
ue_context_pP->ue_context.integrity_algorithm = integrityProtAlgorithm;
changed = TRUE;
changed = true;
}
LOG_I (RRC, "[eNB %d][UE %x] Selected security algorithms (%p): %lx, %x, %s\n",
@@ -532,7 +530,7 @@ rrc_pdcp_config_security(
pdcp_p,
DCCH,
DCCH+2,
(send_security_mode_command == TRUE) ?
(send_security_mode_command == true) ?
0 | (ue_context_pP->ue_context.integrity_algorithm << 4) :
(ue_context_pP->ue_context.ciphering_algorithm ) |
(ue_context_pP->ue_context.integrity_algorithm << 4),
@@ -960,12 +958,12 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
ue_context_p,
S1AP_INITIAL_CONTEXT_SETUP_REQ(msg_p).security_key);
{
uint8_t send_security_mode_command = TRUE;
uint8_t send_security_mode_command = true;
#ifndef EXMIMO_IOT
if ((ue_context_p->ue_context.ciphering_algorithm == SecurityAlgorithmConfig__cipheringAlgorithm_eea0)
&& (ue_context_p->ue_context.integrity_algorithm == INTEGRITY_ALGORITHM_NONE)) {
send_security_mode_command = FALSE;
send_security_mode_command = false;
}
#endif
@@ -978,7 +976,7 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
rrc_eNB_generate_SecurityModeCommand (
&ctxt,
ue_context_p);
send_security_mode_command = FALSE;
send_security_mode_command = false;
// apply ciphering after RRC security command mode
rrc_pdcp_config_security(
&ctxt,
@@ -1414,19 +1412,19 @@ int rrc_eNB_process_S1AP_E_RAB_MODIFY_REQ(MessageDef *msg_p, const char *msg_nam
/* Save e RAB information for later */
{
int j;
boolean_t is_treated[S1AP_MAX_E_RAB] = {FALSE};
bool is_treated[S1AP_MAX_E_RAB] = {false};
uint8_t nb_of_failed_e_rabs = 0;
// keep the previous bearer
// the index for the rec
for (i = 0; i < S1AP_E_RAB_MODIFY_REQ (msg_p).nb_e_rabs_tomodify; i++) {
if (is_treated[i] == TRUE) {
if (is_treated[i] == true) {
// already treated
continue;
}
for (j = i+1; j < S1AP_E_RAB_MODIFY_REQ (msg_p).nb_e_rabs_tomodify; j++) {
if (is_treated[j] == FALSE &&
if (is_treated[j] == false &&
S1AP_E_RAB_MODIFY_REQ(msg_p).e_rab_modify_params[j].e_rab_id == S1AP_E_RAB_MODIFY_REQ(msg_p).e_rab_modify_params[i].e_rab_id) {
// handle multiple E-RAB ID
ue_context_p->ue_context.modify_e_rab[j].status = E_RAB_STATUS_NEW;
@@ -1434,12 +1432,12 @@ int rrc_eNB_process_S1AP_E_RAB_MODIFY_REQ(MessageDef *msg_p, const char *msg_nam
ue_context_p->ue_context.modify_e_rab[j].cause = S1AP_CAUSE_RADIO_NETWORK;
ue_context_p->ue_context.modify_e_rab[j].cause_value = 31;//S1ap_CauseRadioNetwork_multiple_E_RAB_ID_instances;
nb_of_failed_e_rabs++;
is_treated[i] = TRUE;
is_treated[j] = TRUE;
is_treated[i] = true;
is_treated[j] = true;
}
}
if (is_treated[i] == TRUE) {
if (is_treated[i] == true) {
// handle multiple E-RAB ID
ue_context_p->ue_context.modify_e_rab[i].status = E_RAB_STATUS_NEW;
ue_context_p->ue_context.modify_e_rab[i].param.e_rab_id = S1AP_E_RAB_MODIFY_REQ(msg_p).e_rab_modify_params[i].e_rab_id;
@@ -1456,7 +1454,7 @@ int rrc_eNB_process_S1AP_E_RAB_MODIFY_REQ(MessageDef *msg_p, const char *msg_nam
ue_context_p->ue_context.modify_e_rab[i].cause = S1AP_CAUSE_NAS;
ue_context_p->ue_context.modify_e_rab[i].cause_value = 3;//S1ap_CauseNas_unspecified;
nb_of_failed_e_rabs++;
is_treated[i] = TRUE;
is_treated[i] = true;
continue;
}
@@ -1474,19 +1472,19 @@ int rrc_eNB_process_S1AP_E_RAB_MODIFY_REQ(MessageDef *msg_p, const char *msg_nam
ue_context_p->ue_context.modify_e_rab[i].param.nas_pdu.buffer = S1AP_E_RAB_MODIFY_REQ(msg_p).e_rab_modify_params[i].nas_pdu.buffer;
ue_context_p->ue_context.modify_e_rab[i].param.sgw_addr = ue_context_p->ue_context.e_rab[j].param.sgw_addr;
ue_context_p->ue_context.modify_e_rab[i].param.gtp_teid = ue_context_p->ue_context.e_rab[j].param.gtp_teid;
is_treated[i] = TRUE;
is_treated[i] = true;
break;
}
}
if (is_treated[i] == FALSE) {
if (is_treated[i] == false) {
// handle Unknown E-RAB ID
ue_context_p->ue_context.modify_e_rab[i].status = E_RAB_STATUS_NEW;
ue_context_p->ue_context.modify_e_rab[i].param.e_rab_id = S1AP_E_RAB_MODIFY_REQ(msg_p).e_rab_modify_params[i].e_rab_id;
ue_context_p->ue_context.modify_e_rab[i].cause = S1AP_CAUSE_RADIO_NETWORK;
ue_context_p->ue_context.modify_e_rab[i].cause_value = 30;//S1ap_CauseRadioNetwork_unknown_E_RAB_ID;
nb_of_failed_e_rabs++;
is_treated[i] = TRUE;
is_treated[i] = true;
}
}
@@ -1824,8 +1822,8 @@ int rrc_eNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance
uint8_t i = 0;
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
if ((UE_PF_PO[CC_id][i].enable_flag == TRUE && UE_PF_PO[CC_id][i].ue_index_value == (uint16_t)(S1AP_PAGING_IND(msg_p).ue_index_value))
|| (UE_PF_PO[CC_id][i].enable_flag != TRUE)) {
if ((UE_PF_PO[CC_id][i].enable_flag == true && UE_PF_PO[CC_id][i].ue_index_value == (uint16_t)(S1AP_PAGING_IND(msg_p).ue_index_value))
|| (UE_PF_PO[CC_id][i].enable_flag != true)) {
/* set T = min(Tc,Tue) */
UE_PF_PO[CC_id][i].T = T;
/* set UE_ID */
@@ -1845,12 +1843,12 @@ int rrc_eNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance
UE_PF_PO[CC_id][i].PO = (frame_type==FDD) ? (4*(i_s&1)+(5*(i_s>>1))) : ((i_s&1)+(5*(i_s>>1)));
}
if (UE_PF_PO[CC_id][i].enable_flag == TRUE) {
if (UE_PF_PO[CC_id][i].enable_flag == true) {
//paging exist UE log
LOG_D(RRC,"[eNB %ld] CC_id %d In S1AP_PAGING_IND: Update exist UE %d, T %d, PF %d, PO %d\n", instance, CC_id, UE_PF_PO[CC_id][i].ue_index_value, T, UE_PF_PO[CC_id][i].PF_min, UE_PF_PO[CC_id][i].PO);
} else {
/* set enable_flag */
UE_PF_PO[CC_id][i].enable_flag = TRUE;
UE_PF_PO[CC_id][i].enable_flag = true;
//paging new UE log
LOG_D(RRC,"[eNB %ld] CC_id %d In S1AP_PAGING_IND: Insert a new UE %d, T %d, PF %d, PO %d\n", instance, CC_id, UE_PF_PO[CC_id][i].ue_index_value, T, UE_PF_PO[CC_id][i].PF_min, UE_PF_PO[CC_id][i].PO);
}
+2 -2
View File
@@ -457,7 +457,7 @@ mac_rrc_data_ind(
const uint8_t *sduP,
const sdu_size_t sdu_lenP,
const uint8_t mbsfn_sync_areaP,
const boolean_t brOption
const bool brOption
);
int8_t
@@ -685,7 +685,7 @@ extern RRC_release_list_t rrc_release_info;
extern pthread_mutex_t lock_ue_freelist;
void remove_UE_from_freelist(module_id_t mod_id, rnti_t rnti);
void put_UE_in_freelist(module_id_t mod_id, rnti_t rnti, boolean_t removeFlag);
void put_UE_in_freelist(module_id_t mod_id, rnti_t rnti, bool removeFlag);
void release_UE_in_freeList(module_id_t mod_id);
/** @}*/
+3 -3
View File
@@ -168,7 +168,7 @@ nr_rrc_data_req(
{
if(sdu_sizeP == 255) {
LOG_D(RRC,"sdu_sizeP == 255");
return FALSE;
return false;
}
MessageDef *message_p;
@@ -204,7 +204,7 @@ nr_rrc_data_req(
if (ctxt_pP->enb_flag && NODE_IS_CU(RC.nrrrc[ctxt_pP->module_id]->node_type))
pdcp_run(ctxt_pP);
return TRUE; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
return true; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
}
uint16_t mac_rrc_nr_data_req(const module_id_t Mod_idP,
@@ -315,7 +315,7 @@ int8_t nr_mac_rrc_data_ind(const module_id_t module_idP,
const rb_id_t srb_idP,
const uint8_t *sduP,
const sdu_size_t sdu_lenP,
const boolean_t brOption) {
const bool brOption) {
if (NODE_IS_DU(RC.nrrrc[module_idP]->node_type)) {
LOG_W(RRC,"[DU %d][RAPROC] Received SDU for CCCH on SRB %ld length %d for UE id %d RNTI %x \n",
+1 -1
View File
@@ -173,7 +173,7 @@ typedef struct UE_RRC_INFO_NR_s {
} __attribute__ ((__packed__)) NR_UE_RRC_INFO;
typedef struct UE_S_TMSI_NR_s {
boolean_t presence;
bool presence;
uint16_t amf_set_id;
uint8_t amf_pointer;
uint32_t fiveg_tmsi;
+22 -25
View File
@@ -174,18 +174,16 @@ int8_t nr_mac_rrc_bwp_switch_req(const module_id_t module_idP,
const int dl_bwp_id,
const int ul_bwp_id);
int8_t nr_mac_rrc_data_ind(
const module_id_t module_idP,
const int CC_id,
const frame_t frameP,
const sub_frame_t sub_frameP,
const int UE_id,
const rnti_t rntiP,
const rb_id_t srb_idP,
const uint8_t *sduP,
const sdu_size_t sdu_lenP,
const boolean_t brOption
);
int8_t nr_mac_rrc_data_ind(const module_id_t module_idP,
const int CC_id,
const frame_t frameP,
const sub_frame_t sub_frameP,
const int UE_id,
const rnti_t rntiP,
const rb_id_t srb_idP,
const uint8_t *sduP,
const sdu_size_t sdu_lenP,
const bool brOption);
int nr_rrc_reconfiguration_req(rrc_gNB_ue_context_t *const ue_context_pP,
protocol_ctxt_t *const ctxt_pP,
@@ -219,16 +217,15 @@ rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt
const LTE_PMCH_InfoList_r9_t * const pmch_InfoList_r9_pP,
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list);
boolean_t nr_rrc_pdcp_config_asn1_req(
const protocol_ctxt_t *const ctxt_pP,
NR_SRB_ToAddModList_t *const srb2add_list,
NR_DRB_ToAddModList_t *const drb2add_list,
NR_DRB_ToReleaseList_t *const drb2release_list,
const uint8_t security_modeP,
uint8_t *const kRRCenc,
uint8_t *const kRRCint,
uint8_t *const kUPenc,
uint8_t *const kUPint
,LTE_PMCH_InfoList_r9_t *pmch_InfoList_r9
,rb_id_t *const defaultDRB,
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list);
bool nr_rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
NR_SRB_ToAddModList_t *const srb2add_list,
NR_DRB_ToAddModList_t *const drb2add_list,
NR_DRB_ToReleaseList_t *const drb2release_list,
const uint8_t security_modeP,
uint8_t *const kRRCenc,
uint8_t *const kRRCint,
uint8_t *const kUPenc,
uint8_t *const kUPint,
LTE_PMCH_InfoList_r9_t *pmch_InfoList_r9,
rb_id_t *const defaultDRB,
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list);
+20 -21
View File
@@ -116,16 +116,16 @@ uint8_t first_rrcreconfiguration = 0;
///---------------------------------------------------------------------------------------------------------------///
///---------------------------------------------------------------------------------------------------------------///
boolean_t DURecvCb( protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_sizeP,
unsigned char *const sdu_buffer_pP,
const pdcp_transmission_mode_t modeP,
const uint32_t *sourceL2Id,
const uint32_t *destinationL2Id) {
bool DURecvCb(protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_sizeP,
unsigned char *const sdu_buffer_pP,
const pdcp_transmission_mode_t modeP,
const uint32_t *sourceL2Id,
const uint32_t *destinationL2Id) {
// The buffer comes from the stack in gtp-u thread, we have a make a separate buffer to enqueue in a inter-thread message queue
mem_block_t *sdu=get_free_mem_block(sdu_buffer_sizeP, __func__);
memcpy(sdu->data, sdu_buffer_pP, sdu_buffer_sizeP);
@@ -917,7 +917,7 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
sdap_config->sdap_HeaderDL = NR_SDAP_Config__sdap_HeaderDL_absent;
sdap_config->sdap_HeaderUL = NR_SDAP_Config__sdap_HeaderUL_absent;
}
sdap_config->defaultDRB = TRUE;
sdap_config->defaultDRB = true;
sdap_config->mappedQoS_FlowsToAdd = calloc(1, sizeof(struct NR_SDAP_Config__mappedQoS_FlowsToAdd));
memset(sdap_config->mappedQoS_FlowsToAdd, 0, sizeof(struct NR_SDAP_Config__mappedQoS_FlowsToAdd));
@@ -1826,7 +1826,7 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
ue_context_pP->ue_context.rnti = ctxt_pP->rnti;
if (AMF_MODE_ENABLED) {
uint8_t send_security_mode_command = FALSE;
uint8_t send_security_mode_command = false;
nr_rrc_pdcp_config_security(
ctxt_pP,
ue_context_pP,
@@ -2113,7 +2113,7 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
}
if (ue_context_p != NULL) {
ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.presence = TRUE;
ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.presence = true;
ue_context_p->ue_context.ng_5G_S_TMSI_Part1 = s_tmsi_part1;
}
}
@@ -2590,7 +2590,7 @@ rrc_gNB_decode_dcch(
fiveg_s_TMSI, fiveg_s_TMSI >> 38, fiveg_s_TMSI >> 38,
(fiveg_s_TMSI >> 32) & 0x3F, (fiveg_s_TMSI >> 32) & 0x3F,
(uint32_t)fiveg_s_TMSI);
if (ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.presence == TRUE) {
if (ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.presence == true) {
ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.amf_set_id = fiveg_s_TMSI >> 38;
ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.amf_pointer = (fiveg_s_TMSI >> 32) & 0x3F;
ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.fiveg_tmsi = (uint32_t)fiveg_s_TMSI;
@@ -3235,7 +3235,6 @@ static int rrc_process_DU_DL(MessageDef *msg_p, const char *msg_name, instance_
LOG_I(F1AP, "Received DL RRC Transfer on srb_id %ld\n", req->srb_id);
// rlc_op_status_t rlc_status;
// boolean_t ret = TRUE;
//LOG_I(F1AP, "PRRCContainer size %lu:", ie->value.choice.RRCContainer.size);
//for (int i = 0; i < ie->value.choice.RRCContainer.size; i++)
@@ -3260,23 +3259,23 @@ static int rrc_process_DU_DL(MessageDef *msg_p, const char *msg_name, instance_
// switch (rlc_status) {
// case RLC_OP_STATUS_OK:
// //LOG_I(F1AP, "Data sending request over RLC succeeded!\n");
// ret=TRUE;
// ret=true;
// break;
// case RLC_OP_STATUS_BAD_PARAMETER:
// LOG_W(F1AP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n");
// ret= FALSE;
// ret= false;
// break;
// case RLC_OP_STATUS_INTERNAL_ERROR:
// LOG_W(F1AP, "Data sending request over RLC failed with 'Internal Error' reason!\n");
// ret= FALSE;
// ret= false;
// break;
// case RLC_OP_STATUS_OUT_OF_RESSOURCES:
// LOG_W(F1AP, "Data sending request over RLC failed with 'Out of Resources' reason!\n");
// ret= FALSE;
// ret= false;
// break;
// default:
// LOG_W(F1AP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status);
// ret= FALSE;
// ret= false;
// break;
// } // switch case
// return ret;
@@ -3940,7 +3939,7 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
gNB_MAC_INST *nrmac=RC.nrmac[ctxt_pP->module_id]; //WHAT A BEAUTIFULL RACE CONDITION !!!
if (fd) {
if (ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.presence == TRUE) {
if (ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.presence == true) {
fprintf(fd,"NR RRC UE rnti %x: S-TMSI %x failure timer %d/8\n",
ue_context_p->ue_id_rnti,
ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.fiveg_tmsi,
+12 -12
View File
@@ -708,7 +708,7 @@ rrc_gNB_process_security(
rrc_gNB_ue_context_t *const ue_context_pP,
ngap_security_capabilities_t *security_capabilities_pP
) {
boolean_t changed = FALSE;
bool changed = false;
NR_CipheringAlgorithm_t cipheringAlgorithm;
e_NR_IntegrityProtAlgorithm integrityProtAlgorithm;
/* Save security parameters */
@@ -726,14 +726,14 @@ rrc_gNB_process_security(
if (ue_context_pP->ue_context.ciphering_algorithm != cipheringAlgorithm) {
ue_context_pP->ue_context.ciphering_algorithm = cipheringAlgorithm;
changed = TRUE;
changed = true;
}
integrityProtAlgorithm = rrc_gNB_select_integrity(ctxt_pP, ue_context_pP->ue_context.security_capabilities.nRintegrity_algorithms);
if (ue_context_pP->ue_context.integrity_algorithm != integrityProtAlgorithm) {
ue_context_pP->ue_context.integrity_algorithm = integrityProtAlgorithm;
changed = TRUE;
changed = true;
}
LOG_I (NR_RRC, "[gNB %d][UE %x] Selected security algorithms (%p): %lx, %x, %s\n",
@@ -1126,17 +1126,17 @@ rrc_gNB_process_NGAP_PDUSESSION_MODIFY_REQ(
ue_context_p->ue_context.gNB_ue_ngap_id = gNB_ue_ngap_id;
{
int j;
boolean_t is_treated[NGAP_MAX_PDUSESSION] = {FALSE};
bool is_treated[NGAP_MAX_PDUSESSION] = {false};
uint8_t nb_of_failed_pdusessions = 0;
for (i = 0; i < nb_pdusessions_tomodify; i++) {
if (is_treated[i] == TRUE) {
if (is_treated[i] == true) {
continue;
}
//Check if same PDU session ID to handle multiple pdu sessions
for (j = i+1; j < nb_pdusessions_tomodify; j++) {
if (is_treated[j] == FALSE &&
if (is_treated[j] == false &&
NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[j].pdusession_id ==
NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].pdusession_id) {
// handle multiple pdu session id
@@ -1147,12 +1147,12 @@ rrc_gNB_process_NGAP_PDUSESSION_MODIFY_REQ(
ue_context_p->ue_context.modify_pdusession[j].cause = NGAP_CAUSE_RADIO_NETWORK;
ue_context_p->ue_context.modify_pdusession[j].cause_value = NGAP_CauseRadioNetwork_multiple_PDU_session_ID_instances;
nb_of_failed_pdusessions++;
is_treated[i] = TRUE;
is_treated[j] = TRUE;
is_treated[i] = true;
is_treated[j] = true;
}
}
// handle multiple pdu session id case
if (is_treated[i] == TRUE) {
if (is_treated[i] == true) {
LOG_D(NR_RRC, "handle multiple pdu session id \n");
ue_context_p->ue_context.modify_pdusession[i].status = PDU_SESSION_STATUS_NEW;
ue_context_p->ue_context.modify_pdusession[i].param.pdusession_id =
@@ -1195,13 +1195,13 @@ rrc_gNB_process_NGAP_PDUSESSION_MODIFY_REQ(
ue_context_p->ue_context.modify_pdusession[i].param.gtp_teid =
ue_context_p->ue_context.pduSession[j].param.gtp_teid;
is_treated[i] = TRUE;
is_treated[i] = true;
break;
}
}
// handle Unknown pdu session ID
if (is_treated[i] == FALSE) {
if (is_treated[i] == false) {
LOG_D(NR_RRC, "handle Unknown pdu session ID \n");
ue_context_p->ue_context.modify_pdusession[i].status = PDU_SESSION_STATUS_NEW;
ue_context_p->ue_context.modify_pdusession[i].param.pdusession_id =
@@ -1209,7 +1209,7 @@ rrc_gNB_process_NGAP_PDUSESSION_MODIFY_REQ(
ue_context_p->ue_context.modify_pdusession[i].cause = NGAP_CAUSE_RADIO_NETWORK;
ue_context_p->ue_context.modify_pdusession[i].cause_value = NGAP_CauseRadioNetwork_unknown_PDU_session_ID;
nb_of_failed_pdusessions++;
is_treated[i] = TRUE;
is_treated[i] = true;
}
}
+1 -1
View File
@@ -181,6 +181,6 @@ rrc_data_req_nr_ue(
TASK_PDCP_UE,
ctxt_pP->instance,
message_p);
return TRUE; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
return true; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
}
+1 -1
View File
@@ -2014,7 +2014,7 @@ nr_rrc_ue_establish_srb2(
int i, cnt;
if( radioBearerConfig->srb3_ToRelease != NULL){
if( *radioBearerConfig->srb3_ToRelease == TRUE){
if( *radioBearerConfig->srb3_ToRelease == true){
//TODO (release the PDCP entity and the srb-Identity of the SRB3.)
}
}
+26 -26
View File
@@ -21,19 +21,19 @@
#include "nr_sdap.h"
boolean_t sdap_data_req(protocol_ctxt_t *ctxt_p,
const srb_flag_t srb_flag,
const rb_id_t rb_id,
const mui_t mui,
const confirm_t confirm,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t pt_mode,
const uint32_t *sourceL2Id,
const uint32_t *destinationL2Id,
const uint8_t qfi,
const boolean_t rqi,
const int pdusession_id) {
bool sdap_data_req(protocol_ctxt_t *ctxt_p,
const srb_flag_t srb_flag,
const rb_id_t rb_id,
const mui_t mui,
const confirm_t confirm,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t pt_mode,
const uint32_t *sourceL2Id,
const uint32_t *destinationL2Id,
const uint8_t qfi,
const bool rqi,
const int pdusession_id) {
nr_sdap_entity_t *sdap_entity;
sdap_entity = nr_sdap_get_entity(ctxt_p->rnti, pdusession_id);
@@ -42,19 +42,19 @@ boolean_t sdap_data_req(protocol_ctxt_t *ctxt_p,
return 0;
}
boolean_t ret = sdap_entity->tx_entity(sdap_entity,
ctxt_p,
srb_flag,
rb_id,
mui,
confirm,
sdu_buffer_size,
sdu_buffer,
pt_mode,
sourceL2Id,
destinationL2Id,
qfi,
rqi);
bool ret = sdap_entity->tx_entity(sdap_entity,
ctxt_p,
srb_flag,
rb_id,
mui,
confirm,
sdu_buffer_size,
sdu_buffer,
pt_mode,
sourceL2Id,
destinationL2Id,
qfi,
rqi);
return ret;
}
+13 -14
View File
@@ -32,20 +32,19 @@
* Downlink - gNB
* Uplink - nrUE
*/
boolean_t sdap_data_req(protocol_ctxt_t *ctxt_p,
const srb_flag_t srb_flag,
const rb_id_t rb_id,
const mui_t mui,
const confirm_t confirm,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t pt_mode,
const uint32_t *sourceL2Id,
const uint32_t *destinationL2Id,
const uint8_t qfi,
const boolean_t rqi,
const int pdusession_id
);
bool sdap_data_req(protocol_ctxt_t *ctxt_p,
const srb_flag_t srb_flag,
const rb_id_t rb_id,
const mui_t mui,
const confirm_t confirm,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t pt_mode,
const uint32_t *sourceL2Id,
const uint32_t *destinationL2Id,
const uint8_t qfi,
const bool rqi,
const int pdusession_id);
/*
* TS 37.324 4.4 Functions
+16 -17
View File
@@ -46,23 +46,22 @@ void nr_pdcp_submit_sdap_ctrl_pdu(int rnti, rb_id_t sdap_ctrl_pdu_drb, nr_sdap_u
return;
}
static boolean_t nr_sdap_tx_entity(nr_sdap_entity_t *entity,
protocol_ctxt_t *ctxt_p,
const srb_flag_t srb_flag,
const rb_id_t rb_id,
const mui_t mui,
const confirm_t confirm,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t pt_mode,
const uint32_t *sourceL2Id,
const uint32_t *destinationL2Id,
const uint8_t qfi,
const boolean_t rqi
) {
static bool nr_sdap_tx_entity(nr_sdap_entity_t *entity,
protocol_ctxt_t *ctxt_p,
const srb_flag_t srb_flag,
const rb_id_t rb_id,
const mui_t mui,
const confirm_t confirm,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t pt_mode,
const uint32_t *sourceL2Id,
const uint32_t *destinationL2Id,
const uint8_t qfi,
const bool rqi) {
/* The offset of the SDAP header, it might be 0 if the has_sdap is not true in the pdcp entity. */
int offset=0;
boolean_t ret=false;
bool ret = false;
/*Hardcode DRB ID given from upper layer (ue/enb_tun_read_thread rb_id), it will change if we have SDAP*/
rb_id_t sdap_drb_id = rb_id;
int pdcp_ent_has_sdap = 0;
@@ -297,7 +296,7 @@ static void nr_sdap_rx_entity(nr_sdap_entity_t *entity,
}
}
void nr_sdap_qfi2drb_map_update(nr_sdap_entity_t *entity, uint8_t qfi, rb_id_t drb, boolean_t hasSdap){
void nr_sdap_qfi2drb_map_update(nr_sdap_entity_t *entity, uint8_t qfi, rb_id_t drb, bool hasSdap) {
if(qfi < SDAP_MAX_QFI &&
qfi > SDAP_MAP_RULE_EMPTY &&
drb > 0 &&
@@ -390,7 +389,7 @@ void nr_sdap_ue_qfi2drb_config(nr_sdap_entity_t *existing_sdap_entity,
nr_sdap_entity_t *new_nr_sdap_entity(int has_sdap,
uint16_t rnti,
int pdusession_id,
boolean_t is_defaultDRB,
bool is_defaultDRB,
uint8_t drb_identity,
NR_QFI_t *mapped_qfi_2_add,
uint8_t mappedQFIs2AddCount)
+17 -18
View File
@@ -64,7 +64,7 @@ typedef struct nr_sdap_ul_hdr_s {
typedef struct qfi2drb_s {
rb_id_t drb_id;
boolean_t hasSdap;
bool hasSdap;
} qfi2drb_t;
void nr_pdcp_submit_sdap_ctrl_pdu(int rnti, rb_id_t sdap_ctrl_pdu_drb, nr_sdap_ul_hdr_t ctrl_pdu);
@@ -75,7 +75,7 @@ typedef struct nr_sdap_entity_s {
int pdusession_id;
qfi2drb_t qfi2drb_table[SDAP_MAX_QFI];
void (*qfi2drb_map_update)(struct nr_sdap_entity_s *entity, uint8_t qfi, rb_id_t drb, boolean_t hasSdap);
void (*qfi2drb_map_update)(struct nr_sdap_entity_s *entity, uint8_t qfi, rb_id_t drb, bool hasSdap);
void (*qfi2drb_map_delete)(struct nr_sdap_entity_s *entity, uint8_t qfi);
rb_id_t (*qfi2drb_map)(struct nr_sdap_entity_s *entity, uint8_t qfi, rb_id_t upper_layer_rb_id);
@@ -84,20 +84,19 @@ typedef struct nr_sdap_entity_s {
void (*sdap_submit_ctrl_pdu)(int rnti, rb_id_t sdap_ctrl_pdu_drb, nr_sdap_ul_hdr_t ctrl_pdu);
boolean_t (*tx_entity)(struct nr_sdap_entity_s *entity,
protocol_ctxt_t *ctxt_p,
const srb_flag_t srb_flag,
const rb_id_t rb_id,
const mui_t mui,
const confirm_t confirm,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t pt_mode,
const uint32_t *sourceL2Id,
const uint32_t *destinationL2Id,
const uint8_t qfi,
const boolean_t rqi
);
bool (*tx_entity)(struct nr_sdap_entity_s *entity,
protocol_ctxt_t *ctxt_p,
const srb_flag_t srb_flag,
const rb_id_t rb_id,
const mui_t mui,
const confirm_t confirm,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t pt_mode,
const uint32_t *sourceL2Id,
const uint32_t *destinationL2Id,
const uint8_t qfi,
const bool rqi);
void (*rx_entity)(struct nr_sdap_entity_s *entity,
rb_id_t pdcp_entity,
@@ -114,7 +113,7 @@ typedef struct nr_sdap_entity_s {
} nr_sdap_entity_t;
/* QFI to DRB Mapping Related Function */
void nr_sdap_qfi2drb_map_update(nr_sdap_entity_t *entity, uint8_t qfi, rb_id_t drb, boolean_t hasSdap);
void nr_sdap_qfi2drb_map_update(nr_sdap_entity_t *entity, uint8_t qfi, rb_id_t drb, bool hasSdap);
/* QFI to DRB Mapping Related Function */
void nr_sdap_qfi2drb_map_del(nr_sdap_entity_t *entity, uint8_t qfi);
@@ -168,7 +167,7 @@ void nr_sdap_ue_qfi2drb_config(nr_sdap_entity_t *existing_sdap_entity,
nr_sdap_entity_t *new_nr_sdap_entity(int has_sdap,
uint16_t rnti,
int pdusession_id,
boolean_t is_defaultDRB,
bool is_defaultDRB,
uint8_t default_DRB,
NR_QFI_t *mapped_qfi_2_add,
uint8_t mappedQFIs2AddCount);

Some files were not shown because too many files have changed in this diff Show More