Remove check for NFAPI_MODE_AERIAL, it's pointless
In Aerial bindings (FAPI-Aerial), the NFAPI mode must be
NFAPI_MODE_AERIAL (otherwise, we would not be executing this code).
Hence, the switches don't make sense. Remove them.
The check can more easily be checked with
git show <commit> --ignore-all-space
This commit is contained in:
@@ -41,7 +41,6 @@ extern int nfapi_sync_var;
|
|||||||
|
|
||||||
int aerial_phy_nr_crc_indication(nfapi_nr_crc_indication_t *ind)
|
int aerial_phy_nr_crc_indication(nfapi_nr_crc_indication_t *ind)
|
||||||
{
|
{
|
||||||
if (NFAPI_MODE == NFAPI_MODE_AERIAL) {
|
|
||||||
nfapi_nr_crc_indication_t *crc_ind = CALLOC(1, sizeof(*crc_ind));
|
nfapi_nr_crc_indication_t *crc_ind = CALLOC(1, sizeof(*crc_ind));
|
||||||
crc_ind->header.message_id = ind->header.message_id;
|
crc_ind->header.message_id = ind->header.message_id;
|
||||||
crc_ind->number_crcs = ind->number_crcs;
|
crc_ind->number_crcs = ind->number_crcs;
|
||||||
@@ -77,15 +76,11 @@ int aerial_phy_nr_crc_indication(nfapi_nr_crc_indication_t *ind)
|
|||||||
free(crc_ind->crc_list);
|
free(crc_ind->crc_list);
|
||||||
free(crc_ind);
|
free(crc_ind);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
LOG_E(NR_MAC, "NFAPI_MODE = %d not NFAPI_MODE_AERIAL(3)\n", nfapi_getmode());
|
|
||||||
}
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int aerial_phy_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind)
|
int aerial_phy_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind)
|
||||||
{
|
{
|
||||||
if (NFAPI_MODE == NFAPI_MODE_AERIAL) {
|
|
||||||
nfapi_nr_rx_data_indication_t *rx_ind = CALLOC(1, sizeof(*rx_ind));
|
nfapi_nr_rx_data_indication_t *rx_ind = CALLOC(1, sizeof(*rx_ind));
|
||||||
rx_ind->header.message_id = ind->header.message_id;
|
rx_ind->header.message_id = ind->header.message_id;
|
||||||
rx_ind->sfn = ind->sfn;
|
rx_ind->sfn = ind->sfn;
|
||||||
@@ -123,15 +118,11 @@ int aerial_phy_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind)
|
|||||||
free(rx_ind->pdu_list);
|
free(rx_ind->pdu_list);
|
||||||
free(rx_ind);
|
free(rx_ind);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
LOG_E(NR_MAC, "NFAPI_MODE = %d not NFAPI_MODE_AERIAL(3)\n", nfapi_getmode());
|
|
||||||
}
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int aerial_phy_nr_rach_indication(nfapi_nr_rach_indication_t *ind)
|
int aerial_phy_nr_rach_indication(nfapi_nr_rach_indication_t *ind)
|
||||||
{
|
{
|
||||||
if (NFAPI_MODE == NFAPI_MODE_AERIAL) {
|
|
||||||
nfapi_nr_rach_indication_t *rach_ind = CALLOC(1, sizeof(*rach_ind));
|
nfapi_nr_rach_indication_t *rach_ind = CALLOC(1, sizeof(*rach_ind));
|
||||||
rach_ind->header.message_id = ind->header.message_id;
|
rach_ind->header.message_id = ind->header.message_id;
|
||||||
rach_ind->sfn = ind->sfn;
|
rach_ind->sfn = ind->sfn;
|
||||||
@@ -163,15 +154,11 @@ int aerial_phy_nr_rach_indication(nfapi_nr_rach_indication_t *ind)
|
|||||||
} else {
|
} else {
|
||||||
LOG_I(NR_MAC, "RACH.indication put_queue successfull\n");
|
LOG_I(NR_MAC, "RACH.indication put_queue successfull\n");
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
LOG_E(NR_MAC, "NFAPI_MODE = %d not NFAPI_MODE_AERIAL(3)\n", nfapi_getmode());
|
|
||||||
}
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int aerial_phy_nr_uci_indication(nfapi_nr_uci_indication_t *ind)
|
int aerial_phy_nr_uci_indication(nfapi_nr_uci_indication_t *ind)
|
||||||
{
|
{
|
||||||
if (NFAPI_MODE == NFAPI_MODE_AERIAL) {
|
|
||||||
nfapi_nr_uci_indication_t *uci_ind = CALLOC(1, sizeof(*uci_ind));
|
nfapi_nr_uci_indication_t *uci_ind = CALLOC(1, sizeof(*uci_ind));
|
||||||
AssertFatal(uci_ind, "Memory not allocated for uci_ind in phy_nr_uci_indication.");
|
AssertFatal(uci_ind, "Memory not allocated for uci_ind in phy_nr_uci_indication.");
|
||||||
*uci_ind = *ind;
|
*uci_ind = *ind;
|
||||||
@@ -270,9 +257,6 @@ int aerial_phy_nr_uci_indication(nfapi_nr_uci_indication_t *ind)
|
|||||||
free(uci_ind);
|
free(uci_ind);
|
||||||
uci_ind = NULL;
|
uci_ind = NULL;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
LOG_E(NR_MAC, "NFAPI_MODE = %d not NFAPI_MODE_AERIAL(3)\n", nfapi_getmode());
|
|
||||||
}
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -292,7 +276,7 @@ int trigger_scheduler(nfapi_nr_slot_indication_scf_t *slot_ind)
|
|||||||
// Call into the scheduler (this is hardcoded and should be init properly!)
|
// Call into the scheduler (this is hardcoded and should be init properly!)
|
||||||
// memset(sched_resp, 0, sizeof(*sched_resp));
|
// memset(sched_resp, 0, sizeof(*sched_resp));
|
||||||
gNB_dlsch_ulsch_scheduler(0, slot_ind->sfn, slot_ind->slot, &g_sched_resp);
|
gNB_dlsch_ulsch_scheduler(0, slot_ind->sfn, slot_ind->slot, &g_sched_resp);
|
||||||
if (NFAPI_MODE == NFAPI_MODE_AERIAL) {
|
|
||||||
bool send_slt_resp = false;
|
bool send_slt_resp = false;
|
||||||
if (g_sched_resp.DL_req.dl_tti_request_body.nPDUs> 0) {
|
if (g_sched_resp.DL_req.dl_tti_request_body.nPDUs> 0) {
|
||||||
oai_fapi_dl_tti_req(&g_sched_resp.DL_req);
|
oai_fapi_dl_tti_req(&g_sched_resp.DL_req);
|
||||||
@@ -313,7 +297,6 @@ int trigger_scheduler(nfapi_nr_slot_indication_scf_t *slot_ind)
|
|||||||
if (send_slt_resp) {
|
if (send_slt_resp) {
|
||||||
oai_fapi_send_end_request(0,slot_ind->sfn, slot_ind->slot);
|
oai_fapi_send_end_request(0,slot_ind->sfn, slot_ind->slot);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user