Commit 931cf0a8 authored by francescomani's avatar francescomani

more review fixes

parent c9b043eb
......@@ -618,7 +618,7 @@ void init_fep_thread(RU_t *ru,
void kill_fep_thread(RU_t *ru)
{
RU_proc_t *proc = &ru->proc;
if (proc->pthread_fep[0] == 0)
if (proc->pthread_fep == 0)
return;
pthread_mutex_lock( &proc->mutex_fep[0] );
proc->instance_cnt_fep[0] = 0;
......
......@@ -213,7 +213,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
msi_pos++;
mbms_mch_i=0;
if(subframeP==0){
if (subframeP==0) {
x=0;
mbms_mch_i=0;
}
......@@ -459,7 +459,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
module_idP, CC_id, frameP, subframeP, i, j,
cc->mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0],
msi_pos);
if(subframeP==1){
if (subframeP==1) {
x=0;
mbms_mch_i=0;
LOG_D(MAC,"MSP, frameP %d subframeP %d msi_pos(%d) mbms_mch_i %d\n",frameP, subframeP, msi_pos,mbms_mch_i);
......@@ -708,7 +708,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
uint16_t msi_control_element[29], *msi_ptr;
// MSI buffer pointer
char *buffer_pointer=NULL;
if (msi_flag == 1 && cc->mbms_SessionList[mbms_mch_i]) {
if (msi_flag == 1 && cc->mbms_SessionList) {
// Create MSI here
msi_ptr = &msi_control_element[0];
......@@ -868,7 +868,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
// there is MTCHs, loop if there are more than 1
// BAd race condition: all this struct is filled by another thread, no mutex or any code to make it coherent
if (mtch_flag == 1 && cc->mbms_SessionList[0] && cc->mbms_SessionList[0]->list.array[0]) {
if (mtch_flag == 1 && cc->mbms_SessionList && cc->mbms_SessionList[0] && cc->mbms_SessionList[0]->list.array[0]) {
// Calculate TBS
// get MTCH data from RLC (like for DTCH)
LOG_D(MAC, "[eNB %d] CC_id %d Frame %d subframeP %d: Schedule MTCH (area %d, sfAlloc %d)\n", module_idP, CC_id, frameP, subframeP, i, j);
......
......@@ -680,27 +680,8 @@ uint16_t get_NCS(uint8_t index, uint16_t format0, uint8_t restricted_set_config)
}
}
//38.211 Table 6.3.3.2-1
// delta_f_RA_PRACH = 1 in the first 3 lines needs to be converted to 1.25
int16_t table_6_3_3_2_1[16][5] = {
//Length_RA, delta_f_RA_PRACH, delta_f_PUSCH, N_RA_RB, kbar
{ 839, 1, 15, 6, 7},
{ 839, 1, 30, 3, 1},
{ 839, 1, 60, 2, 133},
{ 839, 5, 15, 24, 12},
{ 839, 5, 30, 12, 10},
{ 839, 5, 60, 6, 7},
{ 139, 15, 15, 12, 2},
{ 139, 15, 30, 6, 2},
{ 139, 15, 60, 3, 2},
{ 139, 30, 15, 24, 2},
{ 139, 30, 30, 12, 2},
{ 139, 30, 60, 6, 2},
{ 139, 60, 60, 12, 2},
{ 139, 60, 120, 6, 2},
{ 139, 120, 60, 24, 2},
{ 139, 120, 120, 12, 2}
};
//from 38.211 Table 6.3.3.2-1
int16_t N_RA_RB[16] = {6, 3, 2, 24, 12, 6, 12, 6, 3, 24, 12, 6, 12, 6, 24, 12};
/* Function to get number of RBs required for prach occasion based on
* 38.211 Table 6.3.3.2-1 */
......@@ -742,7 +723,7 @@ int16_t get_N_RA_RB (int delta_f_RA_PRACH,int delta_f_PUSCH) {
break;
default : index = 10;/*30khz prach scs and 30khz pusch scs*/
}
return table_6_3_3_2_1[index][3];
return N_RA_RB[index];
}
// Table 6.3.3.2-2: Random access configurations for FR1 and paired spectrum/supplementary uplink
// the column 5, (SFN_nbr is a bitmap where we set bit to '1' in the position of the subframe where the RACH can be sent.
......
......@@ -1464,7 +1464,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
//memset((*sib2)->radioResourceConfigCommon.ext4->bcch_Config_v1310, 0, sizeof(BCCH_Config_v1310_t));
//(*sib2)->radioResourceConfigCommon.ext4->bcch_Config_v1310->modificationPeriodCoeff_v1310 = BCCH_Config_v1310__modificationPeriodCoeff_v1310_n64;
if (configuration->pcch_config_v1310[CC_id]) {
if (configuration->pcch_config_v1310) {
(*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310 = CALLOC(1, sizeof(LTE_PCCH_Config_v1310_t));
(*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310->paging_narrowBands_r13 = configuration->paging_narrowbands_r13[CC_id];
(*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310->mpdcch_NumRepetition_Paging_r13 = configuration->mpdcch_numrepetition_paging_r13[CC_id];
......
......@@ -1963,6 +1963,7 @@ rrc_ue_process_rrcConnectionReconfiguration(
sizeof(msg));
nsa_sendmsg_to_nrue(&msg, sizeof(msg), RRC_CONFIG_COMPLETE_REQ);
free(msg.buffer);
LOG_A(RRC, "Sent RRC_CONFIG_COMPLETE_REQ to the NR UE\n");
}
......
......@@ -3244,69 +3244,6 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
quantityConfig = NULL;
}
//-----------------------------------------------------------------------------
int
rrc_eNB_generate_RRCConnectionReconfiguration_SCell(
const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP,
uint32_t dl_CarrierFreq_r10
)
//-----------------------------------------------------------------------------
{
uint8_t size;
uint8_t buffer[100];
uint8_t sCellIndexToAdd = 0; //one SCell so far
// uint8_t sCellIndexToAdd;
// sCellIndexToAdd = rrc_find_free_SCell_index(enb_mod_idP, ue_mod_idP, 1);
// if (RC.rrc[enb_mod_idP]->sCell_config[ue_mod_idP][sCellIndexToAdd] ) {
if (&ue_context_pP->ue_context.sCell_config[sCellIndexToAdd] != NULL) {
ue_context_pP->ue_context.sCell_config[sCellIndexToAdd].cellIdentification_r10->dl_CarrierFreq_r10 = dl_CarrierFreq_r10;
} else {
LOG_E(RRC,"Scell not configured!\n");
return(-1);
}
size = do_RRCConnectionReconfiguration(ctxt_pP,
buffer,
sizeof(buffer),
rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id),//Transaction_id,
(LTE_SRB_ToAddModList_t *)NULL,
(LTE_DRB_ToAddModList_t *)NULL,
(LTE_DRB_ToReleaseList_t *)NULL,
(struct LTE_SPS_Config *)NULL,
(struct LTE_PhysicalConfigDedicated *)NULL,
(LTE_MeasObjectToAddModList_t *)NULL,
(LTE_ReportConfigToAddModList_t *)NULL,
(LTE_QuantityConfig_t *)NULL,
(LTE_MeasIdToAddModList_t *)NULL,
(LTE_MAC_MainConfig_t *)NULL,
(LTE_MeasGapConfig_t *)NULL,
(LTE_MobilityControlInfo_t *)NULL,
(LTE_SecurityConfigHO_t *)NULL,
(struct LTE_MeasConfig__speedStatePars *)NULL,
(LTE_RSRP_Range_t *)NULL,
(LTE_C_RNTI_t *)NULL,
(struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *)NULL,
(LTE_SL_CommConfig_r12_t *)NULL,
(LTE_SL_DiscConfig_r12_t *)NULL,
ue_context_pP->ue_context.sCell_config
);
LOG_I(RRC,"[eNB %d] Frame %d, Logical Channel DL-DCCH, Generate LTE_RRCConnectionReconfiguration (bytes %d, UE id %x)\n",
ctxt_pP->module_id,ctxt_pP->frame, size, ue_context_pP->ue_context.rnti);
rrc_data_req(
ctxt_pP,
DCCH,
rrc_eNB_mui++,
SDU_CONFIRM_NO,
size,
buffer,
PDCP_TRANSMISSION_MODE_CONTROL);
return(0);
}
//-----------------------------------------------------------------------------
/**
* @fn :encode_CG_ConfigInfo
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment