Commit 84e1d820 authored by francescomani's avatar francescomani

add new state for UE detachement

parent 2baa1260
......@@ -1438,6 +1438,7 @@ void nr_rrc_mac_config_req_reset(module_id_t module_id,
reset_mac_inst(mac);
nr_ue_reset_sync_state(mac);
release_mac_configuration(mac, cause);
mac->state = UE_DETACHING;
break;
case T300_EXPIRY:
reset_ra(mac, cause);
......
......@@ -168,7 +168,8 @@ typedef enum {
UE_NOT_SYNC = 0,
UE_SYNC,
UE_PERFORMING_RA,
UE_CONNECTED
UE_CONNECTED,
UE_DETACHING
} NR_UE_L2_STATE_t;
typedef enum {
......
......@@ -1085,7 +1085,7 @@ void nr_ue_dl_scheduler(NR_UE_MAC_INST_t *mac, nr_downlink_indication_t *dl_info
dl_config->slot = rx_slot;
dl_config->number_pdus = 0;
if (mac->state == UE_NOT_SYNC)
if (mac->state == UE_NOT_SYNC || mac->state == UE_DETACHING)
return;
ue_dci_configuration(mac, dl_config, rx_frame, rx_slot);
......@@ -1316,7 +1316,7 @@ void nr_ue_ul_scheduler(NR_UE_MAC_INST_t *mac, nr_uplink_indication_t *ul_info)
}
}
if(mac->state >= UE_PERFORMING_RA)
if(mac->state >= UE_PERFORMING_RA && mac->state < UE_DETACHING)
nr_ue_pucch_scheduler(mac, frame_tx, slot_tx, ul_info->phy_data);
}
......
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