fix error of grouping UE to free list for phy layer and ue to free list for fapi
This commit is contained in:
@@ -86,14 +86,17 @@ int find_ulsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type) {
|
||||
AssertFatal(eNB!=NULL,"eNB is null\n");
|
||||
|
||||
for (int i=0; i<NUMBER_OF_ULSCH_MAX; i++) {
|
||||
if (eNB->ulsch[i]==NULL) continue;
|
||||
if (eNB->ulsch[i] == NULL)
|
||||
continue;
|
||||
|
||||
if (type == SEARCH_EXIST_RA) {
|
||||
if (eNB->ulsch[i]->rnti == rnti) return i;
|
||||
if (eNB->ulsch[i]->rnti == rnti)
|
||||
return i;
|
||||
} else {
|
||||
if ((eNB->ulsch[i]->harq_mask >0) &&
|
||||
(eNB->ulsch[i]->rnti==rnti)) return i;
|
||||
else if ((eNB->ulsch[i]->harq_mask == 0) && (first_free_index==-1)) first_free_index=i;
|
||||
if (eNB->ulsch[i]->harq_mask > 0 && eNB->ulsch[i]->rnti == rnti)
|
||||
return i;
|
||||
else if (eNB->ulsch[i]->harq_mask == 0 && first_free_index == -1)
|
||||
first_free_index = i;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1963,7 +1966,7 @@ void fill_dci0(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t *proc,
|
||||
if(frame_parms->frame_type == TDD) {
|
||||
UE_id = find_ulsch(pdu->dci_pdu_rel8.rnti, eNB,SEARCH_EXIST_OR_FREE);
|
||||
|
||||
if(UE_id >=0 || UE_id < NUMBER_OF_ULSCH_MAX) {
|
||||
if (UE_id >= 0) {
|
||||
eNB->ulsch[UE_id]->harq_processes[pdu->dci_pdu_rel8.harq_pid]->V_UL_DAI = dai +1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,8 +160,12 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,
|
||||
|
||||
for (i=0; i<Mdlharq; i++) {
|
||||
dlsch->harq_processes[i] = (LTE_DL_eNB_HARQ_t *)malloc16(sizeof(LTE_DL_eNB_HARQ_t));
|
||||
LOG_I(PHY, "Required DLSCH mem size %d (bw scaling %d), dlsch->harq_processes[%d] %p\n",
|
||||
MAX_DLSCH_PAYLOAD_BYTES/bw_scaling,bw_scaling, i,dlsch->harq_processes[i]);
|
||||
LOG_D(PHY,
|
||||
"Required DLSCH mem size %d (bw scaling %d), dlsch->harq_processes[%d] %p\n",
|
||||
MAX_DLSCH_PAYLOAD_BYTES / bw_scaling,
|
||||
bw_scaling,
|
||||
i,
|
||||
dlsch->harq_processes[i]);
|
||||
|
||||
if (dlsch->harq_processes[i]) {
|
||||
bzero(dlsch->harq_processes[i],sizeof(LTE_DL_eNB_HARQ_t));
|
||||
|
||||
@@ -1121,8 +1121,6 @@ void dump_ulsch_stats(FILE *fd,PHY_VARS_eNB *eNB,int frame) {
|
||||
}
|
||||
|
||||
void clear_ulsch_stats(PHY_VARS_eNB *eNB) {
|
||||
|
||||
for (int i=0;i<NUMBER_OF_ULSCH_MAX;i++)
|
||||
memset((void*)&eNB->ulsch_stats[i],0,sizeof(eNB->ulsch_stats[i]));
|
||||
memset(eNB->ulsch_stats, 0, sizeof(eNB->ulsch_stats));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user