From 0d865eea8a46e4b0e581bb662f2b041a987f5b04 Mon Sep 17 00:00:00 2001 From: Andrew Burger Date: Mon, 16 Nov 2020 11:50:27 -0800 Subject: [PATCH 1/2] merging --- openair2/PHY_INTERFACE/phy_stub_UE.c | 24 +++++++++++++++++++++++- targets/RT/USER/lte-ue.c | 2 +- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/openair2/PHY_INTERFACE/phy_stub_UE.c b/openair2/PHY_INTERFACE/phy_stub_UE.c index b2ab5cca24..398385d735 100644 --- a/openair2/PHY_INTERFACE/phy_stub_UE.c +++ b/openair2/PHY_INTERFACE/phy_stub_UE.c @@ -1253,13 +1253,35 @@ int memcpy_tx_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_tx_request_t *req) { return 0; } +static bool is_my_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) +{ + bool is_my_rnti = false; + const rnti_t rnti = UE_mac_inst[0].crnti; + nfapi_hi_dci0_request_body_t *hi_dci0_body = &hi_dci0_req->hi_dci0_request_body; + for (int i = 0; i < hi_dci0_body->number_of_dci + hi_dci0_body->number_of_hi; i++) + { + nfapi_hi_dci0_request_pdu_t *hi_dci0 = &hi_dci0_body->hi_dci0_pdu_list[i]; + if (hi_dci0->pdu_type != NFAPI_HI_DCI0_DCI_PDU_TYPE || hi_dci0->dci_pdu.dci_pdu_rel8.cqi_csi_request) + { + continue; + } + if (hi_dci0->dci_pdu.dci_pdu_rel8.rnti == rnti) + { + is_my_rnti = true; + break; + } + } + + return is_my_rnti; +} + int memcpy_hi_dci0_req (L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t* pnf_p7, nfapi_hi_dci0_request_t* req) { + if (!is_my_hi_dci0_req(req)) return 0; nfapi_hi_dci0_request_t *p = (nfapi_hi_dci0_request_t *)malloc(sizeof(nfapi_hi_dci0_request_t)); //if(req!=0){ - p->sfn_sf = req->sfn_sf; p->vendor_extension = req->vendor_extension; diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c index 7848e332d8..b2030e3ced 100644 --- a/targets/RT/USER/lte-ue.c +++ b/targets/RT/USER/lte-ue.c @@ -1197,7 +1197,7 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg) hi_dci0_req_UE_MAC(NFAPI_SFNSF2SFN(hi_dci0_req->sfn_sf), NFAPI_SFNSF2SF(hi_dci0_req->sfn_sf), pdu, - ue_num); + ue_num); // This function doesnt do anything? - Andrew } } From 206fd09bd6074908052b4666e4b12f11862af451 Mon Sep 17 00:00:00 2001 From: Andrew Burger Date: Mon, 16 Nov 2020 15:33:23 -0800 Subject: [PATCH 2/2] Adding comments for less confusion --- openair2/PHY_INTERFACE/phy_stub_UE.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair2/PHY_INTERFACE/phy_stub_UE.c b/openair2/PHY_INTERFACE/phy_stub_UE.c index 398385d735..67833b442f 100644 --- a/openair2/PHY_INTERFACE/phy_stub_UE.c +++ b/openair2/PHY_INTERFACE/phy_stub_UE.c @@ -975,7 +975,7 @@ static bool is_my_dl_config_req(const nfapi_dl_config_request_t *req) static int get_dlsch_pdu_indicies(const nfapi_dl_config_request_t *req, int *pdu_indicies, size_t max_pdu_indicies) { - const rnti_t my_rnti = UE_mac_inst[0].crnti; + const rnti_t my_rnti = UE_mac_inst[0].crnti; // This is 0 representing the num_ues is 1 int num_pdus = req->dl_config_request_body.number_pdu; size_t num_pdu_indicies = 0; for (int i = 0; i < num_pdus; i++) @@ -1256,7 +1256,7 @@ int memcpy_tx_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_tx_request_t *req) { static bool is_my_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) { bool is_my_rnti = false; - const rnti_t rnti = UE_mac_inst[0].crnti; + const rnti_t rnti = UE_mac_inst[0].crnti; // This is 0 representing the num_ues is 1 nfapi_hi_dci0_request_body_t *hi_dci0_body = &hi_dci0_req->hi_dci0_request_body; for (int i = 0; i < hi_dci0_body->number_of_dci + hi_dci0_body->number_of_hi; i++) {