Commit 87ba6a67 authored by Swetank Srivastava's avatar Swetank Srivastava Committed by Vijay C

proxy changes pushed

parent 367c4a03
...@@ -3375,6 +3375,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP, ...@@ -3375,6 +3375,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
if(ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority == SCH_UL_FIRST) { if(ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority == SCH_UL_FIRST) {
UE_template->scheduled_ul_bytes += get_TBS_UL(UE_template->mcs_UL[harq_pid],rb_table[rb_table_index]); UE_template->scheduled_ul_bytes += get_TBS_UL(UE_template->mcs_UL[harq_pid],rb_table[rb_table_index]);
UE_template->ul_SR = 0; UE_template->ul_SR = 0;
LOG_D(MAC, "fxn:%s ul_SR=0 for ue:%d\n", __FUNCTION__, rnti );
} }
if((ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority == SCH_UL_INACTIVE) && (ULSCH_first_end == 0)) { if((ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority == SCH_UL_INACTIVE) && (ULSCH_first_end == 0)) {
......
...@@ -5036,6 +5036,7 @@ SR_indication(module_id_t mod_idP, ...@@ -5036,6 +5036,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_SR = 1;
LOG_D(MAC, "fxn:%s ul_SR=1 for ue:%d\n", __FUNCTION__, rntiP );
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, 1);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SR_INDICATION, 0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SR_INDICATION, 0);
......
...@@ -1364,6 +1364,7 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP, ...@@ -1364,6 +1364,7 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP,
cc[CC_id].vrb_map_UL[5] = 1; cc[CC_id].vrb_map_UL[5] = 1;
cc[CC_id].vrb_map_UL[6] = 1; cc[CC_id].vrb_map_UL[6] = 1;
UE_template->ul_SR = 0; UE_template->ul_SR = 0;
LOG_D(MAC, "fxn:%s ul_SR=0 for ue:%d\n", __FUNCTION__, rnti);
status = mac_eNB_get_rrc_status(module_idP,rnti); status = mac_eNB_get_rrc_status(module_idP,rnti);
cqi_req = 0; cqi_req = 0;
/* Power control: compute the expected ULSCH RX snr (for the stats) */ /* Power control: compute the expected ULSCH RX snr (for the stats) */
...@@ -2011,6 +2012,7 @@ schedule_ulsch_rnti(module_id_t module_idP, ...@@ -2011,6 +2012,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
/* Reset the scheduling request */ /* Reset the scheduling request */
UE_template_ptr->ul_SR = 0; UE_template_ptr->ul_SR = 0;
LOG_D(MAC, "fxn:%s ul_SR=0 for ue:%d\n", __FUNCTION__, rnti);
const uint8_t status = mac_eNB_get_rrc_status(module_idP, rnti); const uint8_t status = mac_eNB_get_rrc_status(module_idP, rnti);
/* Power control */ /* Power control */
...@@ -2577,7 +2579,8 @@ schedule_ulsch_ss(module_id_t module_idP, ...@@ -2577,7 +2579,8 @@ schedule_ulsch_ss(module_id_t module_idP,
} }
/* if schedule is false, it means SFN/SF for ULGrant had not yet arrived */ /* if schedule is false, it means SFN/SF for ULGrant had not yet arrived */
schedule = check_ulGrant_Schedule(frameP, subframeP, CC_id, UE_info->UE_template[CC_id][UE_id].ul_SR); // schedule = check_ulGrant_Schedule(frameP, subframeP, CC_id, UE_info->UE_template[CC_id][UE_id].ul_SR);
schedule = check_ulGrant_Schedule(RC.eNB[0][CC_id]->UL_INFO.frame, RC.eNB[0][CC_id]->UL_INFO.subframe, CC_id, UE_info->UE_template[CC_id][UE_id].ul_SR);
if (schedule == false ) if (schedule == false )
continue; continue;
......
...@@ -477,6 +477,13 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP, ...@@ -477,6 +477,13 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
if ((pdcp_p->security_activated != 0) && if ((pdcp_p->security_activated != 0) &&
(((pdcp_p->cipheringAlgorithm) != 0) || (((pdcp_p->cipheringAlgorithm) != 0) ||
((pdcp_p->integrityProtAlgorithm) != 0))) { ((pdcp_p->integrityProtAlgorithm) != 0))) {
printf("kRRCint in PDCP:\n");
for(int i=0;i<32;i++)
{
printf("%02x",pdcp_p->kRRCint);
}
printf("\n");
uint8_t ciphyeringAlgorithm = pdcp_p->cipheringAlgorithm; uint8_t ciphyeringAlgorithm = pdcp_p->cipheringAlgorithm;
if (ctxt_pP->enb_flag == ENB_FLAG_YES) { if (ctxt_pP->enb_flag == ENB_FLAG_YES) {
if (RC.ss.mode >= SS_SOFTMODEM) { if (RC.ss.mode >= SS_SOFTMODEM) {
...@@ -2528,6 +2535,7 @@ pdcp_config_set_security_cipher( ...@@ -2528,6 +2535,7 @@ pdcp_config_set_security_cipher(
DevAssert(pdcp_pP != NULL); DevAssert(pdcp_pP != NULL);
pdcp_pP->cipheringAlgorithm = security_modeP; pdcp_pP->cipheringAlgorithm = security_modeP;
pdcp_pP->security_activated = 1; pdcp_pP->security_activated = 1;
LOG_D(PDCP, "fxn:%s security_activated = 1\n", __FUNCTION__);
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -2552,11 +2560,12 @@ pdcp_config_set_security( ...@@ -2552,11 +2560,12 @@ pdcp_config_set_security(
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_pP), PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_pP),
pdcp_pP->cipheringAlgorithm, pdcp_pP->cipheringAlgorithm,
pdcp_pP->integrityProtAlgorithm); pdcp_pP->integrityProtAlgorithm);
pdcp_pP->kRRCenc = kRRCenc; if(kRRCenc != NULL) pdcp_pP->kRRCenc = kRRCenc;
pdcp_pP->kRRCint = kRRCint; if(kRRCint != NULL) pdcp_pP->kRRCint = kRRCint;
pdcp_pP->kUPenc = kUPenc; if(kUPenc != NULL) pdcp_pP->kUPenc = kUPenc;
/* Activate security */ /* Activate security */
pdcp_pP->security_activated = 1; pdcp_pP->security_activated = 1;
LOG_D(PDCP, "fxn:%s security_activated = 1\n", __FUNCTION__);
} }
} }
......
...@@ -134,6 +134,13 @@ pdcp_apply_security( ...@@ -134,6 +134,13 @@ pdcp_apply_security(
encrypt_params.blength = (pdcp_header_len + sdu_buffer_size) << 3; encrypt_params.blength = (pdcp_header_len + sdu_buffer_size) << 3;
encrypt_params.key = pdcp_pP->kRRCint + 16; // + 128; encrypt_params.key = pdcp_pP->kRRCint + 16; // + 128;
printf("kRRCint in PDCP:\n");
for(int i=0;i<32;i++)
{
printf("%02x",pdcp_pP->kRRCint);
}
printf("\n");
mac_i = &pdcp_pdu_buffer[pdcp_header_len + sdu_buffer_size]; mac_i = &pdcp_pdu_buffer[pdcp_header_len + sdu_buffer_size];
/* Both header and data parts are integrity protected for /* Both header and data parts are integrity protected for
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
static IF_Module_t *if_inst[MAX_IF_MODULES]; static IF_Module_t *if_inst[MAX_IF_MODULES];
static Sched_Rsp_t Sched_INFO[MAX_IF_MODULES][MAX_NUM_CCs]; static Sched_Rsp_t Sched_INFO[MAX_IF_MODULES][MAX_NUM_CCs];
uint8_t sf_ahead_for_dl = 0;
extern uint16_t pdcch_order_table[16]; extern uint16_t pdcch_order_table[16];
extern int cell_index; extern int cell_index;
extern uint8_t pdcchOrder_rcvd; extern uint8_t pdcchOrder_rcvd;
...@@ -785,6 +785,7 @@ void UL_indication(UL_IND_t *UL_info, void *proc) { ...@@ -785,6 +785,7 @@ void UL_indication(UL_IND_t *UL_info, void *proc) {
uint8_t sf_ahead_dl = ul_subframe2_k_phich(&mac->common_channels[CC_id], UL_info->subframe); uint8_t sf_ahead_dl = ul_subframe2_k_phich(&mac->common_channels[CC_id], UL_info->subframe);
if(sf_ahead_dl!=255) { if(sf_ahead_dl!=255) {
sf_ahead_for_dl = sf_ahead_dl;
mac->HI_DCI0_req[CC_id][(UL_info->subframe+sf_ahead_dl)%10].hi_dci0_request_body.number_of_hi = 0; mac->HI_DCI0_req[CC_id][(UL_info->subframe+sf_ahead_dl)%10].hi_dci0_request_body.number_of_hi = 0;
LOG_D(MAC,"current (%d,%d) clear HI_DCI0_req[0][%d]\n",UL_info->frame,UL_info->subframe,(UL_info->subframe+sf_ahead_dl)%10); LOG_D(MAC,"current (%d,%d) clear HI_DCI0_req[0][%d]\n",UL_info->frame,UL_info->subframe,(UL_info->subframe+sf_ahead_dl)%10);
} }
......
...@@ -10058,24 +10058,30 @@ void *rrc_enb_process_itti_msg(void *notUsed) { ...@@ -10058,24 +10058,30 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
LOG_A(RRC,"[eNB %ld] Received %s : %p, Integrity_Algo: %d, Ciphering_Algo: %ld \n",instance, msg_name_p, &RRC_AS_SECURITY_CONFIG_REQ(msg_p),RRC_AS_SECURITY_CONFIG_REQ(msg_p).Integrity.integrity_algorithm,RRC_AS_SECURITY_CONFIG_REQ(msg_p).Ciphering.ciphering_algorithm); LOG_A(RRC,"[eNB %ld] Received %s : %p, Integrity_Algo: %d, Ciphering_Algo: %ld \n",instance, msg_name_p, &RRC_AS_SECURITY_CONFIG_REQ(msg_p),RRC_AS_SECURITY_CONFIG_REQ(msg_p).Integrity.integrity_algorithm,RRC_AS_SECURITY_CONFIG_REQ(msg_p).Ciphering.ciphering_algorithm);
if(RRC_AS_SECURITY_CONFIG_REQ(msg_p).isIntegrityInfoPresent && RRC_AS_SECURITY_CONFIG_REQ(msg_p).Integrity.kRRCint) if(RRC_AS_SECURITY_CONFIG_REQ(msg_p).isIntegrityInfoPresent && RRC_AS_SECURITY_CONFIG_REQ(msg_p).Integrity.kRRCint)
{ {
for(int i=16;i<32;i++) printf("kRRCint in RRC:\n");
for(int i=0;i<32;i++)
{ {
LOG_D(RRC,"kRRCint in RRC: %02x\n",RRC_AS_SECURITY_CONFIG_REQ(msg_p).Integrity.kRRCint[i]); LOG_D(RRC,"kRRCint in RRC: %02x\n",RRC_AS_SECURITY_CONFIG_REQ(msg_p).Integrity.kRRCint[i]);
} }
printf("\n");
} }
if(RRC_AS_SECURITY_CONFIG_REQ(msg_p).isCipheringInfoPresent && RRC_AS_SECURITY_CONFIG_REQ(msg_p).Ciphering.kRRCenc) if(RRC_AS_SECURITY_CONFIG_REQ(msg_p).isCipheringInfoPresent && RRC_AS_SECURITY_CONFIG_REQ(msg_p).Ciphering.kRRCenc)
{ {
printf("kRRCenc in RRC:\n");
for(int j=0;j<16;j++) for(int j=0;j<16;j++)
{ {
LOG_D(RRC,"kRRCenc in RRC: %02x\n",RRC_AS_SECURITY_CONFIG_REQ(msg_p).Ciphering.kRRCenc[j]); LOG_D(RRC,"kRRCenc in RRC: %02x\n",RRC_AS_SECURITY_CONFIG_REQ(msg_p).Ciphering.kRRCenc[j]);
} }
printf("\n");
} }
if(RRC_AS_SECURITY_CONFIG_REQ(msg_p).isCipheringInfoPresent && RRC_AS_SECURITY_CONFIG_REQ(msg_p).Ciphering.kUPenc) if(RRC_AS_SECURITY_CONFIG_REQ(msg_p).isCipheringInfoPresent && RRC_AS_SECURITY_CONFIG_REQ(msg_p).Ciphering.kUPenc)
{ {
LOG_D(RRC,"kUPenc in RRC:\n");
for(int k=0;k<16;k++) for(int k=0;k<16;k++)
{ {
LOG_D(RRC,"kUPenc in RRC: %02x\n",RRC_AS_SECURITY_CONFIG_REQ(msg_p).Ciphering.kUPenc[k]); LOG_D(RRC,"kUPenc in RRC: %02x\n",RRC_AS_SECURITY_CONFIG_REQ(msg_p).Ciphering.kUPenc[k]);
} }
LOG_D(RRC,"\n");
} }
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt,
instance, instance,
......
...@@ -270,11 +270,20 @@ static void ss_task_handle_rrc_pdu_req(struct EUTRA_RRC_PDU_REQ *req) ...@@ -270,11 +270,20 @@ static void ss_task_handle_rrc_pdu_req(struct EUTRA_RRC_PDU_REQ *req)
LOG_A(ENB_SS,"VT_TIMER SRB task received MSG for future SFN %d , SF %d\n",tinfo.sfn,tinfo.sf); LOG_A(ENB_SS,"VT_TIMER SRB task received MSG for future SFN %d , SF %d\n",tinfo.sfn,tinfo.sf);
if(msg_queued) if(msg_queued)
{ {
msg_queued = vt_timer_setup(timer_tinfo, TASK_RRC_ENB, instance_g,message_p); /* Below adjustment is made as MAC is taking 1 extra SF before scheduling and "msg_can_be_queued" is adjusting by 4 SF */
LOG_A(ENB_SS, "RRC_PDU Queued as the scheduled SFN is %d SF: %d and curr SFN %d , SF %d", if (timer_tinfo.sf == 0)
tinfo.sfn,tinfo.sf, SS_context.sfn,SS_context.sf); {
} timer_tinfo.sfn--;
timer_tinfo.sf = 9;
}
else
timer_tinfo.sf--;
msg_queued = vt_timer_setup(timer_tinfo, TASK_RRC_ENB, instance_g,message_p);
LOG_A(ENB_SS, "RRC_PDU Queued as the scheduled SFN is %d SF: %d and curr SFN %d , SF %d",
tinfo.sfn,tinfo.sf, SS_context.sfn,SS_context.sf);
}
LOG_I(ENB_SS, "msg_queued2:%d\n",msg_queued); LOG_I(ENB_SS, "msg_queued2:%d\n",msg_queued);
} }
......
...@@ -803,12 +803,14 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req) ...@@ -803,12 +803,14 @@ int sys_add_reconfig_cell(struct SYSTEM_CTRL_REQ *req)
RC.ss.ulgrant_info[cell_index].ulGrantType = ON_SR_RECEPTION_PRESENT; RC.ss.ulgrant_info[cell_index].ulGrantType = ON_SR_RECEPTION_PRESENT;
SS_ULGRANT_INFO(msg_p).ulGrantType = ON_SR_RECEPTION_PRESENT; SS_ULGRANT_INFO(msg_p).ulGrantType = ON_SR_RECEPTION_PRESENT;
LOG_I(ENB_SS, "[SYS] Received ulGrantType ON_SR_RECEPTION\n"); LOG_I(ENB_SS, "[SYS] Received ulGrantType ON_SR_RECEPTION\n");
destTaskMAC = true;
} }
else if (AddOrReconfigure->Active.v.CcchDcchDtchConfig.v.UL.v.UL_GrantConfig.v.d == UL_GrantConfig_Type_None) else if (AddOrReconfigure->Active.v.CcchDcchDtchConfig.v.UL.v.UL_GrantConfig.v.d == UL_GrantConfig_Type_None)
{ {
RC.ss.ulgrant_info[cell_index].ulGrantType = NONE_PRESENT; RC.ss.ulgrant_info[cell_index].ulGrantType = NONE_PRESENT;
SS_ULGRANT_INFO(msg_p).ulGrantType = NONE_PRESENT; SS_ULGRANT_INFO(msg_p).ulGrantType = NONE_PRESENT;
LOG_I(ENB_SS, "[SYS] Received ulGrantType UL_GrantConfig_Type_None\n"); LOG_I(ENB_SS, "[SYS] Received ulGrantType UL_GrantConfig_Type_None\n");
destTaskMAC = true;
} }
else if (AddOrReconfigure->Active.v.CcchDcchDtchConfig.v.UL.v.UL_GrantConfig.v.d == UL_GrantConfig_Type_Periodic) else if (AddOrReconfigure->Active.v.CcchDcchDtchConfig.v.UL.v.UL_GrantConfig.v.d == UL_GrantConfig_Type_Periodic)
{ {
...@@ -1870,12 +1872,15 @@ static void sys_handle_l1macind_ctrl(struct SYSTEM_CTRL_REQ *req) ...@@ -1870,12 +1872,15 @@ static void sys_handle_l1macind_ctrl(struct SYSTEM_CTRL_REQ *req)
SS_L1MACIND_CTRL(message_p).HarqError_Ctrl = IndCtrlMode_DISABLE; SS_L1MACIND_CTRL(message_p).HarqError_Ctrl = IndCtrlMode_DISABLE;
} }
} }
LOG_D(ENB_SS, "fxn:%s line:%d\n",__FUNCTION__, __LINE__);
uint8_t msg_queued = 0; uint8_t msg_queued = 0;
if (req->Common.TimingInfo.d == TimingInfo_Type_SubFrame) if (req->Common.TimingInfo.d == TimingInfo_Type_SubFrame)
{ {
LOG_D(ENB_SS, "fxn:%s line:%d\n",__FUNCTION__, __LINE__);
ss_set_timinfo_t tinfo, timer_tinfo; ss_set_timinfo_t tinfo, timer_tinfo;
tinfo.sfn = req->Common.TimingInfo.v.SubFrame.SFN.v.Number; tinfo.sfn = req->Common.TimingInfo.v.SubFrame.SFN.v.Number;
tinfo.sf = req->Common.TimingInfo.v.SubFrame.Subframe.v.Number; tinfo.sf = req->Common.TimingInfo.v.SubFrame.Subframe.v.Number;
LOG_D(ENB_SS, "fxn:%s line:%d tinfo.sfn:%d tinfo.sf:%d\n",__FUNCTION__, __LINE__, tinfo.sfn, tinfo.sf);
timer_tinfo = tinfo; timer_tinfo = tinfo;
msg_queued = msg_can_be_queued(tinfo, &timer_tinfo); msg_queued = msg_can_be_queued(tinfo, &timer_tinfo);
...@@ -1883,7 +1888,7 @@ static void sys_handle_l1macind_ctrl(struct SYSTEM_CTRL_REQ *req) ...@@ -1883,7 +1888,7 @@ static void sys_handle_l1macind_ctrl(struct SYSTEM_CTRL_REQ *req)
if(msg_queued) if(msg_queued)
{ {
sys_vt_add_sf(&timer_tinfo.sfn,&timer_tinfo.sf,5); sys_vt_add_sf(&timer_tinfo.sfn,&timer_tinfo.sf,4);
msg_queued = vt_timer_setup(timer_tinfo, TASK_MAC_ENB, 0,message_p); msg_queued = vt_timer_setup(timer_tinfo, TASK_MAC_ENB, 0,message_p);
} }
LOG_A(ENB_SS, "RRC_PDU Queued as the scheduled SFN is %d SF: %d and curr SFN %d , SF %d", LOG_A(ENB_SS, "RRC_PDU Queued as the scheduled SFN is %d SF: %d and curr SFN %d , SF %d",
......
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