removing MAC reset cause from reset_ra
This commit is contained in:
@@ -1426,7 +1426,7 @@ void nr_rrc_mac_config_req_reset(module_id_t module_id,
|
|||||||
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
|
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
|
||||||
switch (cause) {
|
switch (cause) {
|
||||||
case GO_TO_IDLE:
|
case GO_TO_IDLE:
|
||||||
reset_ra(mac, cause);
|
reset_ra(mac, true);
|
||||||
release_mac_configuration(mac, cause);
|
release_mac_configuration(mac, cause);
|
||||||
nr_ue_init_mac(mac);
|
nr_ue_init_mac(mac);
|
||||||
nr_ue_mac_default_configs(mac);
|
nr_ue_mac_default_configs(mac);
|
||||||
@@ -1435,14 +1435,14 @@ void nr_rrc_mac_config_req_reset(module_id_t module_id,
|
|||||||
break;
|
break;
|
||||||
case DETACH:
|
case DETACH:
|
||||||
LOG_A(NR_MAC, "Received detach indication\n");
|
LOG_A(NR_MAC, "Received detach indication\n");
|
||||||
reset_ra(mac, cause);
|
reset_ra(mac, true);
|
||||||
reset_mac_inst(mac);
|
reset_mac_inst(mac);
|
||||||
nr_ue_reset_sync_state(mac);
|
nr_ue_reset_sync_state(mac);
|
||||||
release_mac_configuration(mac, cause);
|
release_mac_configuration(mac, cause);
|
||||||
mac->state = UE_DETACHING;
|
mac->state = UE_DETACHING;
|
||||||
break;
|
break;
|
||||||
case T300_EXPIRY:
|
case T300_EXPIRY:
|
||||||
reset_ra(mac, cause);
|
reset_ra(mac, false);
|
||||||
reset_mac_inst(mac);
|
reset_mac_inst(mac);
|
||||||
mac->state = UE_SYNC; // still in sync but need to restart RA
|
mac->state = UE_SYNC; // still in sync but need to restart RA
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ NR_UE_MAC_INST_t * nr_l2_init_ue(int nb_inst);
|
|||||||
NR_UE_MAC_INST_t *get_mac_inst(module_id_t module_id);
|
NR_UE_MAC_INST_t *get_mac_inst(module_id_t module_id);
|
||||||
|
|
||||||
void reset_mac_inst(NR_UE_MAC_INST_t *nr_mac);
|
void reset_mac_inst(NR_UE_MAC_INST_t *nr_mac);
|
||||||
void reset_ra(NR_UE_MAC_INST_t *nr_mac, NR_UE_MAC_reset_cause_t cause);
|
void reset_ra(NR_UE_MAC_INST_t *nr_mac, bool free_prach);
|
||||||
void release_mac_configuration(NR_UE_MAC_INST_t *mac,
|
void release_mac_configuration(NR_UE_MAC_INST_t *mac,
|
||||||
NR_UE_MAC_reset_cause_t cause);
|
NR_UE_MAC_reset_cause_t cause);
|
||||||
|
|
||||||
|
|||||||
@@ -299,14 +299,14 @@ void free_rach_structures(NR_UE_MAC_INST_t *nr_mac, int bwp_id)
|
|||||||
free(nr_mac->ssb_list[bwp_id].tx_ssb);
|
free(nr_mac->ssb_list[bwp_id].tx_ssb);
|
||||||
}
|
}
|
||||||
|
|
||||||
void reset_ra(NR_UE_MAC_INST_t *nr_mac, NR_UE_MAC_reset_cause_t cause)
|
void reset_ra(NR_UE_MAC_INST_t *nr_mac, bool free_prach)
|
||||||
{
|
{
|
||||||
RA_config_t *ra = &nr_mac->ra;
|
RA_config_t *ra = &nr_mac->ra;
|
||||||
if(ra->rach_ConfigDedicated)
|
if(ra->rach_ConfigDedicated)
|
||||||
asn1cFreeStruc(asn_DEF_NR_RACH_ConfigDedicated, ra->rach_ConfigDedicated);
|
asn1cFreeStruc(asn_DEF_NR_RACH_ConfigDedicated, ra->rach_ConfigDedicated);
|
||||||
memset(ra, 0, sizeof(RA_config_t));
|
memset(ra, 0, sizeof(RA_config_t));
|
||||||
|
|
||||||
if (cause == T300_EXPIRY)
|
if (!free_prach)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (int i = 0; i < MAX_NUM_BWP_UE; i++)
|
for (int i = 0; i < MAX_NUM_BWP_UE; i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user