Commit 9f781408 authored by David Price's avatar David Price

Fails at the point core sends Identity Request to UE

parent 3a7456df
...@@ -964,7 +964,7 @@ int pnf_phy_hi_dci0_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_hi_dci0_request_t* ...@@ -964,7 +964,7 @@ int pnf_phy_hi_dci0_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_hi_dci0_request_t*
int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_dl_config_request_t* req) int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_dl_config_request_t* req)
{ {
LOG_D(PHY,"[PNF] dl config request sfn_sf:%d pdcch:%u dci:%u pdu:%d pdsch_rnti:%d pcfich:%u RC.ru:%p RC.eNB:%p sync_var:%d\n", NFAPI_SFNSF2DEC(req->sfn_sf), req->dl_config_request_body.number_pdcch_ofdm_symbols, req->dl_config_request_body.number_dci, req->dl_config_request_body.number_pdu, req->dl_config_request_body.number_pdsch_rnti, req->dl_config_request_body.transmission_power_pcfich, RC.ru, RC.eNB, sync_var); LOG_D(PHY,"[PNF] %s() sfn_sf:%d pdcch:%u dl_cfg[dci:%u pdus:%d pdsch_rnti:%d] pcfich:%u\n", __FUNCTION__,NFAPI_SFNSF2DEC(req->sfn_sf), req->dl_config_request_body.number_pdcch_ofdm_symbols, req->dl_config_request_body.number_dci, req->dl_config_request_body.number_pdu, req->dl_config_request_body.number_pdsch_rnti, req->dl_config_request_body.transmission_power_pcfich);
if (RC.ru == 0) if (RC.ru == 0)
{ {
...@@ -1038,10 +1038,11 @@ int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_dl_config_request ...@@ -1038,10 +1038,11 @@ int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_dl_config_request
{ {
nfapi_dl_config_dlsch_pdu *dlsch_pdu = &dl_config_pdu_list[i].dlsch_pdu; nfapi_dl_config_dlsch_pdu *dlsch_pdu = &dl_config_pdu_list[i].dlsch_pdu;
nfapi_dl_config_dlsch_pdu_rel8_t *rel8_pdu = &dlsch_pdu->dlsch_pdu_rel8; nfapi_dl_config_dlsch_pdu_rel8_t *rel8_pdu = &dlsch_pdu->dlsch_pdu_rel8;
nfapi_tx_request_pdu_t *tx_pdu = tx_request_pdu[sfn][sf][rel8_pdu->pdu_index];
if (tx_request_pdu[sfn][sf][rel8_pdu->pdu_index] != NULL) if (tx_pdu != NULL)
{ {
uint8_t *dlsch_sdu = malloc(tx_request_pdu[sfn][sf][rel8_pdu->pdu_index]->segments[0].segment_length); uint8_t *dlsch_sdu = malloc(tx_pdu->segments[0].segment_length);
// ********************************************************************** // **********************************************************************
// THIS IS CREATING AN INTENTIONAL LEAK - I think... // THIS IS CREATING AN INTENTIONAL LEAK - I think...
...@@ -1053,7 +1054,7 @@ int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_dl_config_request ...@@ -1053,7 +1054,7 @@ int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_dl_config_request
// I THINK I NEED TO FIX THIS - unless it IS getting freed by the stack // I THINK I NEED TO FIX THIS - unless it IS getting freed by the stack
// //
// ********************************************************************** // **********************************************************************
memcpy(dlsch_sdu, tx_request_pdu[sfn][sf][rel8_pdu->pdu_index]->segments[0].segment_data, tx_request_pdu[sfn][sf][rel8_pdu->pdu_index]->segments[0].segment_length); memcpy(dlsch_sdu, tx_pdu->segments[0].segment_data, tx_pdu->segments[0].segment_length);
//NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() DLSCH:pdu_index:%d handle_nfapi_dlsch_pdu(eNB, proc_rxtx, dlsch_pdu, transport_blocks:%d sdu:%p) eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols:%d\n", __FUNCTION__, rel8_pdu->pdu_index, rel8_pdu->transport_blocks, dlsch_sdu, eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols); //NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() DLSCH:pdu_index:%d handle_nfapi_dlsch_pdu(eNB, proc_rxtx, dlsch_pdu, transport_blocks:%d sdu:%p) eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols:%d\n", __FUNCTION__, rel8_pdu->pdu_index, rel8_pdu->transport_blocks, dlsch_sdu, eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols);
...@@ -1086,13 +1087,13 @@ int pnf_phy_tx_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_tx_request_t* req) ...@@ -1086,13 +1087,13 @@ int pnf_phy_tx_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_tx_request_t* req)
uint16_t sfn = NFAPI_SFNSF2SFN(req->sfn_sf); uint16_t sfn = NFAPI_SFNSF2SFN(req->sfn_sf);
uint16_t sf = NFAPI_SFNSF2SF(req->sfn_sf); uint16_t sf = NFAPI_SFNSF2SF(req->sfn_sf);
LOG_D(PHY,"%s() SFN/SF:%d/%d PDUs:%d\n", __FUNCTION__, sfn, sf, req->tx_request_body.number_of_pdus); LOG_D(PHY,"%s() SFN/SF:%d%d PDUs:%d\n", __FUNCTION__, sfn, sf, req->tx_request_body.number_of_pdus);
if (req->tx_request_body.tl.tag==NFAPI_TX_REQUEST_BODY_TAG) if (req->tx_request_body.tl.tag==NFAPI_TX_REQUEST_BODY_TAG)
{ {
for (int i=0; i<req->tx_request_body.number_of_pdus; i++) for (int i=0; i<req->tx_request_body.number_of_pdus; i++)
{ {
LOG_D(PHY,"%s() SFN/SF:%d/%d number_of_pdus:%d [PDU:%d] pdu_length:%d pdu_index:%d num_segments:%d\n", LOG_D(PHY,"%s() SFN/SF:%d%d number_of_pdus:%d [PDU:%d] pdu_length:%d pdu_index:%d num_segments:%d\n",
__FUNCTION__, __FUNCTION__,
sfn, sf, sfn, sf,
req->tx_request_body.number_of_pdus, req->tx_request_body.number_of_pdus,
...@@ -1149,7 +1150,7 @@ int pnf_phy_ul_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_ul_config_request ...@@ -1149,7 +1150,7 @@ int pnf_phy_ul_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_ul_config_request
for (int i=0;i<req->ul_config_request_body.number_of_pdus;i++) for (int i=0;i<req->ul_config_request_body.number_of_pdus;i++)
{ {
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() sfn/sf:%d PDU[%d] size:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(req->sfn_sf), i, ul_config_pdu_list[i].pdu_size); LOG_D(PHY, "%s() sfn/sf:%d PDU[%d] size:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(req->sfn_sf), i, ul_config_pdu_list[i].pdu_size);
if ( if (
ul_config_pdu_list[i].pdu_type == NFAPI_UL_CONFIG_ULSCH_PDU_TYPE || ul_config_pdu_list[i].pdu_type == NFAPI_UL_CONFIG_ULSCH_PDU_TYPE ||
...@@ -1161,7 +1162,7 @@ int pnf_phy_ul_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_ul_config_request ...@@ -1161,7 +1162,7 @@ int pnf_phy_ul_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_ul_config_request
ul_config_pdu_list[i].pdu_type == NFAPI_UL_CONFIG_UCI_SR_HARQ_PDU_TYPE ul_config_pdu_list[i].pdu_type == NFAPI_UL_CONFIG_UCI_SR_HARQ_PDU_TYPE
) )
{ {
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() handle_nfapi_ul_pdu() for PDU:%d\n", __FUNCTION__, i); LOG_D(PHY, "%s() handle_nfapi_ul_pdu() for PDU:%d\n", __FUNCTION__, i);
handle_nfapi_ul_pdu(eNB,proc,&ul_config_pdu_list[i],curr_sfn,curr_sf,req->ul_config_request_body.srs_present); handle_nfapi_ul_pdu(eNB,proc,&ul_config_pdu_list[i],curr_sfn,curr_sf,req->ul_config_request_body.srs_present);
} }
...@@ -1871,3 +1872,16 @@ int oai_nfapi_rx_ind(nfapi_rx_indication_t *ind) ...@@ -1871,3 +1872,16 @@ int oai_nfapi_rx_ind(nfapi_rx_indication_t *ind)
return retval; return retval;
} }
int oai_nfapi_sr_indication(nfapi_sr_indication_t *ind)
{
ind->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
int retval = nfapi_pnf_p7_sr_ind(p7_config_g, ind);
LOG_E(PHY,"%s() retval:%d\n", __FUNCTION__, retval);
//free(ind.rx_indication_body.rx_pdu_list);
return retval;
}
...@@ -532,7 +532,7 @@ int wake_eNB_rxtx(PHY_VARS_eNB *eNB, uint16_t sfn, uint16_t sf) ...@@ -532,7 +532,7 @@ int wake_eNB_rxtx(PHY_VARS_eNB *eNB, uint16_t sfn, uint16_t sf)
old_sf = sf; old_sf = sf;
old_sfn = sfn; old_sfn = sfn;
if (old_sf == 0 && old_sfn % 100==0) LOG_W( PHY,"[eNB] sfn/sf:%d:%d old_sfn/sf:%d:%d proc[frame_rx:%d subframe_rx:%d]\n", sfn, sf, old_sfn, old_sf, proc->frame_rx, proc->subframe_rx); if (old_sf == 0 && old_sfn % 100==0) LOG_W( PHY,"[eNB] sfn/sf:%d%d old_sfn/sf:%d%d proc[rx:%d%d]\n", sfn, sf, old_sfn, old_sf, proc->frame_rx, proc->subframe_rx);
} }
++proc_rxtx->instance_cnt_rxtx; ++proc_rxtx->instance_cnt_rxtx;
...@@ -551,7 +551,7 @@ int wake_eNB_rxtx(PHY_VARS_eNB *eNB, uint16_t sfn, uint16_t sf) ...@@ -551,7 +551,7 @@ int wake_eNB_rxtx(PHY_VARS_eNB *eNB, uint16_t sfn, uint16_t sf)
proc_rxtx->frame_tx = (proc_rxtx->subframe_rx > (9-sf_ahead)) ? (proc_rxtx->frame_rx+1)&1023 : proc_rxtx->frame_rx; proc_rxtx->frame_tx = (proc_rxtx->subframe_rx > (9-sf_ahead)) ? (proc_rxtx->frame_rx+1)&1023 : proc_rxtx->frame_rx;
proc_rxtx->subframe_tx = (proc_rxtx->subframe_rx + sf_ahead)%10; proc_rxtx->subframe_tx = (proc_rxtx->subframe_rx + sf_ahead)%10;
LOG_E(PHY, "sfn/sf:%d:%d proc[frame_rx:%d subframe_rx:%d timestamp_rx:%ld timestamp_tx:%ld] proc_rxtx[instance_cnt_rxtx:%d frame_rx:%d subframe_rx:%d]\n", sfn, sf, proc->frame_rx, proc->subframe_rx, proc->timestamp_rx, proc->timestamp_tx, proc_rxtx->instance_cnt_rxtx, proc_rxtx->frame_rx, proc_rxtx->subframe_rx); LOG_D(PHY, "sfn/sf:%d%d proc[rx:%d%d] proc_rxtx[instance_cnt_rxtx:%d rx:%d%d]\n\n", sfn, sf, proc->frame_rx, proc->subframe_rx, proc_rxtx->instance_cnt_rxtx, proc_rxtx->frame_rx, proc_rxtx->subframe_rx);
// the thread can now be woken up // the thread can now be woken up
if (pthread_cond_signal(&proc_rxtx->cond_rxtx) != 0) { if (pthread_cond_signal(&proc_rxtx->cond_rxtx) != 0) {
...@@ -560,7 +560,9 @@ int wake_eNB_rxtx(PHY_VARS_eNB *eNB, uint16_t sfn, uint16_t sf) ...@@ -560,7 +560,9 @@ int wake_eNB_rxtx(PHY_VARS_eNB *eNB, uint16_t sfn, uint16_t sf)
return(-1); return(-1);
} }
//LOG_D(PHY,"%s() About to attempt pthread_mutex_unlock\n", __FUNCTION__);
pthread_mutex_unlock( &proc_rxtx->mutex_rxtx ); pthread_mutex_unlock( &proc_rxtx->mutex_rxtx );
//LOG_D(PHY,"%s() UNLOCKED pthread_mutex_unlock\n", __FUNCTION__);
return(0); return(0);
} }
...@@ -775,10 +777,34 @@ int phy_srs_indication(struct nfapi_vnf_p7_config* config, nfapi_srs_indication_ ...@@ -775,10 +777,34 @@ int phy_srs_indication(struct nfapi_vnf_p7_config* config, nfapi_srs_indication_
} }
int phy_sr_indication(struct nfapi_vnf_p7_config* config, nfapi_sr_indication_t* ind) int phy_sr_indication(struct nfapi_vnf_p7_config* config, nfapi_sr_indication_t* ind)
{ {
// vnf_p7_info* p7_vnf = (vnf_p7_info*)(config->user_data);
//mac_sr_ind(p7_vnf->mac, ind); struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
return 1;
LOG_D(MAC, "%s() NFAPI SFN/SF:%d srs:%d\n", NFAPI_SFNSF2DEC(ind->sfn_sf), ind->sr_indication_body.number_of_srs);
pthread_mutex_lock(&eNB->UL_INFO_mutex);
nfapi_sr_indication_t *dest_ind = &eNB->UL_INFO.sr_ind;
nfapi_rx_indication_pdu_t *dest_pdu_list = eNB->sr_pdu_list;
*dest_ind = *ind;
dest_ind->sr_indication_body.sr_pdu_list = dest_pdu_list;
for (i=0;i<UL_info->sr_ind.sr_indication_body.number_of_srs;i++)
{
nfapi_sr_indication_pdu_t *dest_pdu = &dest_ind->sr_indication_body.sr_pdu_list[i];
nfapi_sr_indication_pdu_t *src_pdu = &ind->sr_indication_body.sr_pdu_list[i];
memcpy(dest_pdu, src_pdu, sizeof(*src_pdu));
}
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
// vnf_p7_info* p7_vnf = (vnf_p7_info*)(config->user_data);
//mac_sr_ind(p7_vnf->mac, ind);
return 1;
} }
int phy_cqi_indication(struct nfapi_vnf_p7_config* config, nfapi_cqi_indication_t* ind) int 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); // vnf_p7_info* p7_vnf = (vnf_p7_info*)(config->user_data);
...@@ -1354,15 +1380,20 @@ int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) ...@@ -1354,15 +1380,20 @@ int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req)
dl_config_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!! dl_config_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
//dl_config_req->header.message_id = NFAPI_DL_CONFIG_BCH_PDU_TYPE; //dl_config_req->header.message_id = NFAPI_DL_CONFIG_BCH_PDU_TYPE;
//NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() header message_id:%02x\n", __FUNCTION__, dl_config_req->header.message_id); //LOG_D(PHY, "[VNF] %s() header message_id:%02x\n", __FUNCTION__, dl_config_req->header.message_id);
NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() DL_CONFIG p7_config:%p phy_id:%d message_id:%02x sfn_sf:%d pdcch:%d dci:%d pdu:%d pdsch_rnti:%d pcfich:%d\n", __FUNCTION__, p7_config, dl_config_req->header.phy_id, dl_config_req->header.message_id, NFAPI_SFNSF2DEC(dl_config_req->sfn_sf), dl_config_req->dl_config_request_body.number_pdcch_ofdm_symbols, dl_config_req->dl_config_request_body.number_dci, dl_config_req->dl_config_request_body.number_pdu, dl_config_req->dl_config_request_body.number_pdsch_rnti, dl_config_req->dl_config_request_body.transmission_power_pcfich); LOG_D(PHY, "[VNF] %s() DL_CONFIG p7_config:%p phy_id:%d message_id:%02x sfn_sf:%d pdcch:%d dci:%d pdu:%d pdsch_rnti:%d pcfich:%d\n", __FUNCTION__, p7_config, dl_config_req->header.phy_id, dl_config_req->header.message_id, NFAPI_SFNSF2DEC(dl_config_req->sfn_sf), dl_config_req->dl_config_request_body.number_pdcch_ofdm_symbols, dl_config_req->dl_config_request_body.number_dci, dl_config_req->dl_config_request_body.number_pdu, dl_config_req->dl_config_request_body.number_pdsch_rnti, dl_config_req->dl_config_request_body.transmission_power_pcfich);
int retval = nfapi_vnf_p7_dl_config_req(p7_config, dl_config_req); int retval = nfapi_vnf_p7_dl_config_req(p7_config, dl_config_req);
dl_config_req->dl_config_request_body.number_pdcch_ofdm_symbols = 1;
dl_config_req->dl_config_request_body.number_dci = 0;
dl_config_req->dl_config_request_body.number_pdu = 0;
dl_config_req->dl_config_request_body.number_pdsch_rnti = 0;
if (retval!=0) if (retval!=0)
{ {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s() Problem sending retval:%d\n", __FUNCTION__, retval); LOG_E(PHY, "%s() Problem sending retval:%d\n", __FUNCTION__, retval);
} }
return retval; return retval;
} }
...@@ -1373,13 +1404,18 @@ int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) ...@@ -1373,13 +1404,18 @@ int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req)
tx_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!! tx_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() TX_REQ p7_config:%p phy_id:%d message_id:%02x sfn_sf:%d number_of_pdus:%d\n", __FUNCTION__, p7_config, tx_req->header.phy_id, tx_req->header.message_id, NFAPI_SFNSF2DEC(tx_req->sfn_sf), tx_req->tx_request_body.number_of_pdus); LOG_D(PHY, "[VNF] %s() TX_REQ p7_config:%p phy_id:%d message_id:%02x sfn_sf:%d number_of_pdus:%d\n", __FUNCTION__, p7_config, tx_req->header.phy_id, tx_req->header.message_id, NFAPI_SFNSF2DEC(tx_req->sfn_sf), tx_req->tx_request_body.number_of_pdus);
int retval = nfapi_vnf_p7_tx_req(p7_config, tx_req); int retval = nfapi_vnf_p7_tx_req(p7_config, tx_req);
if (retval!=0) if (retval!=0)
{ {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s() Problem sending retval:%d\n", __FUNCTION__, retval); LOG_E(PHY, "%s() Problem sending retval:%d\n", __FUNCTION__, retval);
}
else
{
tx_req->tx_request_body.number_of_pdus = 0;
} }
return retval; return retval;
} }
...@@ -1390,13 +1426,19 @@ int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) ...@@ -1390,13 +1426,19 @@ int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req)
hi_dci0_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!! hi_dci0_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() HI_DCI0_REQ p7_config:%p phy_id:%d message_id:%02x sfn_sf:%d number_of_dci:%d number_of_hi:%d\n", __FUNCTION__, p7_config, hi_dci0_req->header.phy_id, hi_dci0_req->header.message_id, NFAPI_SFNSF2DEC(hi_dci0_req->sfn_sf), hi_dci0_req->hi_dci0_request_body.number_of_dci, hi_dci0_req->hi_dci0_request_body.number_of_hi); LOG_D(PHY, "[VNF] %s() HI_DCI0_REQ p7_config:%p phy_id:%d message_id:%02x sfn_sf:%d number_of_dci:%d number_of_hi:%d\n", __FUNCTION__, p7_config, hi_dci0_req->header.phy_id, hi_dci0_req->header.message_id, NFAPI_SFNSF2DEC(hi_dci0_req->sfn_sf), hi_dci0_req->hi_dci0_request_body.number_of_dci, hi_dci0_req->hi_dci0_request_body.number_of_hi);
int retval = nfapi_vnf_p7_hi_dci0_req(p7_config, hi_dci0_req); int retval = nfapi_vnf_p7_hi_dci0_req(p7_config, hi_dci0_req);
if (retval!=0) if (retval!=0)
{ {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s() Problem sending retval:%d\n", __FUNCTION__, retval); LOG_E(PHY, "%s() Problem sending retval:%d\n", __FUNCTION__, retval);
}
else
{
hi_dci0_req->hi_dci0_request_body.number_of_hi = 0;
hi_dci0_req->hi_dci0_request_body.number_of_dci = 0;
} }
return retval; return retval;
} }
...@@ -1407,9 +1449,9 @@ int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) ...@@ -1407,9 +1449,9 @@ int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req)
ul_config_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!! ul_config_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
//NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() header message_id:%02x\n", __FUNCTION__, ul_config_req->header.message_id); //LOG_D(PHY, "[VNF] %s() header message_id:%02x\n", __FUNCTION__, ul_config_req->header.message_id);
NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() UL_CONFIG p7_config:%p phy_id:%d message_id:%02x sfn_sf:%d PDUs:%d rach_prach_frequency_resources:%d srs_present:%d\n", LOG_D(PHY, "[VNF] %s() UL_CONFIG p7_config:%p phy_id:%d message_id:%02x sfn_sf:%d PDUs:%d rach_prach_frequency_resources:%d srs_present:%d\n",
__FUNCTION__, p7_config, ul_config_req->header.phy_id, ul_config_req->header.message_id, NFAPI_SFNSF2DEC(ul_config_req->sfn_sf), __FUNCTION__, p7_config, ul_config_req->header.phy_id, ul_config_req->header.message_id, NFAPI_SFNSF2DEC(ul_config_req->sfn_sf),
ul_config_req->ul_config_request_body.number_of_pdus, ul_config_req->ul_config_request_body.number_of_pdus,
ul_config_req->ul_config_request_body.rach_prach_frequency_resources, ul_config_req->ul_config_request_body.rach_prach_frequency_resources,
...@@ -1419,13 +1461,14 @@ int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) ...@@ -1419,13 +1461,14 @@ int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req)
if (retval!=0) if (retval!=0)
{ {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s() Problem sending retval:%d\n", __FUNCTION__, retval); LOG_E(PHY, "%s() Problem sending retval:%d\n", __FUNCTION__, retval);
} }
else else
{ {
// Reset number of PDUs so that it is not resent // Reset number of PDUs so that it is not resent
ul_config_req->ul_config_request_body.number_of_pdus=0; ul_config_req->ul_config_request_body.number_of_pdus = 0;
ul_config_req->ul_config_request_body.rach_prach_frequency_resources = 0;
ul_config_req->ul_config_request_body.srs_present = 0;
} }
return retval; return retval;
} }
...@@ -832,7 +832,7 @@ int8_t find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type) ...@@ -832,7 +832,7 @@ int8_t find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type)
for (i=0; i<NUMBER_OF_UE_MAX; i++) { for (i=0; i<NUMBER_OF_UE_MAX; i++) {
AssertFatal(eNB->dlsch[i]!=NULL,"eNB->dlsch[%d] is null\n",i); AssertFatal(eNB->dlsch[i]!=NULL,"eNB->dlsch[%d] is null\n",i);
AssertFatal(eNB->dlsch[i]!=NULL,"eNB->dlsch[%d][0] is null\n",i); AssertFatal(eNB->dlsch[i]!=NULL,"eNB->dlsch[%d][0] is null\n",i);
//LOG_D(PHY,"searching for rnti %x : UE index %d=> harq_mask %x, rnti %x, first_free_index %d\n", rnti,i,eNB->dlsch[i][0]->harq_mask,eNB->dlsch[i][0]->rnti,first_free_index); LOG_D(PHY,"searching for rnti %x : UE index %d=> harq_mask %x, rnti %x, first_free_index %d\n", rnti,i,eNB->dlsch[i][0]->harq_mask,eNB->dlsch[i][0]->rnti,first_free_index);
if ((eNB->dlsch[i][0]->harq_mask >0) && if ((eNB->dlsch[i][0]->harq_mask >0) &&
(eNB->dlsch[i][0]->rnti==rnti)) return i; (eNB->dlsch[i][0]->rnti==rnti)) return i;
else if ((eNB->dlsch[i][0]->harq_mask == 0) && (first_free_index==-1)) first_free_index=i; else if ((eNB->dlsch[i][0]->harq_mask == 0) && (first_free_index==-1)) first_free_index=i;
......
...@@ -96,6 +96,7 @@ void handle_nfapi_hi_dci0_hi_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -96,6 +96,7 @@ void handle_nfapi_hi_dci0_hi_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.resource_block_start, hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.resource_block_start,
hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms); hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms);
// DJP - TODO FIXME - transmission power ignored
phich->config[phich->num_hi].hi = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.hi_value; phich->config[phich->num_hi].hi = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.hi_value;
phich->config[phich->num_hi].first_rb = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.resource_block_start; phich->config[phich->num_hi].first_rb = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.resource_block_start;
phich->config[phich->num_hi].n_DMRS = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms; phich->config[phich->num_hi].n_DMRS = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms;
...@@ -111,7 +112,7 @@ void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -111,7 +112,7 @@ void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
AssertFatal(rel8->length == 3, "BCH PDU has length %d != 3\n",rel8->length); AssertFatal(rel8->length == 3, "BCH PDU has length %d != 3\n",rel8->length);
LOG_D(PHY,"bch_pdu: %x,%x,%x\n",sdu[0],sdu[1],sdu[2]); //LOG_D(PHY,"bch_pdu: %x,%x,%x\n",sdu[0],sdu[1],sdu[2]);
eNB->pbch_pdu[0] = sdu[2]; eNB->pbch_pdu[0] = sdu[2];
eNB->pbch_pdu[1] = sdu[1]; eNB->pbch_pdu[1] = sdu[1];
eNB->pbch_pdu[2] = sdu[0]; eNB->pbch_pdu[2] = sdu[0];
...@@ -618,10 +619,8 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) ...@@ -618,10 +619,8 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
eNB->pdcch_vars[subframe&1].num_dci = number_dci; eNB->pdcch_vars[subframe&1].num_dci = number_dci;
eNB->phich_vars[subframe&1].num_hi = 0; eNB->phich_vars[subframe&1].num_hi = 0;
LOG_D(PHY,"NFAPI: Sched_INFO[Frame %d, Subframe %d]: %d dl_pdu, %d tx_req, %d hi_dci0_config_req, %d UL_config num_pdcch_symbols:%d\n", LOG_D(PHY,"NFAPI: Sched_INFO:SFN/SF:%d%d dl_pdu:%d tx_req:%d hi_dci0:%d ul_cfg:%d num_pdcch_symbols:%d\n",
frame,subframe,number_dl_pdu,TX_req->tx_request_body.number_of_pdus,number_hi_dci0_pdu,number_ul_pdu, frame,subframe,number_dl_pdu,TX_req->tx_request_body.number_of_pdus,number_hi_dci0_pdu,number_ul_pdu, eNB->pdcch_vars[subframe&1].num_pdcch_symbols);
eNB->pdcch_vars[subframe&1].num_pdcch_symbols
);
int do_oai =0; int do_oai =0;
...@@ -641,12 +640,12 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) ...@@ -641,12 +640,12 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
} }
for (i=0;i<number_dl_pdu;i++) { for (i=0;i<number_dl_pdu;i++) {
dl_config_pdu = &DL_req->dl_config_request_body.dl_config_pdu_list[i]; dl_config_pdu = &DL_req->dl_config_request_body.dl_config_pdu_list[i];
LOG_D(PHY,"NFAPI: dl_pdu %d : type %d\n",i,dl_config_pdu->pdu_type); //LOG_D(PHY,"NFAPI: dl_pdu %d : type %d\n",i,dl_config_pdu->pdu_type);
switch (dl_config_pdu->pdu_type) { switch (dl_config_pdu->pdu_type) {
case NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE: case NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE:
handle_nfapi_dci_dl_pdu(eNB,proc,dl_config_pdu); handle_nfapi_dci_dl_pdu(eNB,proc,dl_config_pdu);
eNB->pdcch_vars[subframe&1].num_dci++; eNB->pdcch_vars[subframe&1].num_dci++;
LOG_E(PHY,"Incremented num_dci:%d but already set??? dl_config:num_dci:%d\n", eNB->pdcch_vars[subframe&1].num_dci, number_dci); //LOG_E(PHY,"Incremented num_dci:%d but already set??? dl_config:num_dci:%d\n", eNB->pdcch_vars[subframe&1].num_dci, number_dci);
do_oai=1; do_oai=1;
break; break;
case NFAPI_DL_CONFIG_BCH_PDU_TYPE: case NFAPI_DL_CONFIG_BCH_PDU_TYPE:
...@@ -667,7 +666,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) ...@@ -667,7 +666,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
// handle_nfapi_mch_dl_pdu(eNB,dl_config_pdu); // handle_nfapi_mch_dl_pdu(eNB,dl_config_pdu);
break; break;
case NFAPI_DL_CONFIG_DLSCH_PDU_TYPE: case NFAPI_DL_CONFIG_DLSCH_PDU_TYPE:
LOG_E(PHY,"%s() NFAPI_DL_CONFIG_DLSCH_PDU_TYPE TX:%d/%d RX:%d/%d transport_blocks:%d pdu_index:%d data:%p\n", __FUNCTION__, proc->frame_tx, proc->subframe_tx, proc->frame_rx, proc->subframe_rx, dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks, dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index, TX_req->tx_request_body.tx_pdu_list[dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index].segments[0].segment_data); LOG_D(PHY,"%s() NFAPI_DL_CONFIG_DLSCH_PDU_TYPE TX:%d/%d RX:%d/%d transport_blocks:%d pdu_index:%d data:%p\n", __FUNCTION__, proc->frame_tx, proc->subframe_tx, proc->frame_rx, proc->subframe_rx, dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks, dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index, TX_req->tx_request_body.tx_pdu_list[dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index].segments[0].segment_data);
/* /*
AssertFatal(dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index<TX_req->tx_request_body.number_of_pdus, AssertFatal(dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index<TX_req->tx_request_body.number_of_pdus,
...@@ -718,15 +717,13 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) ...@@ -718,15 +717,13 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
} }
} }
if (nfapi_mode && do_oai) if (nfapi_mode && do_oai) {
{
oai_nfapi_tx_req(Sched_INFO->TX_req); oai_nfapi_tx_req(Sched_INFO->TX_req);
oai_nfapi_dl_config_req(Sched_INFO->DL_req); // DJP - .dl_config_request_body.dl_config_pdu_list[0]); // DJP - FIXME TODO - yuk - only copes with 1 pdu oai_nfapi_dl_config_req(Sched_INFO->DL_req); // DJP - .dl_config_request_body.dl_config_pdu_list[0]); // DJP - FIXME TODO - yuk - only copes with 1 pdu
} }
if (nfapi_mode && number_hi_dci0_pdu!=0) if (nfapi_mode && number_hi_dci0_pdu!=0) {
{
oai_nfapi_hi_dci0_req(HI_DCI0_req); oai_nfapi_hi_dci0_req(HI_DCI0_req);
} }
...@@ -738,25 +735,22 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) ...@@ -738,25 +735,22 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
switch (hi_dci0_req_pdu->pdu_type) { switch (hi_dci0_req_pdu->pdu_type) {
case NFAPI_HI_DCI0_DCI_PDU_TYPE:
case NFAPI_HI_DCI0_DCI_PDU_TYPE: handle_nfapi_hi_dci0_dci_pdu(eNB,proc,hi_dci0_req_pdu);
handle_nfapi_hi_dci0_dci_pdu(eNB,proc,hi_dci0_req_pdu); eNB->pdcch_vars[subframe&1].num_dci++;
break;
eNB->pdcch_vars[subframe&1].num_dci++; case NFAPI_HI_DCI0_HI_PDU_TYPE:
break; handle_nfapi_hi_dci0_hi_pdu(eNB,proc,hi_dci0_req_pdu);
case NFAPI_HI_DCI0_HI_PDU_TYPE: break;
handle_nfapi_hi_dci0_hi_pdu(eNB,proc,hi_dci0_req_pdu);
break;
} }
} }
if (nfapi_mode) if (nfapi_mode) {
{ for (int future_subframe=0;future_subframe<10;future_subframe++) {
for (int future_subframe=0;future_subframe<10;future_subframe++)
{
nfapi_ul_config_request_t *ul_req_tmp = &RC.mac[0]->UL_req_tmp[CC_id][future_subframe]; nfapi_ul_config_request_t *ul_req_tmp = &RC.mac[0]->UL_req_tmp[CC_id][future_subframe];
// DJP - indexing directly into the mac - not good - ?????? // DJP - indexing directly into the mac - not good - ??????
...@@ -772,18 +766,29 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) ...@@ -772,18 +766,29 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
} }
} }
for (i=0;i<number_ul_pdu;i++) { if (nfapi_mode) {
ul_config_pdu = &UL_req->ul_config_request_body.ul_config_pdu_list[i]; if (number_ul_pdu>0)
LOG_D(PHY,"NFAPI: ul_pdu %d : type %d\n",i,ul_config_pdu->pdu_type); {
AssertFatal(ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_PDU_TYPE || LOG_D(PHY, "UL_CONFIG to send to PNF\n");
ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_HARQ_PDU_TYPE || oai_nfapi_ul_config_req(UL_req);
ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_CQI_RI_PDU_TYPE || UL_req->ul_config_request_body.number_of_pdus=0;
ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_CQI_HARQ_RI_PDU_TYPE || number_ul_pdu=0;
ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE || }
ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_UCI_SR_PDU_TYPE || }
ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_UCI_SR_HARQ_PDU_TYPE else {
, for (i=0;i<number_ul_pdu;i++) {
"Optional UL_PDU type %d not supported\n",ul_config_pdu->pdu_type); ul_config_pdu = &UL_req->ul_config_request_body.ul_config_pdu_list[i];
handle_nfapi_ul_pdu(eNB,proc,ul_config_pdu,UL_req->sfn_sf>>4,UL_req->sfn_sf&0xf,UL_req->ul_config_request_body.srs_present); LOG_D(PHY,"NFAPI: ul_pdu %d : type %d\n",i,ul_config_pdu->pdu_type);
AssertFatal(ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_PDU_TYPE ||
ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_HARQ_PDU_TYPE ||
ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_CQI_RI_PDU_TYPE ||
ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_CQI_HARQ_RI_PDU_TYPE ||
ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE ||
ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_UCI_SR_PDU_TYPE ||
ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_UCI_SR_HARQ_PDU_TYPE
,
"Optional UL_PDU type %d not supported\n",ul_config_pdu->pdu_type);
handle_nfapi_ul_pdu(eNB,proc,ul_config_pdu,UL_req->sfn_sf>>4,UL_req->sfn_sf&0xf,UL_req->ul_config_request_body.srs_present);
}
} }
} }
...@@ -784,7 +784,14 @@ void srs_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) { ...@@ -784,7 +784,14 @@ void srs_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) {
void fill_sr_indication(PHY_VARS_eNB *eNB,uint16_t rnti,int frame,int subframe,uint32_t stat) { void fill_sr_indication(PHY_VARS_eNB *eNB,uint16_t rnti,int frame,int subframe,uint32_t stat) {
pthread_mutex_lock(&eNB->UL_INFO_mutex); pthread_mutex_lock(&eNB->UL_INFO_mutex);
nfapi_sr_indication_pdu_t *pdu = &eNB->UL_INFO.sr_ind.sr_pdu_list[eNB->UL_INFO.sr_ind.number_of_srs]; nfapi_sr_indication_t *sr_ind = &eNB->UL_INFO.sr_ind;
nfapi_sr_indication_body_t *sr_ind_body = &sr_ind->sr_indication_body;
nfapi_sr_indication_pdu_t *pdu = &sr_ind_body->sr_pdu_list[sr_ind_body->number_of_srs];
sr_ind.sfn_sf = frame<<4|subframe;
sr_ind.header.message_id = NFAPI_RX_SR_INDICATION;
sr_ind_body->tl.tag = NFAPI_SR_INDICATION_BODY_TAG;
pdu->instance_length = 0; // don't know what to do with this pdu->instance_length = 0; // don't know what to do with this
// pdu->rx_ue_information.handle = handle; // pdu->rx_ue_information.handle = handle;
...@@ -794,12 +801,14 @@ void fill_sr_indication(PHY_VARS_eNB *eNB,uint16_t rnti,int frame,int subframe,u ...@@ -794,12 +801,14 @@ void fill_sr_indication(PHY_VARS_eNB *eNB,uint16_t rnti,int frame,int subframe,u
int SNRtimes10 = dB_fixed_times10(stat) - 200;//(10*eNB->measurements.n0_power_dB[0]); int SNRtimes10 = dB_fixed_times10(stat) - 200;//(10*eNB->measurements.n0_power_dB[0]);
pdu->ul_cqi_information.tl.tag = NFAPI_UL_CQI_INFORMATION_TAG;
if (SNRtimes10 < -640) pdu->ul_cqi_information.ul_cqi=0; if (SNRtimes10 < -640) pdu->ul_cqi_information.ul_cqi=0;
else if (SNRtimes10 > 635) pdu->ul_cqi_information.ul_cqi=255; else if (SNRtimes10 > 635) pdu->ul_cqi_information.ul_cqi=255;
else pdu->ul_cqi_information.ul_cqi=(640+SNRtimes10)/5; else pdu->ul_cqi_information.ul_cqi=(640+SNRtimes10)/5;
pdu->ul_cqi_information.channel = 0; pdu->ul_cqi_information.channel = 0;
eNB->UL_INFO.sr_ind.number_of_srs++; sr_ind_body->number_of_srs++;
pthread_mutex_unlock(&eNB->UL_INFO_mutex); pthread_mutex_unlock(&eNB->UL_INFO_mutex);
} }
......
This diff is collapsed.
...@@ -886,6 +886,7 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t ...@@ -886,6 +886,7 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
// see Section 10.2 from 36.213 // see Section 10.2 from 36.213
int ackNAK_absSF = absSF + reps + 4; int ackNAK_absSF = absSF + reps + 4;
AssertFatal(reps>2,"Have to handle programming of ACK when PDSCH repetitions is > 2\n"); AssertFatal(reps>2,"Have to handle programming of ACK when PDSCH repetitions is > 2\n");
ul_req = &eNB->UL_req_tmp[CC_idP][ackNAK_absSF%10]; ul_req = &eNB->UL_req_tmp[CC_idP][ackNAK_absSF%10];
ul_req_body = &ul_req->ul_config_request_body; ul_req_body = &ul_req->ul_config_request_body;
ul_config_pdu = &ul_req_body->ul_config_pdu_list[ul_req_body->number_of_pdus]; ul_config_pdu = &ul_req_body->ul_config_pdu_list[ul_req_body->number_of_pdus];
...@@ -906,6 +907,8 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t ...@@ -906,6 +907,8 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
ul_req->sfn_sf = sfnsf_add_subframe(RA_template->Msg3_frame, RA_template->Msg3_subframe, 4); ul_req->sfn_sf = sfnsf_add_subframe(RA_template->Msg3_frame, RA_template->Msg3_subframe, 4);
ul_req->header.message_id = NFAPI_UL_CONFIG_REQUEST; ul_req->header.message_id = NFAPI_UL_CONFIG_REQUEST;
LOG_D(MAC,"UL_req_tmp[CC_idP:%d][ackNAK_absSF mod 10:%d] RA_template->Msg3_frame:%d RA_template->Msg3_subframe:%d + 4 sfn_sf:%d\n", CC_idP, ackNAK_absSF%10, RA_template->Msg3_frame, RA_template->Msg3_subframe, NFAPI_SFNSF2DEC(ul_req->sfn_sf));
// Note need to keep sending this across reptitions!!!! Not really for PUCCH, to ask small-cell forum, we'll see for the other messages, maybe parameters change across repetitions and FAPI has to provide for that // Note need to keep sending this across reptitions!!!! Not really for PUCCH, to ask small-cell forum, we'll see for the other messages, maybe parameters change across repetitions and FAPI has to provide for that
if (cc[CC_idP].tdd_Config==NULL) { // FDD case if (cc[CC_idP].tdd_Config==NULL) { // FDD case
ul_config_pdu->uci_harq_pdu.harq_information.harq_information_rel8_fdd.tl.tag = NFAPI_UL_CONFIG_REQUEST_HARQ_INFORMATION_REL8_FDD_TAG; ul_config_pdu->uci_harq_pdu.harq_information.harq_information_rel8_fdd.tl.tag = NFAPI_UL_CONFIG_REQUEST_HARQ_INFORMATION_REL8_FDD_TAG;
......
...@@ -560,7 +560,7 @@ void schedule_mib(module_id_t module_idP, ...@@ -560,7 +560,7 @@ void schedule_mib(module_id_t module_idP,
dl_config_request->header.message_id = NFAPI_DL_CONFIG_REQUEST; dl_config_request->header.message_id = NFAPI_DL_CONFIG_REQUEST;
dl_config_request->sfn_sf = sfn_sf; dl_config_request->sfn_sf = sfn_sf;
LOG_E(MAC,"eNB->DL_req[0].number_pdu %d (%p) sfn_sf:%d\n", dl_req->number_pdu,&dl_req->number_pdu, NFAPI_SFNSF2DEC(dl_config_request->sfn_sf)); //LOG_D(MAC,"eNB->DL_req[0].number_pdu %d (%p) sfn_sf:%d\n", dl_req->number_pdu,&dl_req->number_pdu, NFAPI_SFNSF2DEC(dl_config_request->sfn_sf));
// DL request // DL request
TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus]; TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
...@@ -694,6 +694,7 @@ schedule_SI( ...@@ -694,6 +694,7 @@ schedule_SI(
//LOG_D(MAC,"%s() Before ADDING SI dl_req->number_pdu:%d dl_req->number_dci:%d eNB->TX_req[CC_id].tx_request_body.number_of_pdus:%d\n", __FUNCTION__, dl_req->number_pdu, dl_req->number_dci, eNB->TX_req[CC_id].tx_request_body.number_of_pdus);
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu]; dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
......
...@@ -75,6 +75,7 @@ add_ue_dlsch_info( ...@@ -75,6 +75,7 @@ add_ue_dlsch_info(
) )
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
{ {
//LOG_D(MAC, "%s(module_idP:%d, CC_id:%d, UE_id:%d, subframeP:%d, status:%d) serving_num:%d rnti:%x\n", __FUNCTION__, module_idP, CC_id, UE_id, subframeP, status, eNB_dlsch_info[module_idP][CC_id][UE_id].serving_num, UE_RNTI(module_idP,UE_id));
eNB_dlsch_info[module_idP][CC_id][UE_id].rnti = UE_RNTI(module_idP,UE_id); eNB_dlsch_info[module_idP][CC_id][UE_id].rnti = UE_RNTI(module_idP,UE_id);
// eNB_dlsch_info[module_idP][CC_id][ue_mod_idP].weight = weight; // eNB_dlsch_info[module_idP][CC_id][ue_mod_idP].weight = weight;
...@@ -542,6 +543,8 @@ schedule_ue_spec( ...@@ -542,6 +543,8 @@ schedule_ue_spec(
dl_req = &eNB->DL_req[CC_id].dl_config_request_body; dl_req = &eNB->DL_req[CC_id].dl_config_request_body;
//LOG_D(MAC,"%s() BEFORE mbsfn_flag[CC_id]:%d dl_config dci:%d pdu:%d TX_REQ[pdus:%d]\n", __FUNCTION__, mbsfn_flag[CC_id], dl_req->number_dci, dl_req->number_pdu, eNB->TX_req[CC_id].tx_request_body.number_of_pdus);
if (mbsfn_flag[CC_id]>0) if (mbsfn_flag[CC_id]>0)
continue; continue;
...@@ -551,6 +554,7 @@ schedule_ue_spec( ...@@ -551,6 +554,7 @@ schedule_ue_spec(
eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id]; eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id];
ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
//LOG_D(MAC,"%s() rnti:%x, eNB_UE_stats:%p, ue_sched_ctl:%p tmode:%d\n", __FUNCTION__, rnti, eNB_UE_stats, ue_sched_ctl, get_tmode(module_idP,CC_id,UE_id));
if (rnti==NOT_A_RNTI) { if (rnti==NOT_A_RNTI) {
LOG_D(MAC,"Cannot find rnti for UE_id %d (num_UEs %d)\n",UE_id,UE_list->num_UEs); LOG_D(MAC,"Cannot find rnti for UE_id %d (num_UEs %d)\n",UE_id,UE_list->num_UEs);
...@@ -582,6 +586,7 @@ schedule_ue_spec( ...@@ -582,6 +586,7 @@ schedule_ue_spec(
} }
} /* if (continue_flag != 1 */ } /* if (continue_flag != 1 */
//LOG_D(MAC,"%s() BEFORE mbsfn_flag[CC_id]:%d dl_config dci:%d pdu:%d TX_REQ[pdus:%d]\n", __FUNCTION__, mbsfn_flag[CC_id], dl_req->number_dci, dl_req->number_pdu, eNB->TX_req[CC_id].tx_request_body.number_of_pdus);
if ((ue_sched_ctl->pre_nb_available_rbs[CC_id] == 0) || // no RBs allocated if ((ue_sched_ctl->pre_nb_available_rbs[CC_id] == 0) || // no RBs allocated
CCE_allocation_infeasible(module_idP,CC_id,1,subframeP,aggregation,rnti) CCE_allocation_infeasible(module_idP,CC_id,1,subframeP,aggregation,rnti)
) { ) {
...@@ -599,14 +604,18 @@ schedule_ue_spec( ...@@ -599,14 +604,18 @@ schedule_ue_spec(
set_ul_DAI(module_idP,UE_id,CC_id,frameP,subframeP); set_ul_DAI(module_idP,UE_id,CC_id,frameP,subframeP);
} }