Commit 47749bf4 authored by Vaibhav Shrivastava's avatar Vaibhav Shrivastava Committed by jperaldi

physicalCellId Issue Changes

parent a3af575b
...@@ -277,6 +277,7 @@ void *ss_eNB_drb_process_itti_msg(void *notUsed) ...@@ -277,6 +277,7 @@ void *ss_eNB_drb_process_itti_msg(void *notUsed)
int cell_index; int cell_index;
if(received_msg->ittiMsg.ss_drb_pdu_ind.physCellId){ if(received_msg->ittiMsg.ss_drb_pdu_ind.physCellId){
cell_index = get_cell_index_pci(received_msg->ittiMsg.ss_drb_pdu_ind.physCellId, SS_context.SSCell_list); cell_index = get_cell_index_pci(received_msg->ittiMsg.ss_drb_pdu_ind.physCellId, SS_context.SSCell_list);
LOG_A(ENB_SS,"[SS_DRB] cell_index in SS_DRB_PDU_IND: %d PhysicalCellId: %d \n",cell_index,SS_context.SSCell_list[cell_index].PhysicalCellId);
} }
task_id_t origin_task = ITTI_MSG_ORIGIN_ID(received_msg); task_id_t origin_task = ITTI_MSG_ORIGIN_ID(received_msg);
......
...@@ -459,6 +459,7 @@ void *ss_eNB_srb_process_itti_msg(void *notUsed) ...@@ -459,6 +459,7 @@ void *ss_eNB_srb_process_itti_msg(void *notUsed)
task_id_t origin_task = ITTI_MSG_ORIGIN_ID(received_msg); task_id_t origin_task = ITTI_MSG_ORIGIN_ID(received_msg);
if(received_msg->ittiMsg.ss_rrc_pdu_ind.physCellId){ if(received_msg->ittiMsg.ss_rrc_pdu_ind.physCellId){
cell_index = get_cell_index_pci(received_msg->ittiMsg.ss_rrc_pdu_ind.physCellId, SS_context.SSCell_list); cell_index = get_cell_index_pci(received_msg->ittiMsg.ss_rrc_pdu_ind.physCellId, SS_context.SSCell_list);
LOG_A(ENB_SS,"[SS_SRB] cell_index in SS_RRC_PDU_IND: %d PhysicalCellId: %d \n",cell_index,SS_context.SSCell_list[cell_index].PhysicalCellId);
} }
if (origin_task == TASK_SS_PORTMAN) if (origin_task == TASK_SS_PORTMAN)
......
...@@ -1254,13 +1254,12 @@ static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_s ...@@ -1254,13 +1254,12 @@ static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_s
LOG_A(ENB_SS, "[SYS] Enter sys_handle_paging_req Paging_IND for processing\n"); LOG_A(ENB_SS, "[SYS] Enter sys_handle_paging_req Paging_IND for processing\n");
/** TODO: Considering only one cell for now */ /** TODO: Considering only one cell for now */
uint8_t cellId = 0; //(uint8_t)pagingRequ ->CellId; uint8_t cellId = SS_context.SSCell_list[cell_index].PhysicalCellId; //(uint8_t)pagingRequ ->CellId;
uint8_t cn_domain = 0; uint8_t cn_domain = 0;
enum SystemConfirm_Type_Sel cnfType = SystemConfirm_Type_Paging; enum SystemConfirm_Type_Sel cnfType = SystemConfirm_Type_Paging;
enum ConfirmationResult_Type_Sel resType = ConfirmationResult_Type_Success; enum ConfirmationResult_Type_Sel resType = ConfirmationResult_Type_Success;
bool resVal = TRUE; bool resVal = TRUE;
static uint8_t oneTimeProcessingFlag = 0;
MessageDef *message_p = itti_alloc_new_message(TASK_SYS, 0,SS_SS_PAGING_IND); MessageDef *message_p = itti_alloc_new_message(TASK_SYS, 0,SS_SS_PAGING_IND);
if (message_p == NULL) if (message_p == NULL)
{ {
...@@ -1280,52 +1279,39 @@ static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_s ...@@ -1280,52 +1279,39 @@ static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_s
{ {
if (pagingRequest->Paging.message.v.c1.v.paging.pagingRecordList.d) if (pagingRequest->Paging.message.v.c1.v.paging.pagingRecordList.d)
{ {
struct SQN_PagingRecord *p_sdl_msg = NULL; cn_domain = pagingRequest->Paging.message.v.c1.v.paging.pagingRecordList.v.v->cn_Domain;
p_sdl_msg = pagingRequest->Paging.message.v.c1.v.paging.pagingRecordList.v.v;
/* id-CNDomain : convert cnDomain */
uint8_t numPagingRecord = pagingRequest->Paging.message.v.c1.v.paging.pagingRecordList.v.d;
size_t pgSize = pagingRequest->Paging.message.v.c1.v.paging.pagingRecordList.v.d * sizeof(ss_paging_identity_t); size_t pgSize = pagingRequest->Paging.message.v.c1.v.paging.pagingRecordList.v.d * sizeof(ss_paging_identity_t);
SS_PAGING_IND(message_p).sfn =tinfo.sfn; SS_PAGING_IND(message_p).sfn =tinfo.sfn;
SS_PAGING_IND(message_p).sf = tinfo.sf; SS_PAGING_IND(message_p).sf = tinfo.sf;
SS_PAGING_IND(message_p).paging_recordList = CALLOC(1, pgSize); SS_PAGING_IND(message_p).paging_recordList = CALLOC(1, pgSize);
ss_paging_identity_t *p_record_msg = SS_PAGING_IND(message_p).paging_recordList;
SS_PAGING_IND(message_p).num_paging_record = numPagingRecord;
for (int count = 0; count < numPagingRecord; count++)
{
cn_domain = p_sdl_msg->cn_Domain;
/* id-CNDomain : convert cnDomain */ /* id-CNDomain : convert cnDomain */
if (cn_domain == SQN_PagingRecord_cn_Domain_e_ps) if (cn_domain == SQN_PagingRecord_cn_Domain_e_ps)
{ {
p_record_msg->cn_domain = CN_DOMAIN_PS; SS_PAGING_IND(message_p).paging_recordList->cn_domain = CN_DOMAIN_PS;
} }
else if (cn_domain == SQN_PagingRecord_cn_Domain_e_cs) else if (cn_domain == SQN_PagingRecord_cn_Domain_e_cs)
{ {
p_record_msg->cn_domain = CN_DOMAIN_CS; SS_PAGING_IND(message_p).paging_recordList->cn_domain = CN_DOMAIN_CS;
} }
switch (p_sdl_msg->ue_Identity.d) switch (pagingRequest->Paging.message.v.c1.v.paging.pagingRecordList.v.v->ue_Identity.d)
{ {
case SQN_PagingUE_Identity_s_TMSI: case SQN_PagingUE_Identity_s_TMSI:
p_record_msg->ue_paging_identity.presenceMask = UE_PAGING_IDENTITY_s_tmsi; SS_PAGING_IND(message_p).paging_recordList->ue_paging_identity.presenceMask = UE_PAGING_IDENTITY_s_tmsi;
int32_t stmsi_rx = bin_to_int(p_sdl_msg->ue_Identity.v.s_TMSI.m_TMSI, 32); int32_t stmsi_rx = bin_to_int(pagingRequest->Paging.message.v.c1.v.paging.pagingRecordList.v.v->ue_Identity.v.s_TMSI.m_TMSI, 32);
p_record_msg->ue_paging_identity.choice.s_tmsi.m_tmsi = stmsi_rx ; SS_PAGING_IND(message_p).paging_recordList->ue_paging_identity.choice.s_tmsi.m_tmsi = stmsi_rx ;
p_record_msg->ue_paging_identity.choice.s_tmsi.mme_code = SS_PAGING_IND(message_p).paging_recordList->ue_paging_identity.choice.s_tmsi.mme_code =
bin_to_int(p_sdl_msg->ue_Identity.v.s_TMSI.mmec,8); bin_to_int(pagingRequest->Paging.message.v.c1.v.paging.pagingRecordList.v.v->ue_Identity.v.s_TMSI.mmec,8);
if (oneTimeProcessingFlag == 0)
{
SS_PAGING_IND(message_p).ue_index_value = paging_ue_index_g; SS_PAGING_IND(message_p).ue_index_value = paging_ue_index_g;
paging_ue_index_g = ((paging_ue_index_g +4) % MAX_MOBILES_PER_ENB) ; paging_ue_index_g = ((paging_ue_index_g +4) % MAX_MOBILES_PER_ENB) ;
oneTimeProcessingFlag = 1;
}
break; break;
case SQN_PagingUE_Identity_imsi: case SQN_PagingUE_Identity_imsi:
p_record_msg->ue_paging_identity.presenceMask = UE_PAGING_IDENTITY_imsi; SS_PAGING_IND(message_p).paging_recordList->ue_paging_identity.presenceMask = UE_PAGING_IDENTITY_imsi;
p_record_msg->ue_paging_identity.choice.imsi.length = p_sdl_msg->ue_Identity.v.imsi.d; memcpy(&(SS_PAGING_IND(message_p).paging_recordList->ue_paging_identity.choice.imsi),
for(int j=0;j<p_record_msg->ue_paging_identity.choice.imsi.length;j++) { &(pagingRequest->Paging.message.v.c1.v.paging.pagingRecordList.v.v->ue_Identity.v.imsi),
p_record_msg->ue_paging_identity.choice.imsi.buffer[j] = p_sdl_msg->ue_Identity.v.imsi.v[j]; sizeof(s1ap_imsi_t));
}
break; break;
case SQN_PagingUE_Identity_ng_5G_S_TMSI_r15: case SQN_PagingUE_Identity_ng_5G_S_TMSI_r15:
case SQN_PagingUE_Identity_fullI_RNTI_r15: case SQN_PagingUE_Identity_fullI_RNTI_r15:
...@@ -1336,9 +1322,6 @@ static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_s ...@@ -1336,9 +1322,6 @@ static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_s
LOG_A(ENB_SS, "[SYS] Invalid Pging request received\n"); LOG_A(ENB_SS, "[SYS] Invalid Pging request received\n");
} }
p_sdl_msg++;
p_record_msg++;
}
} }
if (pagingRequest->Paging.message.v.c1.v.paging.systemInfoModification.d) if (pagingRequest->Paging.message.v.c1.v.paging.systemInfoModification.d)
...@@ -1367,7 +1350,7 @@ static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_s ...@@ -1367,7 +1350,7 @@ static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_s
{ {
LOG_A(ENB_SS, "[SYS] Error sending Paging to RRC_ENB"); LOG_A(ENB_SS, "[SYS] Error sending Paging to RRC_ENB");
} }
oneTimeProcessingFlag = 0;
LOG_A(ENB_SS, "[SYS] Paging_IND for Cell_id %d sent to RRC\n", cellId); LOG_A(ENB_SS, "[SYS] Paging_IND for Cell_id %d sent to RRC\n", cellId);
break; break;
case SQN_PCCH_MessageType_messageClassExtension: case SQN_PCCH_MessageType_messageClassExtension:
...@@ -1641,8 +1624,7 @@ static void ss_task_sys_handle_req(struct SYSTEM_CTRL_REQ *req, ss_set_timinfo_t ...@@ -1641,8 +1624,7 @@ static void ss_task_sys_handle_req(struct SYSTEM_CTRL_REQ *req, ss_set_timinfo_t
if(req->Common.CellId){ if(req->Common.CellId){
cell_index = get_cell_index(req->Common.CellId, SS_context.SSCell_list); cell_index = get_cell_index(req->Common.CellId, SS_context.SSCell_list);
SS_context.SSCell_list[cell_index].eutra_cellId = req->Common.CellId; SS_context.SSCell_list[cell_index].eutra_cellId = req->Common.CellId;
SS_context.SSCell_list[cell_index].PhysicalCellId = req->Request.v.Cell.v.AddOrReconfigure.Basic.v.StaticCellInfo.v.Common.PhysicalCellId; LOG_A(ENB_SS,"[SYS] cell_index: %d eutra_cellId: %d \n",cell_index,SS_context.SSCell_list[cell_index].eutra_cellId);
LOG_A(ENB_SS,"[SYS] cell_index: %d eutra_cellId: %d PhysicalCellId: %d \n",cell_index,SS_context.SSCell_list[cell_index].eutra_cellId,SS_context.SSCell_list[cell_index].PhysicalCellId);
} }
int enterState = SS_context.SSCell_list[cell_index].State; int enterState = SS_context.SSCell_list[cell_index].State;
int exitState = SS_context.SSCell_list[cell_index].State; int exitState = SS_context.SSCell_list[cell_index].State;
...@@ -1655,6 +1637,8 @@ static void ss_task_sys_handle_req(struct SYSTEM_CTRL_REQ *req, ss_set_timinfo_t ...@@ -1655,6 +1637,8 @@ static void ss_task_sys_handle_req(struct SYSTEM_CTRL_REQ *req, ss_set_timinfo_t
{ {
LOG_A(ENB_SS, "[SYS] SystemRequest_Type_Cell received\n"); LOG_A(ENB_SS, "[SYS] SystemRequest_Type_Cell received\n");
exitState = sys_handle_cell_config_req(&(req->Request.v.Cell)); exitState = sys_handle_cell_config_req(&(req->Request.v.Cell));
SS_context.SSCell_list[cell_index].PhysicalCellId = req->Request.v.Cell.v.AddOrReconfigure.Basic.v.StaticCellInfo.v.Common.PhysicalCellId;
LOG_A(ENB_SS,"[SYS] SS_STATE_NOT_CONFIGURED: PhysicalCellId is %d in SS_context \n",SS_context.SSCell_list[cell_index].PhysicalCellId);
SS_context.SSCell_list[cell_index].State = exitState; SS_context.SSCell_list[cell_index].State = exitState;
if(RC.ss.State <= SS_STATE_CELL_CONFIGURED) if(RC.ss.State <= SS_STATE_CELL_CONFIGURED)
RC.ss.State = exitState; RC.ss.State = exitState;
...@@ -1689,6 +1673,10 @@ static void ss_task_sys_handle_req(struct SYSTEM_CTRL_REQ *req, ss_set_timinfo_t ...@@ -1689,6 +1673,10 @@ static void ss_task_sys_handle_req(struct SYSTEM_CTRL_REQ *req, ss_set_timinfo_t
case SystemRequest_Type_Cell: case SystemRequest_Type_Cell:
LOG_A(ENB_SS, "[SYS] SystemRequest_Type_Cell received\n"); LOG_A(ENB_SS, "[SYS] SystemRequest_Type_Cell received\n");
exitState = sys_handle_cell_config_req(&(req->Request.v.Cell)); exitState = sys_handle_cell_config_req(&(req->Request.v.Cell));
if(req->Request.v.Cell.v.AddOrReconfigure.Basic.v.StaticCellInfo.v.Common.PhysicalCellId) {
SS_context.SSCell_list[cell_index].PhysicalCellId = req->Request.v.Cell.v.AddOrReconfigure.Basic.v.StaticCellInfo.v.Common.PhysicalCellId;
}
LOG_A(ENB_SS,"[SYS] SS_STATE_CELL_ACTIVE: PhysicalCellId is %d in SS_context \n",SS_context.SSCell_list[cell_index].PhysicalCellId);
SS_context.SSCell_list[cell_index].State = exitState; SS_context.SSCell_list[cell_index].State = exitState;
if(RC.ss.State <= SS_STATE_CELL_ACTIVE) if(RC.ss.State <= SS_STATE_CELL_ACTIVE)
RC.ss.State = exitState; RC.ss.State = exitState;
......
...@@ -277,6 +277,7 @@ void *ss_eNB_sysind_process_itti_msg(void *notUsed) ...@@ -277,6 +277,7 @@ void *ss_eNB_sysind_process_itti_msg(void *notUsed)
int cell_index; int cell_index;
if(received_msg->ittiMsg.ss_system_ind.physCellId){ if(received_msg->ittiMsg.ss_system_ind.physCellId){
cell_index = get_cell_index_pci(received_msg->ittiMsg.ss_system_ind.physCellId, SS_context.SSCell_list); cell_index = get_cell_index_pci(received_msg->ittiMsg.ss_system_ind.physCellId, SS_context.SSCell_list);
LOG_A(ENB_SS,"[SS_SYSIND] cell_index in SS_SYSTEM_IND: %d PhysicalCellId: %d \n",cell_index,SS_context.SSCell_list[cell_index].PhysicalCellId);
} }
task_id_t origin_task = ITTI_MSG_ORIGIN_ID(received_msg); task_id_t origin_task = ITTI_MSG_ORIGIN_ID(received_msg);
......
...@@ -383,6 +383,7 @@ void *ss_eNB_vtp_process_itti_msg(void *notUsed) ...@@ -383,6 +383,7 @@ void *ss_eNB_vtp_process_itti_msg(void *notUsed)
tinfo.sfn = SS_UPD_TIM_INFO(received_msg).sfn; tinfo.sfn = SS_UPD_TIM_INFO(received_msg).sfn;
if(SS_UPD_TIM_INFO(received_msg).physCellId){ if(SS_UPD_TIM_INFO(received_msg).physCellId){
cellIndex = get_cell_index_pci(SS_UPD_TIM_INFO(received_msg).physCellId, SS_context.SSCell_list); cellIndex = get_cell_index_pci(SS_UPD_TIM_INFO(received_msg).physCellId, SS_context.SSCell_list);
LOG_A(ENB_SS,"[VTP] cellIndex in SS_UPD_TIM_INFO: %d PhysicalCellId: %d \n",cellIndex,SS_context.SSCell_list[cellIndex].PhysicalCellId);
} }
LOG_A(ENB_APP, "[VTP] received VTP_UPD_TIM_INFO SFN: %d SF: %d\n", tinfo.sfn, tinfo.sf); LOG_A(ENB_APP, "[VTP] received VTP_UPD_TIM_INFO SFN: %d SF: %d\n", tinfo.sfn, tinfo.sf);
LOG_A(ENB_APP,"[VTP] received VTP_UPD_TIM_INFO SFN: %d SF: %d\n", tinfo.sfn, tinfo.sf); LOG_A(ENB_APP,"[VTP] received VTP_UPD_TIM_INFO SFN: %d SF: %d\n", tinfo.sfn, tinfo.sf);
......
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