Commit d8bbfdbd authored by Raymond Knopp's avatar Raymond Knopp

bugfix in eNB_scheduler.c. Code still to be moved to L1.

parent 3d8e5e11
...@@ -547,7 +547,7 @@ copy_ulreq(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) { ...@@ -547,7 +547,7 @@ copy_ulreq(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) {
ul_req_tmp->ul_config_request_body.number_of_pdus = 0; ul_req_tmp->ul_config_request_body.number_of_pdus = 0;
if (ul_req->ul_config_request_body.number_of_pdus>0) { if (ul_req->ul_config_request_body.number_of_pdus>0) {
LOG_D(PHY, "%s() active NOW (frameP:%d subframeP:%d) pdus:%d\n", __FUNCTION__, frameP, subframeP, ul_req->ul_config_request_body.number_of_pdus); LOG_D(MAC, "%s() active NOW (frameP:%d subframeP:%d) pdus:%d\n", __FUNCTION__, frameP, subframeP, ul_req->ul_config_request_body.number_of_pdus);
} }
memcpy((void *)ul_req->ul_config_request_body.ul_config_pdu_list, memcpy((void *)ul_req->ul_config_request_body.ul_config_pdu_list,
...@@ -556,6 +556,11 @@ copy_ulreq(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) { ...@@ -556,6 +556,11 @@ copy_ulreq(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) {
} }
} }
extern int16_t find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type);
extern int16_t find_ulsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type);
extern void clean_eNb_ulsch(LTE_eNB_ULSCH_t *ulsch);
extern void clean_eNb_dlsch(LTE_eNB_DLSCH_t *dlsch);
void void
eNB_dlsch_ulsch_scheduler(module_id_t module_idP, eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
frame_t frameP, frame_t frameP,
...@@ -843,6 +848,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -843,6 +848,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
} }
/* Note: This should not be done in the MAC! */ /* Note: This should not be done in the MAC! */
/*
for (int ii=0; ii<MAX_MOBILES_PER_ENB; ii++) { for (int ii=0; ii<MAX_MOBILES_PER_ENB; ii++) {
LTE_eNB_ULSCH_t *ulsch = RC.eNB[module_idP][CC_id]->ulsch[ii]; LTE_eNB_ULSCH_t *ulsch = RC.eNB[module_idP][CC_id]->ulsch[ii];
...@@ -862,6 +868,17 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -862,6 +868,17 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
clean_eNb_dlsch(dlsch); clean_eNb_dlsch(dlsch);
} }
} }
*/
int id;
// clean ULSCH entries for rnti
id = find_ulsch(rnti,RC.eNB[module_idP][CC_id],SEARCH_EXIST);
if (id>=0) clean_eNb_ulsch(RC.eNB[module_idP][CC_id]->ulsch[id]);
// clean DLSCH entries for rnti
id = find_dlsch(rnti,RC.eNB[module_idP][CC_id],SEARCH_EXIST);
if (id>=0) clean_eNb_dlsch(RC.eNB[module_idP][CC_id]->dlsch[id][0]);
for (int j = 0; j < 10; j++) { for (int j = 0; j < 10; j++) {
nfapi_ul_config_request_body_t *ul_req_tmp = NULL; nfapi_ul_config_request_body_t *ul_req_tmp = NULL;
......
...@@ -1039,11 +1039,11 @@ void release_UE_in_freeList(module_id_t mod_id) { ...@@ -1039,11 +1039,11 @@ void release_UE_in_freeList(module_id_t mod_id) {
// clean ULSCH entries for rnti // clean ULSCH entries for rnti
id = find_ulsch(rnti,eNB_PHY,SEARCH_EXIST); id = find_ulsch(rnti,eNB_PHY,SEARCH_EXIST);
if (id>0) clean_eNb_ulsch(eNB_PHY->ulsch[id]); if (id>=0) clean_eNb_ulsch(eNB_PHY->ulsch[id]);
// clean DLSCH entries for rnti // clean DLSCH entries for rnti
id = find_dlsch(rnti,eNB_PHY,SEARCH_EXIST); id = find_dlsch(rnti,eNB_PHY,SEARCH_EXIST);
if (id>0) clean_eNb_dlsch(eNB_PHY->dlsch[id][0]); if (id>=0) clean_eNb_dlsch(eNB_PHY->dlsch[id][0]);
// clean UCI entries for rnti // clean UCI entries for rnti
for (i=0; i<NUMBER_OF_UCI_VARS_MAX; i++) { for (i=0; i<NUMBER_OF_UCI_VARS_MAX; i++) {
......
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