Commit 4fc24374 authored by francescomani's avatar francescomani

fixes for contention resolution timer etc

parent 275b82ea
...@@ -470,12 +470,12 @@ void nr_Msg3_transmitted(module_id_t mod_id, uint8_t CC_id, frame_t frameP, slot ...@@ -470,12 +470,12 @@ void nr_Msg3_transmitted(module_id_t mod_id, uint8_t CC_id, frame_t frameP, slot
int subframes_per_slot = nr_slots_per_frame[mu]/10; int subframes_per_slot = nr_slots_per_frame[mu]/10;
// start contention resolution timer (cnt in slots) // start contention resolution timer (cnt in slots)
int RA_contention_resolution_timer_subframes = (nr_rach_ConfigCommon->ra_ContentionResolutionTimer + 1) * 8; int RA_contention_resolution_timer_subframes = (nr_rach_ConfigCommon->ra_ContentionResolutionTimer + 1)<<3;
ra->RA_contention_resolution_target_frame = frameP + (RA_contention_resolution_timer_subframes/10); ra->RA_contention_resolution_target_frame = frameP + (RA_contention_resolution_timer_subframes/10);
ra->RA_contention_resolution_target_slot = (slotP + (RA_contention_resolution_timer_subframes * subframes_per_slot)) % nr_slots_per_frame[mu]; ra->RA_contention_resolution_target_slot = (slotP + (RA_contention_resolution_timer_subframes * subframes_per_slot)) % nr_slots_per_frame[mu];
LOG_D(MAC,"In %s: [UE %d] CB-RA: starting contention resolution timer set in frame.slot %d.%d and expiring in %d.%d\n", LOG_I(MAC,"In %s: [UE %d] CB-RA: contention resolution timer set in frame.slot %d.%d and expiring in %d.%d\n",
__FUNCTION__, mod_id, frameP, slotP, ra->RA_contention_resolution_target_frame, ra->RA_contention_resolution_target_slot); __FUNCTION__, mod_id, frameP, slotP, ra->RA_contention_resolution_target_frame, ra->RA_contention_resolution_target_slot);
ra->RA_contention_resolution_timer_active = 1; ra->RA_contention_resolution_timer_active = 1;
...@@ -746,7 +746,7 @@ void nr_ue_contention_resolution(module_id_t module_id, int cc_id, frame_t frame ...@@ -746,7 +746,7 @@ void nr_ue_contention_resolution(module_id_t module_id, int cc_id, frame_t frame
if (ra->RA_contention_resolution_timer_active == 1) { if (ra->RA_contention_resolution_timer_active == 1) {
if (frame >= ra->RA_contention_resolution_target_frame && if (frame >= ra->RA_contention_resolution_target_frame &&
slot >= ra->RA_contention_resolution_target_frame) { slot >= ra->RA_contention_resolution_target_slot) {
ra->t_crnti = 0; ra->t_crnti = 0;
ra->RA_active = 0; ra->RA_active = 0;
ra->RA_contention_resolution_timer_active = 0; ra->RA_contention_resolution_timer_active = 0;
......
...@@ -793,7 +793,10 @@ void nr_generate_Msg3_retransmission(module_id_t module_idP, int CC_id, frame_t ...@@ -793,7 +793,10 @@ void nr_generate_Msg3_retransmission(module_id_t module_idP, int CC_id, frame_t
ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id-1]) ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id-1])
bwp = ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id-1]; bwp = ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id-1];
coreset = get_coreset(scc, bwp, ss, NR_SearchSpace__searchSpaceType_PR_common); if (*ss->controlResourceSetId == 0)
coreset = nr_mac->sched_ctrlCommon->coreset; // this is coreset 0
else
coreset = get_coreset(scc, bwp, ss, NR_SearchSpace__searchSpaceType_PR_common);
AssertFatal(coreset!=NULL,"Coreset cannot be null for RA-Msg3 retransmission\n"); AssertFatal(coreset!=NULL,"Coreset cannot be null for RA-Msg3 retransmission\n");
nfapi_nr_ul_dci_request_t *ul_dci_req = &nr_mac->UL_dci_req[CC_id]; nfapi_nr_ul_dci_request_t *ul_dci_req = &nr_mac->UL_dci_req[CC_id];
......
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