Commit aca800da authored by wujing's avatar wujing

fix SegmentFault by harq_pid==8 after clean_dlsch_eNB

parent dbddecb7
...@@ -2064,6 +2064,10 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, ...@@ -2064,6 +2064,10 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
if ((dlsch0 != NULL) && (dlsch1 != NULL)){ if ((dlsch0 != NULL) && (dlsch1 != NULL)){
harq_pid = dlsch0->harq_ids[frame%2][subframe_offset]; harq_pid = dlsch0->harq_ids[frame%2][subframe_offset];
if(harq_pid >= dlsch0->Mdlharq) {
LOG_E(PHY,"illegal harq_pid %d\n", harq_pid);
return(-1);
}
dlsch0_harq = dlsch0->harq_processes[harq_pid]; dlsch0_harq = dlsch0->harq_processes[harq_pid];
mimo_mode = dlsch0_harq->mimo_mode; mimo_mode = dlsch0_harq->mimo_mode;
mod_order0 = dlsch0_harq->Qm; mod_order0 = dlsch0_harq->Qm;
...@@ -2081,6 +2085,10 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, ...@@ -2081,6 +2085,10 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
}else if ((dlsch0 != NULL) && (dlsch1 == NULL)){ }else if ((dlsch0 != NULL) && (dlsch1 == NULL)){
harq_pid = dlsch0->harq_ids[frame%2][subframe_offset]; harq_pid = dlsch0->harq_ids[frame%2][subframe_offset];
if(harq_pid >= dlsch0->Mdlharq) {
LOG_E(PHY,"illegal harq_pid %d\n", harq_pid);
return(-1);
}
dlsch0_harq = dlsch0->harq_processes[harq_pid]; dlsch0_harq = dlsch0->harq_processes[harq_pid];
mimo_mode = dlsch0_harq->mimo_mode; mimo_mode = dlsch0_harq->mimo_mode;
mod_order0 = dlsch0_harq->Qm; mod_order0 = dlsch0_harq->Qm;
...@@ -2098,6 +2106,10 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, ...@@ -2098,6 +2106,10 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
}else if ((dlsch0 == NULL) && (dlsch1 != NULL)){ }else if ((dlsch0 == NULL) && (dlsch1 != NULL)){
harq_pid = dlsch1->harq_ids[frame%2][subframe_offset]; harq_pid = dlsch1->harq_ids[frame%2][subframe_offset];
if(harq_pid >= dlsch1->Mdlharq) {
LOG_E(PHY,"illegal harq_pid %d\n", harq_pid);
return(-1);
}
dlsch1_harq = dlsch1->harq_processes[harq_pid]; dlsch1_harq = dlsch1->harq_processes[harq_pid];
mimo_mode = dlsch1_harq->mimo_mode; mimo_mode = dlsch1_harq->mimo_mode;
mod_order0 = dlsch1_harq->Qm; mod_order0 = dlsch1_harq->Qm;
......
...@@ -1689,7 +1689,7 @@ void release_harq(PHY_VARS_eNB *eNB,int UE_id,int tb,uint16_t frame,uint8_t subf ...@@ -1689,7 +1689,7 @@ void release_harq(PHY_VARS_eNB *eNB,int UE_id,int tb,uint16_t frame,uint8_t subf
frame_tx = ul_ACK_subframe2_dl_frame(&eNB->frame_parms,frame,subframe,subframe_tx); frame_tx = ul_ACK_subframe2_dl_frame(&eNB->frame_parms,frame,subframe,subframe_tx);
if (((1<<m)&mask) > 0) { if (((1<<m)&mask) > 0) {
harq_pid = dlsch0->harq_ids[frame_tx%2][subframe_tx]; harq_pid = dlsch0->harq_ids[frame_tx%2][subframe_tx];
if ((harq_pid>=0) && (harq_pid<10)) { if ((harq_pid>=0) && (harq_pid<dlsch0->Mdlharq)) {
dlsch0_harq = dlsch0->harq_processes[harq_pid]; dlsch0_harq = dlsch0->harq_processes[harq_pid];
dlsch1_harq = dlsch1->harq_processes[harq_pid]; dlsch1_harq = dlsch1->harq_processes[harq_pid];
AssertFatal(dlsch0_harq!=NULL,"dlsch0_harq is null\n"); AssertFatal(dlsch0_harq!=NULL,"dlsch0_harq is null\n");
......
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