Commit 81d44c64 authored by Roberto Louro Magueta's avatar Roberto Louro Magueta

Stop timer T304 when RA is succeeded

parent 889a5007
......@@ -371,7 +371,7 @@ void nr_ue_contention_resolution(module_id_t module_id, int cc_id, frame_t frame
void nr_ra_failed(uint8_t mod_id, uint8_t CC_id, NR_PRACH_RESOURCES_t *prach_resources, frame_t frame, int slot);
void nr_ra_succeeded(module_id_t mod_id, frame_t frame, int slot);
void nr_ra_succeeded(const module_id_t mod_id, const uint8_t gNB_index, const frame_t frame, const int slot);
void nr_get_RA_window(NR_UE_MAC_INST_t *mac);
......
......@@ -3257,7 +3257,7 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info,
}
if ( (ra->RA_active == 1) && ra_success) {
nr_ra_succeeded(module_idP, frameP, slot);
nr_ra_succeeded(module_idP, gNB_index, frameP, slot);
} else if (!ra_success){
// TODO: Handle failure of RA procedure @ MAC layer
// nr_ra_failed(module_idP, CC_id, prach_resources, frameP, slot); // prach_resources is a PHY structure
......
......@@ -185,3 +185,13 @@ rrc_data_req_nr_ue(
return true; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
}
int8_t nr_rrc_RA_succeeded(const module_id_t mod_id, const uint8_t gNB_index)
{
if (NR_UE_rrc_inst[mod_id].Info[gNB_index].T304_active == 1) {
LOG_W(NR_RRC, "T304 was stoped with value %i\n", NR_UE_rrc_inst[mod_id].Info[gNB_index].T304_cnt);
NR_UE_rrc_inst[mod_id].Info[gNB_index].T304_active = 0;
NR_UE_rrc_inst[mod_id].Info[gNB_index].T304_cnt = 0;
}
return 0;
}
\ No newline at end of file
......@@ -156,6 +156,8 @@ rrc_data_req_nr_ue(
const pdcp_transmission_mode_t modeP
);
int8_t nr_rrc_RA_succeeded(const module_id_t mod_id, const uint8_t gNB_index);
/**\brief RRC UE task.
\param void *args_p Pointer on arguments to start the task. */
void *rrc_nrue_task(void *args_p);
......
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