Commit 43d12970 authored by Cedric Roux's avatar Cedric Roux

bugfix: fix TX pdu_index usage (maybe still not correct)

parent 71cbdf2a
......@@ -651,7 +651,8 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks);
handle_nfapi_dlsch_pdu(eNB,proc,dl_config_pdu,
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks-1,
TX_req->tx_request_body.tx_pdu_list[dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index].segments[0].segment_data);
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index == -1 ? NULL
: TX_req->tx_request_body.tx_pdu_list[dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index].segments[0].segment_data);
/*
if (dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti == eNB->preamble_list[0].preamble_rel8.rnti) {// is RAR pdu
LOG_D(PHY,"Frame %d, Subframe %d: Received LTE RAR pdu, programming based on UL Grant\n",frame,subframe);
......
......@@ -914,7 +914,7 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
fill_nfapi_dlsch_config(eNB,
dl_req,
RA_template->msg4_TBsize,
eNB->pdu_index[CC_idP]++,
eNB->pdu_index[CC_idP],
RA_template->rnti,
2, // resource_allocation_type : format 1A/1B/1D
0, // virtual_resource_block_assignment_flag : localized
......@@ -940,8 +940,9 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
eNB->TX_req[CC_idP].sfn_sf = fill_nfapi_tx_req(&eNB->TX_req[CC_idP].tx_request_body,
(frameP*10)+subframeP,
rrc_sdu_length,
&eNB->pdu_index[CC_idP],
eNB->pdu_index[CC_idP],
eNB->UE_list.DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0]);
eNB->pdu_index[CC_idP]++;
LOG_D(MAC,"Filling UCI ACK/NAK information, cce_idx %d\n",dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.cce_idx);
// Program PUCCH1a for ACK/NAK
......@@ -1073,7 +1074,7 @@ void check_Msg4_retransmission(module_id_t module_idP,int CC_idP,frame_t frameP,
fill_nfapi_dlsch_config(eNB,
dl_req,
RA_template->msg4_TBsize,
eNB->pdu_index[CC_idP]++,
-1 /* retransmission, no pdu_index */,
RA_template->rnti,
2, // resource_allocation_type : format 1A/1B/1D
0, // virtual_resource_block_assignment_flag : localized
......
......@@ -753,7 +753,7 @@ schedule_ue_spec(
fill_nfapi_dlsch_config(eNB,dl_req,
TBS,
eNB->pdu_index[CC_id],
-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
......@@ -778,7 +778,6 @@ schedule_ue_spec(
LOG_D(MAC,"Filled NFAPI configuration for DCI/DLSCH %d, retransmission round %d\n",eNB->pdu_index[CC_id],round);
eNB->pdu_index[CC_id]++;
program_dlsch_acknak(module_idP,CC_id,UE_id,frameP,subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.cce_idx);
// No TX request for retransmission (check if null request for FAPI)
}
......@@ -1277,7 +1276,7 @@ schedule_ue_spec(
eNB->TX_req[CC_id].sfn_sf = fill_nfapi_tx_req(&eNB->TX_req[CC_id].tx_request_body,
(frameP*10)+subframeP,
TBS,
&eNB->pdu_index[CC_id],
eNB->pdu_index[CC_id],
eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0]);
LOG_D(MAC,"Filled NFAPI configuration for DCI/DLSCH/TXREQ %d, new SDU\n",eNB->pdu_index[CC_id]);
......
......@@ -1300,12 +1300,12 @@ void fill_nfapi_dlsch_config(eNB_MAC_INST *eNB,
dl_req->number_pdu++;
}
uint16_t fill_nfapi_tx_req(nfapi_tx_request_body_t *tx_req_body,uint16_t absSF,uint16_t pdu_length, uint16_t *pdu_index, uint8_t *pdu)
uint16_t fill_nfapi_tx_req(nfapi_tx_request_body_t *tx_req_body,uint16_t absSF,uint16_t pdu_length, uint16_t pdu_index, uint8_t *pdu)
{
nfapi_tx_request_pdu_t *TX_req = &tx_req_body->tx_pdu_list[tx_req_body->number_of_pdus];
LOG_D(MAC,"Filling TX_req %d for pdu length %d\n",tx_req_body->number_of_pdus,pdu_length);
TX_req->pdu_length = pdu_length;
TX_req->pdu_index = *pdu_index++;
TX_req->pdu_index = pdu_index;
TX_req->num_segments = 1;
TX_req->segments[0].segment_length = pdu_length;
TX_req->segments[0].segment_data = pdu;
......
......@@ -950,7 +950,7 @@ void extract_pucch_csi(module_id_t mod_idP,int CC_idP,int UE_id, frame_t frameP,
void extract_pusch_csi(module_id_t mod_idP,int CC_idP,int UE_id, frame_t frameP,sub_frame_t subframeP,uint8_t *pdu, uint8_t length);
uint16_t fill_nfapi_tx_req(nfapi_tx_request_body_t *tx_req_body,uint16_t absSF,uint16_t pdu_length, uint16_t *pdu_index, uint8_t *pdu );
uint16_t fill_nfapi_tx_req(nfapi_tx_request_body_t *tx_req_body,uint16_t absSF,uint16_t pdu_length, uint16_t pdu_index, uint8_t *pdu );
void fill_nfapi_ulsch_config_request_rel8(nfapi_ul_config_request_pdu_t *ul_config_pdu,
uint8_t cqi_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