Commit 5443c7a7 authored by Robert Schmidt's avatar Robert Schmidt

fill_nfapi_dlsch_config() takes index for filling

parent 0f46f17c
......@@ -1030,7 +1030,11 @@ generate_Msg4(module_id_t module_idP,
memcpy((void *) &mac->UE_info.DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0][(unsigned char)offset],
&cc[CC_idP].CCCH_pdu.payload[0], rrc_sdu_length);
// DLSCH Config
fill_nfapi_dlsch_config(mac, dl_req_body, ra->msg4_TBsize, mac->pdu_index[CC_idP], ra->rnti, 2, // resource_allocation_type : format 1A/1B/1D
fill_nfapi_dlsch_config(&dl_req_body->dl_config_pdu_list[dl_req_body->number_pdu],
ra->msg4_TBsize,
mac->pdu_index[CC_idP],
ra->rnti,
2, // resource_allocation_type : format 1A/1B/1D
0, // virtual_resource_block_assignment_flag : localized
getRIV(N_RB_DL, first_rb, 4), // resource_block_coding : RIV, 4 PRB
2, // modulation: QPSK
......@@ -1049,6 +1053,7 @@ generate_Msg4(module_id_t module_idP,
(cc->p_eNB == 1) ? 1 : 2, // transmission mode
1, // num_bf_prb_per_subband
1); // num_bf_vector
dl_req_body->number_pdu++;
LOG_D(MAC,
"Filled DLSCH config, pdu number %d, non-dci pdu_index %d\n",
dl_req_body->number_pdu, mac->pdu_index[CC_idP]);
......@@ -1173,7 +1178,8 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
// DLSCH Config
//DJP - fix this pdu_index = -1
LOG_D(MAC, "check_Msg4_retransmission() before fill_nfapi_dlsch_config() with pdu_index = -1 \n");
fill_nfapi_dlsch_config(mac, dl_req_body, ra->msg4_TBsize,
fill_nfapi_dlsch_config(&dl_req_body->dl_config_pdu_list[dl_req_body->number_pdu],
ra->msg4_TBsize,
-1
/* retransmission, no pdu_index */
, ra->rnti, 2, // resource_allocation_type : format 1A/1B/1D
......@@ -1195,6 +1201,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
(cc->p_eNB == 1) ? 1 : 2, // transmission mode
1, // num_bf_prb_per_subband
1); // num_bf_vector
dl_req_body->number_pdu++;
if(RC.mac[module_idP]->scheduler_mode == SCHED_MODE_FAIR_RR) {
set_dl_ue_select_msg4(CC_idP, 4, UE_id, ra->rnti);
......
......@@ -779,8 +779,7 @@ schedule_ue_spec(module_id_t module_idP,
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
eNB->DL_req[CC_id].sfn_sf = frameP<<4 | subframeP;
eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST;
fill_nfapi_dlsch_config(eNB,
dl_req,
fill_nfapi_dlsch_config(&dl_req->dl_config_pdu_list[dl_req->number_pdu],
TBS,
-1, // retransmission, no pdu_index
rnti,
......@@ -803,6 +802,7 @@ schedule_ue_spec(module_id_t module_idP,
cc[CC_id].p_eNB == 1 ? 1 : 2, // transmission mode
0, //number of PRBs treated as one subband, not used here
0); // number of beamforming vectors, not used here
dl_req->number_pdu++;
LOG_D(MAC, "Filled NFAPI configuration for DCI/DLSCH %d, retransmission round %d\n",
eNB->pdu_index[CC_id],
round_DL);
......@@ -1202,8 +1202,7 @@ schedule_ue_spec(module_id_t module_idP,
AssertFatal(ue_template->physicalConfigDedicated != NULL, "physicalConfigDedicated is NULL\n");
AssertFatal(ue_template->physicalConfigDedicated->pdsch_ConfigDedicated != NULL,
"physicalConfigDedicated->pdsch_ConfigDedicated is NULL\n");
fill_nfapi_dlsch_config(eNB,
dl_req,
fill_nfapi_dlsch_config(&dl_req->dl_config_pdu_list[dl_req->number_pdu],
TBS,
eNB->pdu_index[CC_id],
rnti,
......@@ -1226,6 +1225,7 @@ schedule_ue_spec(module_id_t module_idP,
cc[CC_id].p_eNB == 1 ? 1 : 2, // transmission mode
0, //number of PRBs treated as one subband, not used here
0); // number of beamforming vectors, not used here
dl_req->number_pdu++;
eNB->TX_req[CC_id].sfn_sf = fill_nfapi_tx_req(&eNB->TX_req[CC_id].tx_request_body,
(frameP * 10) + subframeP,
TBS,
......
......@@ -1493,7 +1493,9 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
eNB->DL_req[CC_id].sfn_sf = frameP<<4 | subframeP;
eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST;
fill_nfapi_dlsch_config(eNB, dl_req, TBS, -1
fill_nfapi_dlsch_config(&dl_req->dl_config_pdu_list[dl_req->number_pdu],
TBS,
-1
/* retransmission, no pdu_index */
, rnti, 0, // type 0 allocation from 7.1.6 in 36.213
0, // virtual_resource_block_assignment_flag, unused here
......@@ -1513,6 +1515,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
0, //number of PRBs treated as one subband, not used here
0 // number of beamforming vectors, not used here
);
dl_req->number_pdu++;
LOG_D(MAC,
"Filled NFAPI configuration for DCI/DLSCH %d, retransmission round %d\n",
eNB->pdu_index[CC_id], round);
......@@ -2077,7 +2080,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
UE_info->UE_template[CC_id][UE_id].oldmcs2[harq_pid] = 0;
AssertFatal(UE_info->UE_template[CC_id][UE_id].physicalConfigDedicated!=NULL,"physicalConfigDedicated is NULL\n");
AssertFatal(UE_info->UE_template[CC_id][UE_id].physicalConfigDedicated->pdsch_ConfigDedicated!=NULL,"physicalConfigDedicated->pdsch_ConfigDedicated is NULL\n");
fill_nfapi_dlsch_config(eNB,dl_req,
fill_nfapi_dlsch_config(&dl_req->dl_config_pdu_list[dl_req->number_pdu],
TBS,
eNB->pdu_index[CC_id],
rnti,
......@@ -2101,6 +2104,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
0, //number of PRBs treated as one subband, not used here
0 // number of beamforming vectors, not used here
);
dl_req->number_pdu++;
eNB->TX_req[CC_id].sfn_sf = fill_nfapi_tx_req(&eNB->TX_req[CC_id].tx_request_body,
(frameP*10)+subframeP,
TBS,
......
......@@ -141,8 +141,7 @@ schedule_ue_spec_phy_test(
AssertFatal(UE_info->UE_template[CC_id][UE_id].physicalConfigDedicated!=NULL,"physicalConfigDedicated is NULL\n");
AssertFatal(UE_info->UE_template[CC_id][UE_id].physicalConfigDedicated->pdsch_ConfigDedicated!=NULL,"physicalConfigDedicated->pdsch_ConfigDedicated is NULL\n");
*/
fill_nfapi_dlsch_config(eNB,
dl_req,
fill_nfapi_dlsch_config(&dl_req->dl_config_pdu_list[dl_req->number_pdu],
TBS,
eNB->pdu_index[CC_id],
rnti,
......@@ -166,6 +165,7 @@ schedule_ue_spec_phy_test(
0, //number of PRBs treated as one subband, not used here
0 // number of beamforming vectors, not used here
);
dl_req->number_pdu++;
eNB->TX_req[CC_id].sfn_sf = fill_nfapi_tx_req(&eNB->TX_req[CC_id].tx_request_body,
(frameP*10)+subframeP,
TBS,
......
......@@ -1619,8 +1619,7 @@ fill_nfapi_mch_config(nfapi_dl_config_request_body_t *dl_req,
//------------------------------------------------------------------------------
void
fill_nfapi_dlsch_config(eNB_MAC_INST *eNB,
nfapi_dl_config_request_body_t *dl_req,
fill_nfapi_dlsch_config(nfapi_dl_config_request_pdu_t *dl_config_pdu,
uint16_t length,
int16_t pdu_index,
uint16_t rnti,
......@@ -1646,7 +1645,6 @@ fill_nfapi_dlsch_config(eNB_MAC_INST *eNB,
uint8_t num_bf_vector)
//------------------------------------------------------------------------------
{
nfapi_dl_config_request_pdu_t *dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
memset((void *) dl_config_pdu, 0, sizeof(nfapi_dl_config_request_pdu_t));
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
......@@ -1673,7 +1671,6 @@ fill_nfapi_dlsch_config(eNB_MAC_INST *eNB,
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode = transmission_mode;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = num_bf_prb_per_subband;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = num_bf_vector;
dl_req->number_pdu++;
return;
}
......
......@@ -1090,8 +1090,7 @@ void program_dlsch_acknak(module_id_t module_idP, int CC_idP, int UE_idP,
frame_t frameP, sub_frame_t subframeP,
uint8_t cce_idx);
void fill_nfapi_dlsch_config(eNB_MAC_INST *eNB,
nfapi_dl_config_request_body_t *dl_req,
void fill_nfapi_dlsch_config(nfapi_dl_config_request_pdu_t *dl_config_pdu,
uint16_t length, int16_t pdu_index,
uint16_t rnti,
uint8_t resource_allocation_type,
......
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