Commit 01890540 authored by Siddharth Rana's avatar Siddharth Rana Committed by Vijay Chadachan

Changes to fix 8.1.5.1.1 and Delta Values

parent 07656305
...@@ -639,8 +639,8 @@ void evaluate_rsrp_report(NR_UE_info_t *UE, ...@@ -639,8 +639,8 @@ void evaluate_rsrp_report(NR_UE_info_t *UE,
} }
csi_report->nb_of_csi_ssb_report++; csi_report->nb_of_csi_ssb_report++;
int strongest_ssb_rsrp = get_measured_rsrp(sched_ctrl->CSI_report.ssb_cri_report.RSRP); int strongest_ssb_rsrp = get_measured_rsrp(sched_ctrl->CSI_report.ssb_cri_report.RSRP);
UE_info->rsrpReportStatus = true; UE->rsrpReportStatus = true;
UE_info->ssb_rsrp = strongest_ssb_rsrp; UE->ssb_rsrp = strongest_ssb_rsrp;
NR_mac_stats_t *stats = &UE->mac_stats; NR_mac_stats_t *stats = &UE->mac_stats;
// including ssb rsrp in mac stats // including ssb rsrp in mac stats
stats->cumul_rsrp += strongest_ssb_rsrp; stats->cumul_rsrp += strongest_ssb_rsrp;
......
...@@ -675,6 +675,8 @@ typedef struct { ...@@ -675,6 +675,8 @@ typedef struct {
NR_gNB_UCI_STATS_t uci_statS; NR_gNB_UCI_STATS_t uci_statS;
float ul_thr_ue; float ul_thr_ue;
float dl_thr_ue; float dl_thr_ue;
bool rsrpReportStatus;
int ssb_rsrp;
} NR_UE_info_t; } NR_UE_info_t;
typedef struct { typedef struct {
...@@ -682,8 +684,6 @@ typedef struct { ...@@ -682,8 +684,6 @@ typedef struct {
// last element always NULL // last element always NULL
pthread_mutex_t mutex; pthread_mutex_t mutex;
NR_UE_info_t *list[MAX_MOBILES_PER_GNB+1]; NR_UE_info_t *list[MAX_MOBILES_PER_GNB+1];
bool rsrpReportStatus;
int ssb_rsrp;
bool sched_csirs; bool sched_csirs;
uid_allocator_t uid_allocator; uid_allocator_t uid_allocator;
} NR_UEs_t; } NR_UEs_t;
......
...@@ -89,7 +89,7 @@ nr_pdcp_ue_t *nr_pdcp_manager_get_ue_ex(nr_pdcp_ue_manager_t *_m, int rnti) ...@@ -89,7 +89,7 @@ nr_pdcp_ue_t *nr_pdcp_manager_get_ue_ex(nr_pdcp_ue_manager_t *_m, int rnti)
nr_pdcp_manager_lock(m); nr_pdcp_manager_lock(m);
for (i = 0; i < m->ue_count; i++) for (i = 0; i < m->ue_count; i++)
{ {
if (m->ue_list[i]->rnti == rnti) if (m->ue_list[i]->rntiMaybeUEid == rnti)
{ {
ret = m->ue_list[i]; ret = m->ue_list[i];
break; break;
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h" #include "openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h"
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.h" #include "openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.h"
#include "openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c"
#include "common/utils/LOG/ss-log.h" #include "common/utils/LOG/ss-log.h"
#define MSC_INTERFACE #define MSC_INTERFACE
...@@ -534,6 +535,7 @@ static void ss_task_sys_nr_handle_deltaValues(struct NR_SYSTEM_CTRL_REQ *req) ...@@ -534,6 +535,7 @@ static void ss_task_sys_nr_handle_deltaValues(struct NR_SYSTEM_CTRL_REQ *req)
LOG_A(GNB_APP, "[SYS-GNB] Entry in fxn:%s\n", __FUNCTION__); LOG_A(GNB_APP, "[SYS-GNB] Entry in fxn:%s\n", __FUNCTION__);
struct NR_SYSTEM_CTRL_CNF *msgCnf = CALLOC(1, sizeof(struct NR_SYSTEM_CTRL_CNF)); struct NR_SYSTEM_CTRL_CNF *msgCnf = CALLOC(1, sizeof(struct NR_SYSTEM_CTRL_CNF));
MessageDef *message_p = itti_alloc_new_message(TASK_SYS_GNB, INSTANCE_DEFAULT, SS_NR_SYS_PORT_MSG_CNF); MessageDef *message_p = itti_alloc_new_message(TASK_SYS_GNB, INSTANCE_DEFAULT, SS_NR_SYS_PORT_MSG_CNF);
if (!message_p) if (!message_p)
{ {
LOG_A(GNB_APP, "[SYS-GNB] Error Allocating Memory for message NR_SYSTEM_CTRL_CNF \n"); LOG_A(GNB_APP, "[SYS-GNB] Error Allocating Memory for message NR_SYSTEM_CTRL_CNF \n");
...@@ -563,57 +565,63 @@ static void ss_task_sys_nr_handle_deltaValues(struct NR_SYSTEM_CTRL_REQ *req) ...@@ -563,57 +565,63 @@ static void ss_task_sys_nr_handle_deltaValues(struct NR_SYSTEM_CTRL_REQ *req)
deltaSecondaryBand->DeltaNRf3 = 0; deltaSecondaryBand->DeltaNRf3 = 0;
deltaSecondaryBand->DeltaNRf4 = 0; deltaSecondaryBand->DeltaNRf4 = 0;
uint16_t mac_inst = 0; uint16_t mac_inst = 0;
LOG_A(GNB_APP, "[SYS-GNB] absoluteFrequencySSB:%ld reportedrsrp:%d\n", NR_UE_info_t *UE = NULL;
*RC.nrrrc[0]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB, LOG_A(GNB_APP, "[SYS-GNB] absoluteFrequencySSB:%ld\n",
RC.nrmac[0]->UE_info.ssb_rsrp); *RC.nrrrc[0]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB);
if ( ((get_softmodem_params()->numerology >= 1 || get_softmodem_params()->numerology <= 2) && (RC.ss.State == SS_STATE_CELL_ACTIVE)) && (RC.nrmac[0]->UE_info.rsrpReportStatus) ) if ((get_softmodem_params()->numerology >= 1 || get_softmodem_params()->numerology <= 2) && (RC.ss.State == SS_STATE_CELL_ACTIVE))
{ {
UE = find_nr_UE(&RC.nrmac[0]->UE_info, SS_context.ss_rnti_g);
if(UE->rsrpReportStatus){
LOG_A(GNB_APP, "[SYS-GNB] received SYSTEM_CTRL_REQ with DeltaValues in Active State for Primary Band \n"); LOG_A(GNB_APP, "[SYS-GNB] received SYSTEM_CTRL_REQ with DeltaValues in Active State for Primary Band \n");
if (req->Request.v.DeltaValues.DeltaPrimary.Ssb_NRf1.v.v.R15 == *RC.nrrrc[0]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB) if (req->Request.v.DeltaValues.DeltaPrimary.Ssb_NRf1.v.v.R15 == *RC.nrrrc[0]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB)
{ {
deltaPrimaryBand->DeltaNRf1 = RC.nrmac[0]->UE_info.ssb_rsrp + 82; deltaPrimaryBand->DeltaNRf1 = UE->ssb_rsrp + 82;
LOG_A(GNB_APP, "updated DeltaNRf1:%d for deltaPrimaryBand \n", deltaPrimaryBand->DeltaNRf1); LOG_A(GNB_APP, "updated DeltaNRf1:%d for deltaPrimaryBand \n", deltaPrimaryBand->DeltaNRf1);
} }
if (req->Request.v.DeltaValues.DeltaPrimary.Ssb_NRf2.v.v.R15 == *RC.nrrrc[0]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB) if (req->Request.v.DeltaValues.DeltaPrimary.Ssb_NRf2.v.v.R15 == *RC.nrrrc[0]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB)
{ {
deltaPrimaryBand->DeltaNRf2 = RC.nrmac[0]->UE_info.ssb_rsrp + 82; deltaPrimaryBand->DeltaNRf2 = UE->ssb_rsrp + 82;
LOG_A(GNB_APP, "updated DeltaNRf2:%d for deltaPrimaryBand \n", deltaPrimaryBand->DeltaNRf2); LOG_A(GNB_APP, "updated DeltaNRf2:%d for deltaPrimaryBand \n", deltaPrimaryBand->DeltaNRf2);
} }
if (req->Request.v.DeltaValues.DeltaPrimary.Ssb_NRf3.v.v.R15 == *RC.nrrrc[0]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB) if (req->Request.v.DeltaValues.DeltaPrimary.Ssb_NRf3.v.v.R15 == *RC.nrrrc[0]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB)
{ {
deltaPrimaryBand->DeltaNRf3 = RC.nrmac[0]->UE_info.ssb_rsrp + 82; deltaPrimaryBand->DeltaNRf3 = UE->ssb_rsrp + 82;
LOG_A(GNB_APP, "updated DeltaNRf3:%d for deltaPrimaryBand \n", deltaPrimaryBand->DeltaNRf3); LOG_A(GNB_APP, "updated DeltaNRf3:%d for deltaPrimaryBand \n", deltaPrimaryBand->DeltaNRf3);
} }
if (req->Request.v.DeltaValues.DeltaPrimary.Ssb_NRf4.v.v.R15 == *RC.nrrrc[0]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB) if (req->Request.v.DeltaValues.DeltaPrimary.Ssb_NRf4.v.v.R15 == *RC.nrrrc[0]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB)
{ {
deltaPrimaryBand->DeltaNRf4 = RC.nrmac[0]->UE_info.ssb_rsrp + 82; deltaPrimaryBand->DeltaNRf4 = UE->ssb_rsrp + 82;
LOG_A(GNB_APP, "updated DeltaNRf4:%d for deltaPrimaryBand \n", deltaPrimaryBand->DeltaNRf4); LOG_A(GNB_APP, "updated DeltaNRf4:%d for deltaPrimaryBand \n", deltaPrimaryBand->DeltaNRf4);
} }
}
} }
else if ((get_softmodem_params()->numerology >= 2 && RC.ss.State == SS_STATE_CELL_ACTIVE) && (RC.nrmac[0]->UE_info.rsrpReportStatus)) else if ((get_softmodem_params()->numerology >= 2 && RC.ss.State == SS_STATE_CELL_ACTIVE) && (UE->rsrpReportStatus))
{ {
UE = find_nr_UE(&RC.nrmac[0]->UE_info, SS_context.ss_rnti_g);
if(UE->rsrpReportStatus){
LOG_A(GNB_APP, "[SYS-GNB] received SYSTEM_CTRL_REQ with DeltaValues in Active State for Secondary Band \n"); LOG_A(GNB_APP, "[SYS-GNB] received SYSTEM_CTRL_REQ with DeltaValues in Active State for Secondary Band \n");
if (req->Request.v.DeltaValues.DeltaSecondary.Ssb_NRf1.v.v.R15 == *RC.nrrrc[0]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB) if (req->Request.v.DeltaValues.DeltaSecondary.Ssb_NRf1.v.v.R15 == *RC.nrrrc[0]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB)
{ {
deltaSecondaryBand->DeltaNRf1 = RC.nrmac[0]->UE_info.ssb_rsrp + 82; deltaSecondaryBand->DeltaNRf1 = UE->ssb_rsrp + 82;
LOG_A(GNB_APP, "updated DeltaNRf1:%d for deltaSecondaryBand \n", deltaSecondaryBand->DeltaNRf1); LOG_A(GNB_APP, "updated DeltaNRf1:%d for deltaSecondaryBand \n", deltaSecondaryBand->DeltaNRf1);
} }
if (req->Request.v.DeltaValues.DeltaSecondary.Ssb_NRf2.v.v.R15 == *RC.nrrrc[0]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB) if (req->Request.v.DeltaValues.DeltaSecondary.Ssb_NRf2.v.v.R15 == *RC.nrrrc[0]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB)
{ {
deltaPrimaryBand->DeltaNRf2 = RC.nrmac[0]->UE_info.ssb_rsrp + 82; deltaPrimaryBand->DeltaNRf2 = UE->ssb_rsrp + 82;
LOG_A(GNB_APP, "updated DeltaNRf2:%d for deltaSecondaryBand \n", deltaSecondaryBand->DeltaNRf2); LOG_A(GNB_APP, "updated DeltaNRf2:%d for deltaSecondaryBand \n", deltaSecondaryBand->DeltaNRf2);
} }
if (req->Request.v.DeltaValues.DeltaSecondary.Ssb_NRf3.v.v.R15 == *RC.nrrrc[0]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB) if (req->Request.v.DeltaValues.DeltaSecondary.Ssb_NRf3.v.v.R15 == *RC.nrrrc[0]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB)
{ {
deltaPrimaryBand->DeltaNRf3 = RC.nrmac[0]->UE_info.ssb_rsrp + 82; deltaPrimaryBand->DeltaNRf3 = UE->ssb_rsrp + 82;
LOG_A(GNB_APP, "updated DeltaNRf3:%d for deltaSecondaryBand \n", deltaSecondaryBand->DeltaNRf3); LOG_A(GNB_APP, "updated DeltaNRf3:%d for deltaSecondaryBand \n", deltaSecondaryBand->DeltaNRf3);
} }
if (req->Request.v.DeltaValues.DeltaSecondary.Ssb_NRf4.v.v.R15 == *RC.nrrrc[0]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB) if (req->Request.v.DeltaValues.DeltaSecondary.Ssb_NRf4.v.v.R15 == *RC.nrrrc[0]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB)
{ {
deltaPrimaryBand->DeltaNRf4 = RC.nrmac[0]->UE_info.ssb_rsrp + 82; deltaPrimaryBand->DeltaNRf4 = UE->ssb_rsrp + 82;
LOG_A(GNB_APP, "updated DeltaNRf4:%d for deltaSecondaryBand \n", deltaSecondaryBand->DeltaNRf4); LOG_A(GNB_APP, "updated DeltaNRf4:%d for deltaSecondaryBand \n", deltaSecondaryBand->DeltaNRf4);
} }
}
} }
SS_NR_SYS_PORT_MSG_CNF(message_p).cnf = msgCnf; SS_NR_SYS_PORT_MSG_CNF(message_p).cnf = msgCnf;
......
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