moving handling of RA success for reconfigurationWithSync at RRC

This commit is contained in:
francescomani
2023-06-28 14:52:34 +02:00
parent c1fbd777a9
commit e45da1a6fa
7 changed files with 41 additions and 9 deletions
+5 -7
View File
@@ -155,12 +155,10 @@ int8_t nr_mac_rrc_data_req_ue(const module_id_t Mod_idP,
return 0;
}
int8_t nr_rrc_RA_succeeded(const module_id_t mod_id, const uint8_t gNB_index)
void nr_mac_rrc_ra_ind(const module_id_t mod_id, int frame, bool success)
{
if (NR_UE_rrc_inst[mod_id].timers_and_constants.T304_active == true) {
LOG_W(NR_RRC, "T304 was stoped with value %i\n", NR_UE_rrc_inst[mod_id].timers_and_constants.T304_cnt);
NR_UE_rrc_inst[mod_id].timers_and_constants.T304_active = false;
NR_UE_rrc_inst[mod_id].timers_and_constants.T304_cnt = 0;
}
return 0;
MessageDef *message_p = itti_alloc_new_message(TASK_MAC_UE, 0, NR_RRC_MAC_RA_IND);
NR_RRC_MAC_RA_IND (message_p).frame = frame;
NR_RRC_MAC_RA_IND (message_p).RA_succeeded = success;
itti_send_msg_to_task(TASK_RRC_NRUE, GNB_MODULE_ID_TO_INSTANCE(mod_id), message_p);
}
+21
View File
@@ -2249,6 +2249,18 @@ int32_t nr_rrc_ue_establish_drb(module_id_t ue_mod_idP,
return 0;
}
void nr_rrc_handle_ra_indication(unsigned int mod_id, bool ra_succeeded)
{
NR_UE_Timers_Constants_t *timers = &NR_UE_rrc_inst[mod_id].timers_and_constants;
if (ra_succeeded && timers->T304_active == true) {
// successful Random Access procedure triggered by reconfigurationWithSync
timers->T304_active = false;
timers->T304_cnt = 0;
// TODO handle the rest of procedures as described in 5.3.5.3 for when
// reconfigurationWithSync is included in spCellConfig
}
}
void *rrc_nrue_task(void *args_p)
{
MessageDef *msg_p;
@@ -2293,6 +2305,15 @@ void *rrc_nrue_task(void *args_p)
nr_rrc_handle_timers(timers);
break;
case NR_RRC_MAC_RA_IND:
LOG_D(NR_RRC, "[UE %d] Received %s: frame %d\n RA %s",
ue_mod_id,
ITTI_MSG_NAME (msg_p),
NR_RRC_MAC_RA_IND (msg_p).frame,
NR_RRC_MAC_RA_IND (msg_p).RA_succeeded ? "successful" : "failed");
nr_rrc_handle_ra_indication(ue_mod_id, NR_RRC_MAC_RA_IND (msg_p).RA_succeeded);
break;
case NR_RRC_MAC_BCCH_DATA_IND:
LOG_D(NR_RRC, "[UE %d] Received %s: frameP %d, gNB %d\n", ue_mod_id, ITTI_MSG_NAME (msg_p),
NR_RRC_MAC_BCCH_DATA_IND (msg_p).frame, NR_RRC_MAC_BCCH_DATA_IND (msg_p).gnb_index);
+1
View File
@@ -116,6 +116,7 @@ int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id,
void nr_mac_rrc_sync_ind(const module_id_t module_id,
const frame_t frame,
const bool in_sync);
void nr_mac_rrc_ra_ind(const module_id_t mod_id, int frame, bool success);
/**\brief
\param module_id module id