Commit 3fafe998 authored by Mario Joa-Ng's avatar Mario Joa-Ng

NR_UE: set mac->logicalChannelBearer_exist to false when RLC bearer is released.

parent e67ee916
...@@ -677,9 +677,10 @@ int nr_rrc_mac_config_req_ue_logicalChannelBearer( ...@@ -677,9 +677,10 @@ int nr_rrc_mac_config_req_ue_logicalChannelBearer(
module_id_t module_id, module_id_t module_id,
int cc_idP, int cc_idP,
uint8_t gNB_index, uint8_t gNB_index,
long logicalChannelIdentity){ long logicalChannelIdentity,
boolean_t status){
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id); NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
mac->logicalChannelBearer_exist[logicalChannelIdentity] = true; mac->logicalChannelBearer_exist[logicalChannelIdentity] = status;
return 0; return 0;
} }
......
...@@ -82,12 +82,14 @@ int8_t nr_ue_decode_BCCH_DL_SCH(module_id_t module_id, ...@@ -82,12 +82,14 @@ int8_t nr_ue_decode_BCCH_DL_SCH(module_id_t module_id,
\param module_id module id \param module_id module id
\param cc_id component carrier id \param cc_id component carrier id
\param gNB_index gNB index \param gNB_index gNB index
\param long logicalChannelIdentity*/ \param long logicalChannelIdentity
\param boolean_t status*/
int nr_rrc_mac_config_req_ue_logicalChannelBearer( int nr_rrc_mac_config_req_ue_logicalChannelBearer(
module_id_t module_id, module_id_t module_id,
int cc_idP, int cc_idP,
uint8_t gNB_index, uint8_t gNB_index,
long logicalChannelIdentity long logicalChannelIdentity,
boolean_t status
); );
/**\brief primitive from RRC layer to MAC layer for configuration L1/L2, now supported 4 rrc messages: MIB, cell_group_config for MAC/PHY, spcell_config(serving cell config) /**\brief primitive from RRC layer to MAC layer for configuration L1/L2, now supported 4 rrc messages: MIB, cell_group_config for MAC/PHY, spcell_config(serving cell config)
......
...@@ -2083,7 +2083,7 @@ nr_rrc_ue_establish_srb2( ...@@ -2083,7 +2083,7 @@ nr_rrc_ue_establish_srb2(
LOG_I(NR_RRC, "[FRAME %05d][RRC_UE][MOD %02d][][--- MAC_CONFIG_REQ (SRB1 gNB %d) --->][MAC_UE][MOD %02d][]\n", LOG_I(NR_RRC, "[FRAME %05d][RRC_UE][MOD %02d][][--- MAC_CONFIG_REQ (SRB1 gNB %d) --->][MAC_UE][MOD %02d][]\n",
ctxt_pP->frame, ctxt_pP->module_id, gNB_index, ctxt_pP->module_id); ctxt_pP->frame, ctxt_pP->module_id, gNB_index, ctxt_pP->module_id);
nr_rrc_mac_config_req_ue_logicalChannelBearer(ctxt_pP->module_id,0,gNB_index,1); nr_rrc_mac_config_req_ue_logicalChannelBearer(ctxt_pP->module_id,0,gNB_index,1,true); //todo handle mac_LogicalChannelConfig
// rrc_mac_config_req_ue // rrc_mac_config_req_ue
} }
} else { } else {
...@@ -2099,7 +2099,7 @@ nr_rrc_ue_establish_srb2( ...@@ -2099,7 +2099,7 @@ nr_rrc_ue_establish_srb2(
LOG_I(NR_RRC, "[FRAME %05d][RRC_UE][MOD %02d][][--- MAC_CONFIG_REQ (SRB2 gNB %d) --->][MAC_UE][MOD %02d][]\n", LOG_I(NR_RRC, "[FRAME %05d][RRC_UE][MOD %02d][][--- MAC_CONFIG_REQ (SRB2 gNB %d) --->][MAC_UE][MOD %02d][]\n",
ctxt_pP->frame, ctxt_pP->module_id, gNB_index, ctxt_pP->module_id); ctxt_pP->frame, ctxt_pP->module_id, gNB_index, ctxt_pP->module_id);
nr_rrc_mac_config_req_ue_logicalChannelBearer(ctxt_pP->module_id,0,gNB_index,2); nr_rrc_mac_config_req_ue_logicalChannelBearer(ctxt_pP->module_id,0,gNB_index,2,true); //todo handle mac_LogicalChannelConfig
// rrc_mac_config_req_ue // rrc_mac_config_req_ue
} }
} // srb2 } // srb2
...@@ -2128,9 +2128,11 @@ nr_rrc_ue_establish_srb2( ...@@ -2128,9 +2128,11 @@ nr_rrc_ue_establish_srb2(
for(j = 0; j < rlc_bearer2add_list->list.count; j++){ for(j = 0; j < rlc_bearer2add_list->list.count; j++){
if(rlc_bearer2add_list->list.array[j]->servedRadioBearer != NULL){ if(rlc_bearer2add_list->list.array[j]->servedRadioBearer != NULL){
if(rlc_bearer2add_list->list.array[j]->servedRadioBearer->present == NR_RLC_BearerConfig__servedRadioBearer_PR_drb_Identity){ if(rlc_bearer2add_list->list.array[j]->servedRadioBearer->present == NR_RLC_BearerConfig__servedRadioBearer_PR_drb_Identity){
if(DRB_id == rlc_bearer2add_list->list.array[j]->servedRadioBearer->choice.drb_Identity){
LOG_I(NR_RRC, "[FRAME %05d][RRC_UE][MOD %02d][][--- MAC_CONFIG_REQ (DRB lcid %ld gNB %d) --->][MAC_UE][MOD %02d][]\n", LOG_I(NR_RRC, "[FRAME %05d][RRC_UE][MOD %02d][][--- MAC_CONFIG_REQ (DRB lcid %ld gNB %d) --->][MAC_UE][MOD %02d][]\n",
ctxt_pP->frame, ctxt_pP->module_id, rlc_bearer2add_list->list.array[j]->logicalChannelIdentity, 0, ctxt_pP->module_id); ctxt_pP->frame, ctxt_pP->module_id, rlc_bearer2add_list->list.array[j]->logicalChannelIdentity, 0, ctxt_pP->module_id);
nr_rrc_mac_config_req_ue_logicalChannelBearer(ctxt_pP->module_id,0,0,rlc_bearer2add_list->list.array[j]->logicalChannelIdentity); nr_rrc_mac_config_req_ue_logicalChannelBearer(ctxt_pP->module_id,0,0,rlc_bearer2add_list->list.array[j]->logicalChannelIdentity,true); //todo handle mac_LogicalChannelConfig
}
} }
} }
} }
...@@ -2182,6 +2184,15 @@ nr_rrc_ue_establish_srb2( ...@@ -2182,6 +2184,15 @@ nr_rrc_ue_establish_srb2(
} }
} }
if (NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->rlc_BearerToReleaseList != NULL) {
for (i = 0; i < NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->rlc_BearerToReleaseList->list.count; i++) {
int lcid = *NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->rlc_BearerToReleaseList->list.array[i];
LOG_I(NR_RRC, "[FRAME %05d][RRC_UE][MOD %02d][][--- MAC_CONFIG_REQ (RB lcid %ld gNB %d release) --->][MAC_UE][MOD %02d][]\n",
ctxt_pP->frame, ctxt_pP->module_id, lcid, 0, ctxt_pP->module_id);
nr_rrc_mac_config_req_ue_logicalChannelBearer(ctxt_pP->module_id,0,0,lcid,false); //todo handle mac_LogicalChannelConfig
}
}
NR_UE_rrc_inst[ctxt_pP->module_id].Info[gNB_index].State = NR_RRC_CONNECTED; NR_UE_rrc_inst[ctxt_pP->module_id].Info[gNB_index].State = NR_RRC_CONNECTED;
LOG_I(NR_RRC,"[UE %d] State = NR_RRC_CONNECTED (gNB %d)\n", ctxt_pP->module_id, gNB_index); LOG_I(NR_RRC,"[UE %d] State = NR_RRC_CONNECTED (gNB %d)\n", ctxt_pP->module_id, gNB_index);
} }
......
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