Commit 07552604 authored by Vaibhav Shrivastava's avatar Vaibhav Shrivastava Committed by jperaldi

Correction of PhyId in Tx Req

parent 41655207
...@@ -1987,28 +1987,17 @@ int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) ...@@ -1987,28 +1987,17 @@ int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req)
{ {
nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config; nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config;
int retval = 0; int retval = 0;
int num_phy = 0;
uint16_t sfn = 0; uint16_t sfn = 0;
uint16_t sf = 0; uint16_t sf = 0;
sfn = tx_req->sfn_sf >> 4; sfn = tx_req->sfn_sf >> 4;
sf = tx_req->sfn_sf & 0xF; sf = tx_req->sfn_sf & 0xF;
/* Below if condition checking if tx_req is for MIB (sf == 0) or SIB1 ((sfn % 2 == 0) && (sf == 5)) */ tx_req->header.message_id = NFAPI_TX_REQUEST;
if ((sf == 0) || ((sfn % 2 == 0) && (sf == 5))) //LOG_D(PHY, "[VNF] %s() TX_REQ sfn_sf:%d number_of_pdus:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(tx_req->sfn_sf), tx_req->tx_request_body.number_of_pdus);
num_phy = vnf.pnfs[0].num_phys; LOG_I(NFAPI_VNF, "MultiCell: fxn:%s phy_id:%d sfn:%d sf:%d \n", __FUNCTION__, tx_req->header.phy_id, sfn, sf);
else retval = nfapi_vnf_p7_tx_req(p7_config, tx_req);
num_phy = 1; if (retval!=0) {
LOG_E(PHY, "%s() Problem sending tx_req for phyId:%d :%d\n", __FUNCTION__, tx_req->header.phy_id ,retval);
for (int i =0; i< num_phy; i++)
{
tx_req->header.phy_id = i+1; // DJP HACK TODO FIXME - need to pass this around!!!!
tx_req->header.message_id = NFAPI_TX_REQUEST;
//LOG_D(PHY, "[VNF] %s() TX_REQ sfn_sf:%d number_of_pdus:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(tx_req->sfn_sf), tx_req->tx_request_body.number_of_pdus);
LOG_I(NFAPI_VNF, "MultiCell: fxn:%s num_phy:%d phy_id:%d sfn:%d sf:%d \n", __FUNCTION__, num_phy, tx_req->header.phy_id, sfn, sf);
retval = nfapi_vnf_p7_tx_req(p7_config, tx_req);
if (retval!=0) {
LOG_E(PHY, "%s() Problem sending tx_req for phyId:%d :%d\n", __FUNCTION__, tx_req->header.phy_id ,retval);
}
} }
tx_req->tx_request_body.number_of_pdus = 0; tx_req->tx_request_body.number_of_pdus = 0;
......
...@@ -961,6 +961,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO, void *arg) { ...@@ -961,6 +961,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO, void *arg) {
if ((NFAPI_MODE!=NFAPI_MONOLITHIC) && do_oai && !dont_send) { if ((NFAPI_MODE!=NFAPI_MONOLITHIC) && do_oai && !dont_send) {
if(Sched_INFO->TX_req->tx_request_body.number_of_pdus > 0) { if(Sched_INFO->TX_req->tx_request_body.number_of_pdus > 0) {
Sched_INFO->TX_req->sfn_sf = frame << 4 | subframe; Sched_INFO->TX_req->sfn_sf = frame << 4 | subframe;
Sched_INFO->TX_req->header.phy_id = Sched_INFO->CC_id+1;
oai_nfapi_tx_req(Sched_INFO->TX_req); oai_nfapi_tx_req(Sched_INFO->TX_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