Commit 88d548fb authored by Robert Schmidt's avatar Robert Schmidt

Remove aerial_phy_cqi_indication(): this is a 4G callback

parent 17ed5d34
......@@ -62,7 +62,7 @@ void *aerial_vnf_nr_p7_config_init(void *ptr)
p7_vnf->config->nr_uci_indication = &aerial_phy_nr_uci_indication;
p7_vnf->config->srs_indication = NULL;
p7_vnf->config->sr_indication = &aerial_phy_sr_indication;
p7_vnf->config->cqi_indication = &aerial_phy_cqi_indication;
p7_vnf->config->cqi_indication = NULL;
p7_vnf->config->lbt_dl_indication = &aerial_phy_lbt_dl_indication;
p7_vnf->config->nb_harq_indication = &aerial_phy_nb_harq_indication;
p7_vnf->config->nrach_indication = &aerial_phy_nrach_indication;
......
......@@ -433,100 +433,6 @@ int aerial_phy_sr_indication(struct nfapi_vnf_p7_config *config, nfapi_sr_indica
return 1;
}
static bool aerial_is_ue_same(uint16_t ue_id_1, uint16_t ue_id_2)
{
return (ue_id_1 == ue_id_2);
}
static void aerial_analyze_cqi_pdus_for_duplicates(nfapi_cqi_indication_t *ind)
{
uint16_t num_cqis = ind->cqi_indication_body.number_of_cqis;
assert(num_cqis <= NFAPI_CQI_IND_MAX_PDU);
for (int i = 0; i < num_cqis; i++) {
nfapi_cqi_indication_pdu_t *src_pdu = &ind->cqi_indication_body.cqi_pdu_list[i];
LOG_I(MAC,
"CQI_IND[PDU:%d][rnti:%x cqi:%d channel:%d]\n",
i,
src_pdu->rx_ue_information.rnti,
src_pdu->ul_cqi_information.ul_cqi,
src_pdu->ul_cqi_information.channel);
for (int j = i + 1; j < num_cqis; j++) {
uint16_t rnti_i = ind->cqi_indication_body.cqi_pdu_list[i].rx_ue_information.rnti;
uint16_t rnti_j = ind->cqi_indication_body.cqi_pdu_list[j].rx_ue_information.rnti;
if (aerial_is_ue_same(rnti_i, rnti_j)) {
LOG_E(MAC, "Problem, two cqis received from a single UE for rnti %x\n", rnti_i);
// abort(); This will be fixed in merge request which handles multiple CQIs.
}
}
}
}
int aerial_phy_cqi_indication(struct nfapi_vnf_p7_config *config, nfapi_cqi_indication_t *ind)
{
// vnf_p7_info* p7_vnf = (vnf_p7_info*)(config->user_data);
// mac_cqi_ind(p7_vnf->mac, ind);
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
LOG_D(MAC,
"%s() NFAPI SFN/SF:%d number_of_cqis:%u\n",
__FUNCTION__,
NFAPI_SFNSF2DEC(ind->sfn_sf),
ind->cqi_indication_body.number_of_cqis);
AssertFatal(pthread_mutex_lock(&eNB->UL_INFO_mutex) == 0, "Mutex lock failed");
if (NFAPI_MODE == NFAPI_MODE_VNF) {
int8_t index = NFAPI_SFNSF2SF(ind->sfn_sf);
UL_RCC_INFO.cqi_ind[index] = *ind;
assert(ind->cqi_indication_body.number_of_cqis <= NFAPI_CQI_IND_MAX_PDU);
if (ind->cqi_indication_body.number_of_cqis > 0) {
UL_RCC_INFO.cqi_ind[index].cqi_indication_body.cqi_pdu_list =
malloc(sizeof(nfapi_cqi_indication_pdu_t) * NFAPI_CQI_IND_MAX_PDU);
UL_RCC_INFO.cqi_ind[index].cqi_indication_body.cqi_raw_pdu_list =
malloc(sizeof(nfapi_cqi_indication_raw_pdu_t) * NFAPI_CQI_IND_MAX_PDU);
}
aerial_analyze_cqi_pdus_for_duplicates(ind);
assert(ind->cqi_indication_body.number_of_cqis <= NFAPI_CQI_IND_MAX_PDU);
for (int i = 0; i < ind->cqi_indication_body.number_of_cqis; i++) {
nfapi_cqi_indication_pdu_t *src_pdu = &ind->cqi_indication_body.cqi_pdu_list[i];
LOG_D(MAC,
"SR_IND[PDU:%d][rnti:%x cqi:%d channel:%d]\n",
i,
src_pdu->rx_ue_information.rnti,
src_pdu->ul_cqi_information.ul_cqi,
src_pdu->ul_cqi_information.channel);
memcpy(&UL_RCC_INFO.cqi_ind[index].cqi_indication_body.cqi_pdu_list[i], src_pdu, sizeof(nfapi_cqi_indication_pdu_t));
memcpy(&UL_RCC_INFO.cqi_ind[index].cqi_indication_body.cqi_raw_pdu_list[i],
&ind->cqi_indication_body.cqi_raw_pdu_list[i],
sizeof(nfapi_cqi_indication_raw_pdu_t));
}
} else {
nfapi_cqi_indication_t *dest_ind = &eNB->UL_INFO.cqi_ind;
*dest_ind = *ind;
dest_ind->cqi_indication_body.cqi_pdu_list = ind->cqi_indication_body.cqi_pdu_list;
dest_ind->cqi_indication_body.cqi_raw_pdu_list = ind->cqi_indication_body.cqi_raw_pdu_list;
assert(ind->cqi_indication_body.number_of_cqis <= NFAPI_CQI_IND_MAX_PDU);
for (int i = 0; i < ind->cqi_indication_body.number_of_cqis; i++) {
nfapi_cqi_indication_pdu_t *src_pdu = &ind->cqi_indication_body.cqi_pdu_list[i];
LOG_D(MAC,
"CQI_IND[PDU:%d][rnti:%x cqi:%d channel:%d]\n",
i,
src_pdu->rx_ue_information.rnti,
src_pdu->ul_cqi_information.ul_cqi,
src_pdu->ul_cqi_information.channel);
memcpy(&dest_ind->cqi_indication_body.cqi_pdu_list[i], src_pdu, sizeof(nfapi_cqi_indication_pdu_t));
memcpy(&dest_ind->cqi_indication_body.cqi_raw_pdu_list[i],
&ind->cqi_indication_body.cqi_raw_pdu_list[i],
sizeof(nfapi_cqi_indication_raw_pdu_t));
}
}
AssertFatal(pthread_mutex_unlock(&eNB->UL_INFO_mutex) == 0, "Mutex unlock failed");
return 1;
}
int aerial_phy_lbt_dl_indication(struct nfapi_vnf_p7_config *config, nfapi_lbt_dl_indication_t *ind)
{
// vnf_p7_info* p7_vnf = (vnf_p7_info*)(config->user_data);
......
......@@ -185,7 +185,6 @@ int aerial_phy_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind);
int aerial_phy_nr_rach_indication(nfapi_nr_rach_indication_t *ind);
int aerial_phy_nr_uci_indication(nfapi_nr_uci_indication_t *ind);
int aerial_phy_sr_indication(struct nfapi_vnf_p7_config *config, nfapi_sr_indication_t *ind);
int aerial_phy_cqi_indication(struct nfapi_vnf_p7_config *config, nfapi_cqi_indication_t *ind);
int aerial_phy_lbt_dl_indication(struct nfapi_vnf_p7_config *config, nfapi_lbt_dl_indication_t *ind);
int aerial_phy_nb_harq_indication(struct nfapi_vnf_p7_config *config, nfapi_nb_harq_indication_t *ind);
int aerial_phy_nrach_indication(struct nfapi_vnf_p7_config *config, nfapi_nrach_indication_t *ind);
......
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