Commit 38a38e0e authored by Romain Beurdouche's avatar Romain Beurdouche

fix(nrLDPC_coding_t2): Properly stop LDPC coding in gNB and UE

LDPC coding was yet not properly stopped by using free_nrLDPC_coding_interface in gNB and UE.
This was not causing major issue until now. It was especially not causing any issue with T2 LDPC coding using the PF.
But using T2 VFs, if the coding library is not properly stopped then the VF cannot be used anymore unless the admin app is restarted.
So this MR adds the missing free_nrLDPC_coding_interface.
parent 0d3008c2
......@@ -573,6 +573,7 @@ int main(int argc, char **argv)
}
}
free_nrLDPC_coding_interface(&nrLDPC_coding_interface);
free(pckg);
return 0;
}
......
......@@ -70,5 +70,9 @@ int load_nrLDPC_coding_interface(char *version, nrLDPC_coding_interface_t *itf)
int free_nrLDPC_coding_interface(nrLDPC_coding_interface_t *interface)
{
return interface->nrLDPC_coding_shutdown();
if (interface->nrLDPC_coding_shutdown) {
return interface->nrLDPC_coding_shutdown();
} else {
return -1;
}
}
......@@ -292,6 +292,9 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
free_and_zero(pusch_vars->llr);
} // ULSCH_id
free(gNB->pusch_vars);
free_nrLDPC_coding_interface(&gNB->nrLDPC_coding_interface);
}
//Adding nr_schedule_handler
......
......@@ -661,8 +661,6 @@ int main(int argc, char **argv)
free(gNB->gNB_config.tdd_table.max_tdd_periodicity_list[i].max_num_of_symbol_per_slot_list);
free(gNB->gNB_config.tdd_table.max_tdd_periodicity_list);
free_nrLDPC_coding_interface(&gNB->nrLDPC_coding_interface);
abortTpool(&gNB->threadPool);
phy_free_nr_gNB(gNB);
......
......@@ -603,8 +603,6 @@ int main(int argc, char **argv)
free(gNB->gNB_config.tdd_table.max_tdd_periodicity_list[i].max_num_of_symbol_per_slot_list);
free(gNB->gNB_config.tdd_table.max_tdd_periodicity_list);
free_nrLDPC_coding_interface(&gNB->nrLDPC_coding_interface);
term_nr_ue_signal(UE, 1);
free(UE);
......
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