Commit 319372b6 authored by Ahmed.Elias's avatar Ahmed.Elias
Browse files

passin BR paraemeter to rrc

parent 6753a7af
......@@ -217,6 +217,9 @@ typedef struct protocol_ctxt_s {
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 configured; /*!< \brief flag indicating whether the instance is configured or not */
#ifdef Rel14
boolean_t brOption;
#endif
} protocol_ctxt_t;
// warning time hardcoded
#define PROTOCOL_CTXT_TIME_MILLI_SECONDS(CtXt_h) ((CtXt_h)->frame*10+(CtXt_h)->subframe)
......
......@@ -417,7 +417,10 @@ void config_sib2(int Mod_idP,
void config_dedicated(int Mod_idP,
int CC_idP,
uint16_t rnti,
struct PhysicalConfigDedicated *physicalConfigDedicated) {
struct PhysicalConfigDedicated *physicalConfigDedicated)
{
int UE_id = find_UE_id(Mod_idP, rnti);
eNB->UE_list.UE_template[CC_idP][UE_id].physicalConfigDedicated = physicalConfigDedicated;
}
......
......@@ -756,7 +756,7 @@ typedef struct {
#ifdef Rel14
uint8_t rach_resource_type;
struct PhysicalConfigDedicated *physicalConfigDedicated;
#endif
} UE_TEMPLATE;
......
This diff is collapsed.
......@@ -455,7 +455,11 @@ ue_send_sdu(
rx_lengths[i],
ENB_FLAG_NO,
eNB_index,
0);
0
#ifdef Rel14
,0
#endif
);
} else if ((rx_lcids[i] == DCCH) || (rx_lcids[i] == DCCH1)) {
LOG_D(MAC,"[UE %d] Frame %d : DLSCH -> DL-DCCH%d, RRC message (eNB %d, %d bytes)\n", module_idP, frameP, rx_lcids[i],eNB_index,rx_lengths[i]);
......@@ -520,7 +524,11 @@ void ue_decode_si(module_id_t module_idP,int CC_id,frame_t frameP, uint8_t eNB_i
len,
ENB_FLAG_NO,
eNB_index,
0);
0
#ifdef Rel14
,0
#endif
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_OUT);
stop_meas(&UE_mac_inst[module_idP].rx_si);
if (opt_enabled == 1) {
......@@ -556,7 +564,11 @@ void ue_decode_p(module_id_t module_idP,int CC_id,frame_t frameP, uint8_t eNB_in
len,
ENB_FLAG_NO,
eNB_index,
0);
0
#ifdef Rel14
,0
#endif
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_PCCH, VCD_FUNCTION_OUT);
stop_meas(&UE_mac_inst[module_idP].rx_p);
if (opt_enabled == 1) {
......@@ -659,7 +671,11 @@ void ue_send_mch_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frameP, uint
frameP,0, // unknown subframe
M_RNTI,
MCCH,
payload_ptr, rx_lengths[i], 0, eNB_index, sync_area);
payload_ptr, rx_lengths[i], 0, eNB_index, sync_area
#ifdef Rel14
,0
#endif
);
} else if (rx_lcids[i] == MTCH) {
if (UE_mac_inst[module_idP].msi_status==1) {
LOG_I(MAC,"[UE %d] Frame %d : MCH->MTCH for sync area %d (eNB %d, %d bytes)\n",module_idP,frameP, sync_area, eNB_index, rx_lengths[i]);
......
......@@ -107,7 +107,7 @@ mac_rrc_data_req(
}
//------------------------------------------------------------------------------
int8_t
/*int8_t
mac_rrc_data_ind(
const module_id_t module_idP,
const int CC_idP,
......@@ -135,7 +135,7 @@ mac_rrc_data_ind(
eNB_indexP,
mbsfn_sync_area)
);
}
}*/
//------------------------------------------------------------------------------
void
......
......@@ -46,7 +46,7 @@ mac_rrc_data_req(
const uint8_t mbsfn_sync_areaP
);
int8_t
/*int8_t
mac_rrc_data_ind(
const module_id_t module_idP,
const int CC_idP,
......@@ -59,7 +59,7 @@ mac_rrc_data_ind(
const eNB_flag_t eNB_flagP,
const mac_enb_index_t eNB_indexP,
const uint8_t mbsfn_sync_area
);
);*/
void mac_lite_sync_ind(
const module_id_t module_idP,
......
......@@ -382,6 +382,9 @@ mac_rrc_data_ind(
const eNB_flag_t eNB_flagP,
const mac_enb_index_t eNB_indexP,
const uint8_t mbsfn_sync_areaP
#ifdef Rel14
, const boolean_t brOption
#endif
)
//--------------------------------------------------------------------------
{
......@@ -396,6 +399,9 @@ mac_rrc_data_ind(
int si_window;
*/
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, eNB_flagP, rntiP, frameP, sub_frameP,eNB_indexP);
#ifdef Rel14
ctxt.brOption = brOption;
#endif
if(eNB_flagP == ENB_FLAG_NO) {
if(srb_idP == BCCH) {
......
......@@ -1917,6 +1917,7 @@ do_RRCConnectionReconfigurationComplete(
return((enc_rval.encoded+7)/8);
}
#ifdef Rel14
uint8_t
do_RRCConnectionSetup_BR(
const protocol_ctxt_t* const ctxt_pP,
......@@ -2245,7 +2246,7 @@ do_RRCConnectionSetup_BR(
physicalConfigDedicated2->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11 = calloc(1, sizeof(EPDCCH_SetConfigToAddModList_r11_t));
// memset(physicalConfigDedicated2->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11, 0, sizeof())
EPDCCH_SetConfig_r11_t *epdcch_setconfig_r11 = calloc(0, sizeof(EPDCCH_SetConfig_r11_t));
EPDCCH_SetConfig_r11_t *epdcch_setconfig_r11 = calloc(1, sizeof(EPDCCH_SetConfig_r11_t));
epdcch_setconfig_r11->setConfigId_r11 = 0;
epdcch_setconfig_r11->transmissionType_r11 = EPDCCH_SetConfig_r11__transmissionType_r11_localised;
epdcch_setconfig_r11->resourceBlockAssignment_r11.numberPRB_Pairs_r11 = EPDCCH_SetConfig_r11__resourceBlockAssignment_r11__numberPRB_Pairs_r11_n2;
......@@ -2258,7 +2259,10 @@ do_RRCConnectionSetup_BR(
epdcch_setconfig_r11->dmrs_ScramblingSequenceInt_r11 = 0;
epdcch_setconfig_r11->pucch_ResourceStartOffset_r11 = 0;
epdcch_setconfig_r11->re_MappingQCL_ConfigId_r11 = NULL;
epdcch_setconfig_r11->ext2 = calloc(1, sizeof(struct EPDCCH_SetConfig_r11_ext2));
epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310 = NULL;
epdcch_setconfig_r11->ext2->mpdcch_config_r13 = calloc(1, sizeof(struct EPDCCH_SetConfig_r11_ext2_mpdcch_config_r13));
epdcch_setconfig_r11->ext2->mpdcch_config_r13->present = EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13_PR_setup;
epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.csi_NumRepetitionCE_r13 = EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__csi_NumRepetitionCE_r13_sf1;
epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_pdsch_HoppingConfig_r13 = EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__mpdcch_pdsch_HoppingConfig_r13_off;
......@@ -2352,6 +2356,7 @@ do_RRCConnectionSetup_BR(
return((enc_rval.encoded+7)/8);
}
#endif
//------------------------------------------------------------------------------
......
......@@ -162,6 +162,19 @@ do_RRCConnectionSetup(
SRB_ToAddModList_t** SRB_configList,
struct PhysicalConfigDedicated** physicalConfigDedicated
);
#ifdef Rel14
uint8_t
do_RRCConnectionSetup_BR(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP,
int CC_id,
uint8_t* const buffer,
const uint8_t transmission_mode,
const uint8_t Transaction_id,
SRB_ToAddModList_t** SRB_configList,
struct PhysicalConfigDedicated** physicalConfigDedicated
);
#endif
/**
\brief Generate an RRCConnectionReconfiguration DL-DCCH-Message (eNB). This routine configures SRBToAddMod (SRB2) and one DRBToAddMod
......
......@@ -314,6 +314,9 @@ mac_rrc_data_ind(
const eNB_flag_t eNB_flagP,
const mac_enb_index_t eNB_indexP,
const uint8_t mbsfn_sync_areaP
#ifdef Rel14
, const boolean_t brOption
#endif
);
void mac_sync_ind( module_id_t Mod_instP, uint8_t status);
......
......@@ -3784,8 +3784,9 @@ rrc_eNB_generate_RRCConnectionSetup(
)
//-----------------------------------------------------------------------------
{
bool is_mtc = false;
#ifdef Rel14
boolean_t is_mtc = ctxt_pP->brOption;
#endif
LogicalChannelConfig_t *SRB1_logicalChannelConfig; //,*SRB2_logicalChannelConfig;
SRB_ToAddModList_t **SRB_configList;
SRB_ToAddMod_t *SRB1_config;
......@@ -3795,6 +3796,7 @@ rrc_eNB_generate_RRCConnectionSetup(
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
SRB_configList = &ue_context_pP->ue_context.SRB_configList;
#ifdef Rel14
if (is_mtc) {
do_RRCConnectionSetup_BR(ctxt_pP,
ue_context_pP,
......@@ -3804,7 +3806,9 @@ rrc_eNB_generate_RRCConnectionSetup(
rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id),
SRB_configList,
&ue_context_pP->ue_context.physicalConfigDedicated);
} else {
} else
#endif
{
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size =
do_RRCConnectionSetup(ctxt_pP,
ue_context_pP,
......
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