Code format improvements in differences for develop

This commit is contained in:
rmagueta
2021-05-12 19:29:10 +01:00
parent ee6b77023f
commit 0ef6ef2b28
52 changed files with 225 additions and 279 deletions
+1 -2
View File
@@ -318,8 +318,7 @@ mac_rrc_data_ind(
sduP,
sdu_lenP,
NULL,
0
);
0);
return(0);
}
+2 -5
View File
@@ -44,10 +44,7 @@
#include "NR_MIB.h"
#include "NR_BCCH-BCH-Message.h"
#include "rrc_gNB_UE_context.h"
#include <openair2/RRC/NR/MESSAGES/asn1_msg.h>
#include "RRC/NR/MESSAGES/asn1_msg.h"
#include "openair2/RRC/NR/MESSAGES/asn1_msg.h"
extern RAN_CONTEXT_t RC;
@@ -364,4 +361,4 @@ int8_t nr_mac_rrc_data_ind(const module_id_t module_idP,
}
return 0;
}
}
+1 -4
View File
@@ -1214,7 +1214,6 @@ void fill_initial_cellGroupConfig(rnti_t rnti,
//}
rlc_BearerConfig->rlc_Config = rlc_Config;
//if (0) {
logicalChannelConfig = calloc(1, sizeof(NR_LogicalChannelConfig_t));
logicalChannelConfig->ul_SpecificParameters = calloc(1, sizeof(*logicalChannelConfig->ul_SpecificParameters));
@@ -1432,7 +1431,6 @@ uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP,
LOG_D(NR_RRC,"RRCSetup Encoded %zd bits (%zd bytes)\n",
enc_rval.encoded,(enc_rval.encoded+7)/8);
return((enc_rval.encoded+7)/8);
}
uint8_t do_NR_SecurityModeCommand(
@@ -1636,8 +1634,7 @@ int16_t do_RRCReconfiguration(
NR_SecurityConfig_t *security_config,
NR_SDAP_Config_t *sdap_config,
NR_MeasConfig_t *meas_config,
struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList
*dedicatedNAS_MessageList,
struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList,
NR_MAC_CellGroupConfig_t *mac_CellGroupConfig,
NR_CellGroupConfig_t *cellGroupConfig)
//------------------------------------------------------------------------------
+5 -4
View File
@@ -102,8 +102,9 @@ void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, NR_CellGr
uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP,
uint8_t *const buffer,
const uint8_t transaction_id,
OCTET_STRING_t *masterCellGroup_from_DU,
NR_ServingCellConfigCommon_t *scc);
OCTET_STRING_t *masterCellGroup_from_DU,
NR_ServingCellConfigCommon_t *scc);
uint8_t do_NR_SecurityModeCommand(
const protocol_ctxt_t *const ctxt_pP,
uint8_t *const buffer,
@@ -117,6 +118,7 @@ uint8_t do_NR_SA_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
uint8_t do_NR_RRCRelease(uint8_t *buffer,
uint8_t Transaction_id);
int16_t do_RRCReconfiguration(
const protocol_ctxt_t *const ctxt_pP,
uint8_t *buffer,
@@ -127,8 +129,7 @@ int16_t do_RRCReconfiguration(
NR_SecurityConfig_t *security_config,
NR_SDAP_Config_t *sdap_config,
NR_MeasConfig_t *meas_config,
struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList
*dedicatedNAS_MessageList,
struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList,
NR_MAC_CellGroupConfig_t *mac_CellGroupConfig,
NR_CellGroupConfig_t *cellGroupConfig);
+1 -1
View File
@@ -186,7 +186,7 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
const uint8_t *buffer,
int buffer_length,
OCTET_STRING_t *du_to_cu_rrc_container,
const int CC_id);
const int CC_id);
void
rrc_gNB_generate_dedicatedRRCReconfiguration_release(
+6 -6
View File
@@ -801,8 +801,8 @@ rrc_gNB_generate_defaultRRCReconfiguration(
memset(buffer, 0, RRC_BUF_SIZE);
size = do_RRCReconfiguration(ctxt_pP, buffer,
xid,
NULL,//*SRB_configList2,
NULL,//*DRB_configList,
NULL, //*SRB_configList2,
NULL, //*DRB_configList,
NULL,
NULL,
NULL,
@@ -1736,7 +1736,7 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
const uint8_t *buffer,
int buffer_length,
OCTET_STRING_t *du_to_cu_rrc_container,
OCTET_STRING_t *du_to_cu_rrc_container,
const int CC_id)
{
module_id_t Idx;
@@ -1861,9 +1861,9 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
LOG_E(RRC, "%s:%d:%s: rrc_gNB_get_next_free_ue_context returned NULL\n", __FILE__, __LINE__, __FUNCTION__);
}
if (ue_context_p != NULL) {
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;
if (ue_context_p != NULL) {
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;
}
}
} else {
-2
View File
@@ -490,7 +490,6 @@ rrc_gNB_send_NGAP_NAS_FIRST_REQ(
itti_send_msg_to_task (TASK_NGAP, ctxt_pP->instance, message_p);
}
//------------------------------------------------------------------------------
int
rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ(
@@ -736,7 +735,6 @@ rrc_gNB_process_NGAP_DOWNLINK_NAS(
struct rrc_gNB_ue_context_s *ue_context_p = NULL;
protocol_ctxt_t ctxt;
memset(&ctxt, 0, sizeof(protocol_ctxt_t));
ue_initial_id = NGAP_DOWNLINK_NAS (msg_p).ue_initial_id;
gNB_ue_ngap_id = NGAP_DOWNLINK_NAS (msg_p).gNB_ue_ngap_id;
ue_context_p = rrc_gNB_get_ue_context_from_ngap_ids(instance, ue_initial_id, gNB_ue_ngap_id);
+1 -1
View File
@@ -133,7 +133,7 @@ int8_t nr_mac_rrc_data_req_ue(const module_id_t Mod_idP,
memcpy(buffer_pP, (uint8_t*)NR_UE_rrc_inst[Mod_idP].Srb0[gNB_id].Tx_buffer.Payload, NR_UE_rrc_inst[Mod_idP].Srb0[gNB_id].Tx_buffer.payload_size);
for(int i = 0; i<NR_UE_rrc_inst[Mod_idP].Srb0[gNB_id].Tx_buffer.payload_size; i++) {
//LOG_I(NR_RRC,"(%i): %i\n", i, buffer_pP[i]);
printf("%02x ",buffer_pP[i]);
printf("%02x ",buffer_pP[i]);
}
printf("\n");
return NR_UE_rrc_inst[Mod_idP].Srb0[gNB_id].Tx_buffer.payload_size;
+17 -18
View File
@@ -572,12 +572,12 @@ int8_t nr_rrc_ue_decode_NR_BCCH_BCH_Message(
return -1;
}
else {
// link to rrc instance
// link to rrc instance
SEQUENCE_free( &asn_DEF_NR_MIB, (void *)NR_UE_rrc_inst[module_id].mib, 1 );
NR_UE_rrc_inst[module_id].mib = bcch_message->message.choice.mib;
//memcpy( (void *)mib,
// (void *)&bcch_message->message.choice.mib,
// sizeof(NR_MIB_t) );
//memcpy( (void *)mib,
// (void *)&bcch_message->message.choice.mib,
// sizeof(NR_MIB_t) );
nr_rrc_mac_config_req_ue( 0, 0, 0, NR_UE_rrc_inst[module_id].mib, NULL, NULL, NULL);
}
@@ -585,7 +585,6 @@ int8_t nr_rrc_ue_decode_NR_BCCH_BCH_Message(
return 0;
}
const char siWindowLength[10][5] = {"5s", "10s", "20s", "40s", "80s", "160s", "320s", "640s", "1280s","ERR"};// {"1ms","2ms","5ms","10ms","15ms","20ms","40ms","80ms","ERR"};
const short siWindowLength_int[9] = {5,10,20,40,80,160,320,640,1280};//{1,2,5,10,15,20,40,80};
@@ -1177,7 +1176,7 @@ int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(
if(sib1 != NULL){
SEQUENCE_free(&asn_DEF_NR_SIB1, (void *)sib1, 1 );
}
NR_UE_rrc_inst[module_id].Info[gNB_index].SIStatus|=1;
NR_UE_rrc_inst[module_id].Info[gNB_index].SIStatus|=1;
sib1 = bcch_message->message.choice.c1->choice.systemInformationBlockType1;
if (*(int64_t*)sib1 != 1) {
NR_UE_rrc_inst[module_id].sib1[gNB_index] = sib1;
@@ -1186,21 +1185,21 @@ int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(
}
LOG_I(NR_RRC, "SIB1 decoded\n");
/// dump_SIB1();
/// dump_SIB1();
// FIXME: improve condition for the RA trigger
// Check for on-demand not broadcasted SI
check_requested_SI_List(module_id, NR_UE_rrc_inst[module_id].requested_SI_List, *sib1);
if( nr_rrc_get_state(module_id) <= RRC_STATE_IDLE_NR ) {
NR_UE_rrc_inst[module_id].ra_trigger = INITIAL_ACCESS_FROM_RRC_IDLE;
// TODO: remove flag after full RA procedures implemented
// get_softmodem_params()->do_ra = 1;
LOG_I(PHY,"Setting state to NR_RRC_SI_RECEIVED\n");
nr_rrc_set_state (module_id, NR_RRC_SI_RECEIVED);
// get_softmodem_params()->do_ra = 1;
LOG_I(PHY,"Setting state to NR_RRC_SI_RECEIVED\n");
nr_rrc_set_state (module_id, NR_RRC_SI_RECEIVED);
}
// take ServingCellConfigCommon and configure L1/L2
NR_UE_rrc_inst[module_id].servingCellConfigCommonSIB = sib1->servingCellConfigCommon;
nr_rrc_mac_config_req_ue(module_id,0,0,NULL,sib1->servingCellConfigCommon,NULL,NULL);
nr_rrc_ue_generate_ra_msg(module_id,gNB_index);
// take ServingCellConfigCommon and configure L1/L2
NR_UE_rrc_inst[module_id].servingCellConfigCommonSIB = sib1->servingCellConfigCommon;
nr_rrc_mac_config_req_ue(module_id,0,0,NULL,sib1->servingCellConfigCommon,NULL,NULL);
nr_rrc_ue_generate_ra_msg(module_id,gNB_index);
} else {
LOG_E(NR_RRC, "SIB1 not decoded\n");
}
@@ -1265,7 +1264,6 @@ nr_rrc_ue_process_masterCellGroup(
//TODO (resume all suspended radio bearers and resume SCG transmission for all radio bearers, if suspended)
// NSA procedures
}
if( cellGroupConfig->rlc_BearerToReleaseList != NULL){
//TODO (perform RLC bearer release as specified in 5.3.5.5.3)
@@ -1285,14 +1283,14 @@ nr_rrc_ue_process_masterCellGroup(
if( cellGroupConfig->spCellConfig != NULL){
if (NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config &&
NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->spCellConfig) {
NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->spCellConfig) {
memcpy(NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->spCellConfig,cellGroupConfig->spCellConfig,
sizeof(struct NR_SpCellConfig));
} else {
if (NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config)
NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->spCellConfig = cellGroupConfig->spCellConfig;
NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->spCellConfig = cellGroupConfig->spCellConfig;
else
NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config = cellGroupConfig;
NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config = cellGroupConfig;
}
LOG_I(RRC,"Sending CellGroupConfig to MAC\n");
nr_rrc_mac_config_req_ue(ctxt_pP->module_id,0,0,NULL,NULL,cellGroupConfig,NULL);
@@ -1354,6 +1352,7 @@ static void rrc_ue_generate_RRCSetupComplete(
for (int i=0;i<size;i++) printf("%02x ",buffer[i]);
printf("\n");
// ctxt_pP_local.rnti = ctxt_pP->rnti;
rrc_data_req_ue(
ctxt_pP,