workaround for UE to transmit msg3
This commit is contained in:
@@ -227,9 +227,9 @@ typedef struct {
|
||||
/// Random-access variable for window calculation (subframe of last change in window counter)
|
||||
uint8_t RA_tx_subframe;
|
||||
/// Scheduled TX frame for RA Msg3
|
||||
frame_t msg3_frame;
|
||||
int16_t msg3_frame;
|
||||
/// Scheduled TX slot for RA Msg3
|
||||
slot_t msg3_slot;
|
||||
int16_t msg3_slot;
|
||||
/// Random-access variable for backoff (frame of last change in backoff counter)
|
||||
uint32_t RA_backoff_frame;
|
||||
/// Random-access variable for backoff (subframe of last change in backoff counter)
|
||||
|
||||
@@ -500,6 +500,8 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
|
||||
mac->RA_PREAMBLE_TRANSMISSION_COUNTER = 1;
|
||||
mac->RA_PREAMBLE_POWER_RAMPING_COUNTER = 1;
|
||||
mac->RA_Msg3_size = size_sdu + sizeof(NR_MAC_SUBHEADER_SHORT) + sizeof(NR_MAC_SUBHEADER_SHORT);
|
||||
mac->msg3_frame = -1; // initialize to an invalid value
|
||||
mac->msg3_slot = -1;
|
||||
mac->RA_prachMaskIndex = 0;
|
||||
// todo: add the backoff condition here
|
||||
mac->RA_backoff_cnt = 0;
|
||||
@@ -560,7 +562,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
|
||||
mac->RA_window_cnt = -1;
|
||||
mac->ra_state = RA_SUCCEEDED;
|
||||
mac->generate_nr_prach = 2;
|
||||
LOG_I(MAC, "[MAC][UE %d][RAPROC]: RAR successfully received \n", mod_id);
|
||||
LOG_I(MAC, "[MAC][UE %d][RAPROC]: frame %d slot %d RAR successfully received\n", mod_id, frame, nr_slot_tx);
|
||||
|
||||
} else if (mac->RA_window_cnt == 0 && !mac->RA_RAPID_found) {
|
||||
|
||||
|
||||
@@ -1664,7 +1664,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
|
||||
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(ul_info->module_id);
|
||||
|
||||
if (mac->RA_active && ul_info->slot_tx == mac->msg3_slot && ul_info->frame_tx == mac->msg3_frame){
|
||||
if (ul_info->slot_tx == mac->msg3_slot && ul_info->frame_tx == mac->msg3_frame){
|
||||
|
||||
uint8_t ulsch_input_buffer[MAX_ULSCH_PAYLOAD_BYTES];
|
||||
nr_scheduled_response_t scheduled_response;
|
||||
@@ -1701,7 +1701,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
|
||||
}
|
||||
//}
|
||||
|
||||
LOG_D(MAC, "[UE %d] Frame %d, Subframe %d Adding Msg3 UL Config Request for rnti: %x\n",
|
||||
LOG_I(MAC, "[UE %d] Frame %d, Subframe %d Adding Msg3 UL Config Request for rnti: %x\n",
|
||||
ul_info->module_id,
|
||||
ul_info->frame_tx,
|
||||
ul_info->slot_tx,
|
||||
@@ -1721,6 +1721,8 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
|
||||
if(mac->if_module != NULL && mac->if_module->scheduled_response != NULL){
|
||||
mac->if_module->scheduled_response(&scheduled_response);
|
||||
}
|
||||
mac->msg3_frame = -1; // re-initialize to an invalid value after scheduling
|
||||
mac->msg3_slot = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1763,9 +1765,7 @@ void nr_ue_msg3_scheduler(NR_UE_MAC_INST_t *mac,
|
||||
else
|
||||
mac->msg3_frame = current_frame;
|
||||
|
||||
#ifdef DEBUG_MSG3
|
||||
LOG_D(MAC, "[DEBUG_MSG3] current_slot %d k2 %d delta %d temp_slot %d mac->msg3_frame %d mac->msg3_slot %d \n", current_slot, k2, delta, current_slot + k2 + delta, mac->msg3_frame, mac->msg3_slot);
|
||||
#endif
|
||||
}
|
||||
|
||||
// This function schedules the PRACH according to prach_ConfigurationIndex and TS 38.211, tables 6.3.3.2.x
|
||||
|
||||
Reference in New Issue
Block a user