Commit ca209b0f authored by Robert Schmidt's avatar Robert Schmidt

free_eNB_{d,u}lsch(): remove log, complete function dlsch

parent 16ebef0b
...@@ -56,42 +56,20 @@ ...@@ -56,42 +56,20 @@
void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch) void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch)
{ {
int i; int i, r, aa, layer;
int r;
if (dlsch) { if (dlsch) {
#ifdef DEBUG_DLSCH_FREE for (layer=0; layer<4; layer++) {
printf("Freeing dlsch %p\n",dlsch); for (aa=0; aa<64; aa++) free16(dlsch->ue_spec_bf_weights[layer][aa], OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES*sizeof(int32_t));
#endif free16(dlsch->ue_spec_bf_weights[layer], 64*sizeof(int32_t*));
}
for (i=0; i<dlsch->Mdlharq; i++) { for (i=0; i<dlsch->Mdlharq; i++) {
#ifdef DEBUG_DLSCH_FREE
printf("Freeing dlsch process %d\n",i);
#endif
if (dlsch->harq_processes[i]) { if (dlsch->harq_processes[i]) {
#ifdef DEBUG_DLSCH_FREE
printf("Freeing dlsch process %d (%p)\n",i,dlsch->harq_processes[i]);
#endif
if (dlsch->harq_processes[i]->b) { if (dlsch->harq_processes[i]->b) {
free16(dlsch->harq_processes[i]->b,MAX_DLSCH_PAYLOAD_BYTES); free16(dlsch->harq_processes[i]->b,MAX_DLSCH_PAYLOAD_BYTES);
dlsch->harq_processes[i]->b = NULL; dlsch->harq_processes[i]->b = NULL;
#ifdef DEBUG_DLSCH_FREE
printf("Freeing dlsch process %d b (%p)\n",i,dlsch->harq_processes[i]->b);
#endif
} }
#ifdef DEBUG_DLSCH_FREE
printf("Freeing dlsch process %d c (%p)\n",i,dlsch->harq_processes[i]->c);
#endif
for (r=0; r<MAX_NUM_DLSCH_SEGMENTS; r++) { for (r=0; r<MAX_NUM_DLSCH_SEGMENTS; r++) {
#ifdef DEBUG_DLSCH_FREE
printf("Freeing dlsch process %d c[%d] (%p)\n",i,r,dlsch->harq_processes[i]->c[r]);
#endif
if (dlsch->harq_processes[i]->c[r]) { if (dlsch->harq_processes[i]->c[r]) {
free16(dlsch->harq_processes[i]->c[r],((r==0)?8:0) + 3+768); free16(dlsch->harq_processes[i]->c[r],((r==0)?8:0) + 3+768);
dlsch->harq_processes[i]->c[r] = NULL; dlsch->harq_processes[i]->c[r] = NULL;
...@@ -100,17 +78,14 @@ void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch) ...@@ -100,17 +78,14 @@ void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch)
free16(dlsch->harq_processes[i]->d[r],(96+12+3+(3*6144))); free16(dlsch->harq_processes[i]->d[r],(96+12+3+(3*6144)));
dlsch->harq_processes[i]->d[r] = NULL; dlsch->harq_processes[i]->d[r] = NULL;
} }
} }
free16(dlsch->harq_processes[i],sizeof(LTE_DL_eNB_HARQ_t)); free16(dlsch->harq_processes[i],sizeof(LTE_DL_eNB_HARQ_t));
dlsch->harq_processes[i] = NULL; dlsch->harq_processes[i] = NULL;
} }
} }
free16(dlsch,sizeof(LTE_eNB_DLSCH_t)); free16(dlsch,sizeof(LTE_eNB_DLSCH_t));
dlsch = NULL; dlsch = NULL;
} }
} }
LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,uint32_t Nsoft,unsigned char N_RB_DL, uint8_t abstraction_flag, LTE_DL_FRAME_PARMS* frame_parms) LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,uint32_t Nsoft,unsigned char N_RB_DL, uint8_t abstraction_flag, LTE_DL_FRAME_PARMS* frame_parms)
......
...@@ -66,33 +66,12 @@ void free_ue_ulsch(LTE_UE_ULSCH_t *ulsch) ...@@ -66,33 +66,12 @@ void free_ue_ulsch(LTE_UE_ULSCH_t *ulsch)
#endif #endif
for (i=0; i<8; i++) { for (i=0; i<8; i++) {
#ifdef DEBUG_ULSCH_FREE
printf("Freeing ulsch process %d\n",i);
#endif
if (ulsch->harq_processes[i]) { if (ulsch->harq_processes[i]) {
#ifdef DEBUG_ULSCH_FREE
printf("Freeing ulsch process %d (%p)\n",i,ulsch->harq_processes[i]);
#endif
if (ulsch->harq_processes[i]->b) { if (ulsch->harq_processes[i]->b) {
free16(ulsch->harq_processes[i]->b,MAX_ULSCH_PAYLOAD_BYTES); free16(ulsch->harq_processes[i]->b,MAX_ULSCH_PAYLOAD_BYTES);
ulsch->harq_processes[i]->b = NULL; ulsch->harq_processes[i]->b = NULL;
#ifdef DEBUG_ULSCH_FREE
printf("Freeing ulsch process %d b (%p)\n",i,ulsch->harq_processes[i]->b);
#endif
} }
#ifdef DEBUG_ULSCH_FREE
printf("Freeing ulsch process %d c (%p)\n",i,ulsch->harq_processes[i]->c);
#endif
for (r=0; r<MAX_NUM_ULSCH_SEGMENTS; r++) { for (r=0; r<MAX_NUM_ULSCH_SEGMENTS; r++) {
#ifdef DEBUG_ULSCH_FREE
printf("Freeing ulsch process %d c[%d] (%p)\n",i,r,ulsch->harq_processes[i]->c[r]);
#endif
if (ulsch->harq_processes[i]->c[r]) { if (ulsch->harq_processes[i]->c[r]) {
free16(ulsch->harq_processes[i]->c[r],((r==0)?8:0) + 3+768); free16(ulsch->harq_processes[i]->c[r],((r==0)?8:0) + 3+768);
ulsch->harq_processes[i]->c[r] = NULL; ulsch->harq_processes[i]->c[r] = NULL;
...@@ -103,7 +82,6 @@ void free_ue_ulsch(LTE_UE_ULSCH_t *ulsch) ...@@ -103,7 +82,6 @@ void free_ue_ulsch(LTE_UE_ULSCH_t *ulsch)
ulsch->harq_processes[i] = NULL; ulsch->harq_processes[i] = NULL;
} }
} }
free16(ulsch,sizeof(LTE_UE_ULSCH_t)); free16(ulsch,sizeof(LTE_UE_ULSCH_t));
ulsch = NULL; ulsch = NULL;
} }
......
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