Commit a1f7e52b authored by hsum's avatar hsum

modify tx_data_req_fn function input by value (not by address)

parent f02cd05a
...@@ -686,7 +686,7 @@ typedef struct nfapi_pnf_p7_config ...@@ -686,7 +686,7 @@ typedef struct nfapi_pnf_p7_config
* will 'keep' the pointers until they are transmitted the callee should set the pointers in the req to 0 * will 'keep' the pointers until they are transmitted the callee should set the pointers in the req to 0
* and then use the p7 codec config free function to release the pdu's when appropriate. * and then use the p7 codec config free function to release the pdu's when appropriate.
*/ */
int (*tx_data_req_fn)(nfapi_pnf_p7_config_t* config, nfapi_nr_tx_data_request_t* req); int (*tx_data_req_fn)(nfapi_pnf_p7_config_t* config, nfapi_nr_tx_data_request_t req);
int (*tx_req)(nfapi_pnf_p7_config_t* config, nfapi_tx_request_t* req); int (*tx_req)(nfapi_pnf_p7_config_t* config, nfapi_tx_request_t* req);
/*! A callback for the LBT_DL_CONFIG.request /*! A callback for the LBT_DL_CONFIG.request
......
...@@ -814,7 +814,7 @@ void send_dummy_slot(pnf_p7_t* pnf_p7, uint16_t sfn, uint16_t slot) ...@@ -814,7 +814,7 @@ void send_dummy_slot(pnf_p7_t* pnf_p7, uint16_t sfn, uint16_t slot)
pnf_p7->_public.dummy_slot.tx_data_req.SFN = sfn; pnf_p7->_public.dummy_slot.tx_data_req.SFN = sfn;
pnf_p7->_public.dummy_slot.tx_data_req.Slot = slot; pnf_p7->_public.dummy_slot.tx_data_req.Slot = slot;
//NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy tx_req - enter\n"); //NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy tx_req - enter\n");
(pnf_p7->_public.tx_data_req_fn)(&pnf_p7->_public, &pnf_p7->_public.dummy_slot.tx_data_req); (pnf_p7->_public.tx_data_req_fn)(&pnf_p7->_public, pnf_p7->_public.dummy_slot.tx_data_req);
//NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy tx_req - exit\n"); //NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy tx_req - exit\n");
} }
if(pnf_p7->_public.dl_tti_req_fn && pnf_p7->_public.dummy_slot.dl_tti_req) if(pnf_p7->_public.dl_tti_req_fn && pnf_p7->_public.dummy_slot.dl_tti_req)
...@@ -971,17 +971,17 @@ int pnf_p7_slot_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn, uint16_t sl ...@@ -971,17 +971,17 @@ int pnf_p7_slot_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn, uint16_t sl
(pnf_p7->_public.ul_tti_req_fn)(NULL, &(pnf_p7->_public), tx_slot_buffer->ul_tti_req); (pnf_p7->_public.ul_tti_req_fn)(NULL, &(pnf_p7->_public), tx_slot_buffer->ul_tti_req);
} }
LOG_I(NFAPI_PNF, "Get address: %p\n",&(pnf_p7->slot_buffer[buffer_index_tx].tx_data_req));
LOG_I(NFAPI_PNF, "[%d]tx_slot_buffer.tx_data_req.SFN: %d ; *current* sfn_tx: %d\n",buffer_index_tx, tx_slot_buffer->tx_data_req.SFN,sfn_tx);
LOG_I(NFAPI_PNF, "[%d]tx_slot_buffer.tx_data_req.Slot: %d ; *current* slot_tx: %d\n",buffer_index_tx, tx_slot_buffer->tx_data_req.Slot,slot_tx);
if(tx_slot_buffer->tx_data_req.SFN == sfn_tx && tx_slot_buffer->tx_data_req.Slot == slot_tx) if(tx_slot_buffer->tx_data_req.SFN == sfn_tx && tx_slot_buffer->tx_data_req.Slot == slot_tx)
{ {
LOG_I(NFAPI_PNF, "Get address: %p\n",&(pnf_p7->slot_buffer[buffer_index_tx].tx_data_req));
LOG_I(NFAPI_PNF, "[%d]tx_slot_buffer.tx_data_req.SFN: %d ; *current* sfn_tx: %d\n",buffer_index_tx, tx_slot_buffer->tx_data_req.SFN,sfn_tx);
LOG_I(NFAPI_PNF, "[%d]tx_slot_buffer.tx_data_req.Slot: %d ; *current* slot_tx: %d\n",buffer_index_tx, tx_slot_buffer->tx_data_req.Slot,slot_tx);
DevAssert(pnf_p7->_public.tx_data_req_fn != NULL); DevAssert(pnf_p7->_public.tx_data_req_fn != NULL);
LOG_I(PHY, "Process tx_data SFN/slot %d.%d buffer index: %d \n",sfn_tx,slot_tx,buffer_index_tx); LOG_I(PHY, "Process tx_data SFN/slot %d.%d buffer index: %d \n",sfn_tx,slot_tx,buffer_index_tx);
// pnf_phy_tx_data_req() // pnf_phy_tx_data_req()
(pnf_p7->_public.tx_data_req_fn)(&(pnf_p7->_public), &tx_slot_buffer->tx_data_req); (pnf_p7->_public.tx_data_req_fn)(&(pnf_p7->_public), tx_slot_buffer->tx_data_req);
} }
...@@ -2004,13 +2004,6 @@ void pnf_handle_tx_data_request(void* pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_p7 ...@@ -2004,13 +2004,6 @@ void pnf_handle_tx_data_request(void* pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_p7
struct timespec t; struct timespec t;
clock_gettime(CLOCK_MONOTONIC, &t); clock_gettime(CLOCK_MONOTONIC, &t);
//NFAPI_TRACE(NFAPI_TRACE_INFO,"%s() %ld.%09ld POPULATE TX_DATA_REQ sfn_sf:%d buffer_index:%d\n", __FUNCTION__, t.tv_sec, t.tv_nsec, sfn_slot_dec, buffer_index);
#if 0
if (0 && NFAPI_SFNSF2DEC(req->sfn_sf)%100==0) NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() TX_REQ.req sfn_sf:%d pdus:%d - TX_REQ is within window\n",
__FUNCTION__,
NFAPI_SFNSF2DEC(req->sfn_sf),
req->tx_request_body.number_of_pdus);
#endif
pnf_p7->slot_buffer[buffer_index].sfn = req.SFN; pnf_p7->slot_buffer[buffer_index].sfn = req.SFN;
pnf_p7->slot_buffer[buffer_index].slot = req.Slot; pnf_p7->slot_buffer[buffer_index].slot = req.Slot;
cp_nr_tx_data_req(&pnf_p7->slot_buffer[buffer_index].tx_data_req, &req); cp_nr_tx_data_req(&pnf_p7->slot_buffer[buffer_index].tx_data_req, &req);
......
...@@ -183,14 +183,14 @@ void nr_schedule_ul_tti_req(PHY_VARS_gNB *gNB, nfapi_nr_ul_tti_request_t *UL_tti ...@@ -183,14 +183,14 @@ void nr_schedule_ul_tti_req(PHY_VARS_gNB *gNB, nfapi_nr_ul_tti_request_t *UL_tti
} }
} }
void nr_schedule_tx_req(PHY_VARS_gNB *gNB, nfapi_nr_tx_data_request_t *TX_req) void nr_schedule_tx_req(PHY_VARS_gNB *gNB, nfapi_nr_tx_data_request_t TX_req)
{ {
DevAssert(gNB != NULL); DevAssert(gNB != NULL);
DevAssert(TX_req != NULL); // DevAssert(TX_req != NULL);
processingData_L1tx_t *msgTx = gNB->msgDataTx; processingData_L1tx_t *msgTx = gNB->msgDataTx;
for (int idx = 0; idx < TX_req->Number_of_PDUs; ++idx) { for (int idx = 0; idx < TX_req.Number_of_PDUs; ++idx) {
uint8_t *sdu = (uint8_t *)TX_req->pdu_list[idx].TLVs[0].value.direct; uint8_t *sdu = (uint8_t *)TX_req.pdu_list[idx].TLVs[0].value.direct;
nr_fill_dlsch_tx_req(msgTx, idx, sdu); nr_fill_dlsch_tx_req(msgTx, idx, sdu);
} }
} }
...@@ -238,7 +238,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO) ...@@ -238,7 +238,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO)
nr_schedule_ul_tti_req(gNB, &Sched_INFO->UL_tti_req); nr_schedule_ul_tti_req(gNB, &Sched_INFO->UL_tti_req);
if (is_dl) { if (is_dl) {
nr_schedule_tx_req(gNB, &Sched_INFO->TX_req); nr_schedule_tx_req(gNB, Sched_INFO->TX_req);
nr_schedule_ul_dci_req(gNB, &Sched_INFO->UL_dci_req); nr_schedule_ul_dci_req(gNB, &Sched_INFO->UL_dci_req);
} }
......
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