Commit f8928de6 authored by Vaibhav Shrivastava's avatar Vaibhav Shrivastava Committed by jperaldi

Fix Paging Alignment

parent 4a36b677
......@@ -1261,7 +1261,6 @@ static void sys_handle_cell_attn_req(struct CellAttenuationConfig_Type_CellAtten
static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_set_timinfo_t tinfo)
{
LOG_A(ENB_SS, "[SYS] Enter sys_handle_paging_req Paging_IND for processing\n");
/** TODO: Considering only one cell for now */
......@@ -1284,13 +1283,10 @@ static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_s
SS_PAGING_IND(message_p).systemInfoModification = false;
SS_PAGING_IND(message_p).bSubframeOffsetListPresent = false;
switch (pagingRequest->Paging.message.d)
{
switch (pagingRequest->Paging.message.d) {
case SQN_PCCH_MessageType_c1:
if (pagingRequest->Paging.message.v.c1.d)
{
if (pagingRequest->Paging.message.v.c1.v.paging.pagingRecordList.d)
{
if (pagingRequest->Paging.message.v.c1.d) {
if (pagingRequest->Paging.message.v.c1.v.paging.pagingRecordList.d) {
struct SQN_PagingRecord *p_sdl_msg = NULL;
p_sdl_msg = pagingRequest->Paging.message.v.c1.v.paging.pagingRecordList.v.v;
/* id-CNDomain : convert cnDomain */
......@@ -1301,21 +1297,17 @@ static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_s
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++)
{
for (int count = 0; count < numPagingRecord; count++) {
cn_domain = p_sdl_msg->cn_Domain;
/* 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;
}
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;
}
switch (p_sdl_msg->ue_Identity.d)
{
switch (p_sdl_msg->ue_Identity.d) {
case SQN_PagingUE_Identity_s_TMSI:
p_record_msg->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);
......@@ -1323,8 +1315,7 @@ static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_s
p_record_msg->ue_paging_identity.choice.s_tmsi.m_tmsi = stmsi_rx ;
p_record_msg->ue_paging_identity.choice.s_tmsi.mme_code =
bin_to_int(p_sdl_msg->ue_Identity.v.s_TMSI.mmec,8);
if (oneTimeProcessingFlag == 0)
{
if (oneTimeProcessingFlag == 0) {
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) ;
oneTimeProcessingFlag = 1;
......@@ -1351,30 +1342,25 @@ static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_s
}
}
if (pagingRequest->Paging.message.v.c1.v.paging.systemInfoModification.d)
{
if (pagingRequest->Paging.message.v.c1.v.paging.systemInfoModification.d) {
LOG_A(ENB_SS, "[SYS] System Info Modification received in Paging request \n");
if (SQN_Paging_systemInfoModification_e_true == pagingRequest->Paging.message.v.c1.v.paging.systemInfoModification.v)
{
if (SQN_Paging_systemInfoModification_e_true == pagingRequest->Paging.message.v.c1.v.paging.systemInfoModification.v) {
SS_PAGING_IND(message_p).systemInfoModification = true;
}
}
}
if(pagingRequest->SubframeOffsetList.d)
{
if(pagingRequest->SubframeOffsetList.d) {
LOG_A(ENB_SS, "[SYS] Subframe Offset List present in Paging request \n");
SS_PAGING_IND(message_p).bSubframeOffsetListPresent=true;
SS_PAGING_IND(message_p).subframeOffsetList.num = 0;
for (int i=0; i < pagingRequest->SubframeOffsetList.v.d; i++)
{
for (int i=0; i < pagingRequest->SubframeOffsetList.v.d; i++) {
SS_PAGING_IND(message_p).subframeOffsetList.subframe_offset[i] = pagingRequest->SubframeOffsetList.v.v[i];
SS_PAGING_IND(message_p).subframeOffsetList.num++;
}
}
int send_res = itti_send_msg_to_task(TASK_RRC_ENB, 0, message_p);
if (send_res < 0)
{
if (send_res < 0) {
LOG_A(ENB_SS, "[SYS] Error sending Paging to RRC_ENB");
}
oneTimeProcessingFlag = 0;
......
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