Commit 9a8dbf5d authored by Raymond Knopp's avatar Raymond Knopp

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6309 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent d08a7f4a
......@@ -936,6 +936,87 @@ void pdcp_run (
}
boolean_t pdcp_remove_UE(
const moduled_id_t enb_mod_idP,
const module_id_t ue_mod_idP,
const frame_t frameP) {
pdcp_t *pdcp_p = NULL;
DRB_Identity_t srb_id = 0;
DRB_Identity_t drb_id = 0;
// check and remove SRBs first
for (srb_id=0;srb_id<2;srb_id++) {
pdcp_p = &pdcp_array_srb_eNB[enb_mod_idP][ue_mod_idP][srb_id-1];
if (pdcp_p->instanciated_instance == TRUE) {
pdcp_p->instanciated_instance = FALSE;
pdcp_p->lcid = 0;
pdcp_p->header_compression_profile = 0x0;
pdcp_p->cipheringAlgorithm = 0xff;
pdcp_p->integrityProtAlgorithm = 0xff;
pdcp_p->status_report = 0;
pdcp_p->rlc_mode = RLC_MODE_NONE;
pdcp_p->next_pdcp_tx_sn = 0;
pdcp_p->next_pdcp_rx_sn = 0;
pdcp_p->tx_hfn = 0;
pdcp_p->rx_hfn = 0;
pdcp_p->last_submitted_pdcp_rx_sn = 4095;
pdcp_p->seq_num_size = 0;
pdcp_p->first_missing_pdu = -1;
pdcp_p->security_activated = 0;
/* Security keys */
if (pdcp_p->kUPenc != NULL) {
free(pdcp_p->kUPenc);
}
if (pdcp_p->kRRCint != NULL) {
free(pdcp_p->kRRCint);
}
if (pdcp_p->kRRCenc != NULL) {
free(pdcp_p->kRRCenc);
}
}
}
for (drb_id=0;drb_id<maxDRB;drb_id++) {
pdcp_p = &pdcp_array_drb_eNB[enb_mod_idP][ue_mod_idP][drb_id-1];
if (pdcp_p->instanciated_instance == TRUE) {
pdcp_p->instanciated_instance = FALSE;
pdcp_p->lcid = 0;
pdcp_p->header_compression_profile = 0x0;
pdcp_p->cipheringAlgorithm = 0xff;
pdcp_p->integrityProtAlgorithm = 0xff;
pdcp_p->status_report = 0;
pdcp_p->rlc_mode = RLC_MODE_NONE;
pdcp_p->next_pdcp_tx_sn = 0;
pdcp_p->next_pdcp_rx_sn = 0;
pdcp_p->tx_hfn = 0;
pdcp_p->rx_hfn = 0;
pdcp_p->last_submitted_pdcp_rx_sn = 4095;
pdcp_p->seq_num_size = 0;
pdcp_p->first_missing_pdu = -1;
pdcp_p->security_activated = 0;
/* Security keys */
if (pdcp_p->kUPenc != NULL) {
free(pdcp_p->kUPenc);
}
if (pdcp_p->kRRCint != NULL) {
free(pdcp_p->kRRCint);
}
if (pdcp_p->kRRCenc != NULL) {
free(pdcp_p->kRRCenc);
}
}
}
return 1;
}
boolean_t rrc_pdcp_config_asn1_req (
const module_id_t enb_mod_idP,
const module_id_t ue_mod_idP,
......
......@@ -348,6 +348,20 @@ public_pdcp(boolean_t pdcp_config_req_asn1 (
uint8_t *const kRRCenc,
uint8_t *const kRRCint,
uint8_t *const kUPenc));
/*! \fn boolean_t pdcp_remove_UE(const module_id_t enb_mod_idP,const module_id_t ue_mod_idP,const frame_t frameP)
* \brief Function for RRC to configure a Radio Bearer clear all PDCP resources for a particular UE
* \param[in] enb_mod_idP index of eNB
* \param[in] enb_mod_idP index of UE
* \param[in] frameP frame
* \return A status about the processing, OK or error code.
*/
public_pdcp(boolean_t pdcp_remove_UE(
const module_id_t enb_mod_idP,
const module_id_t ue_mod_idP,
const frame_t frameP));
/*! \fn void rrc_pdcp_config_release(module_id_t, rb_id_t)
* \brief This functions is unused
* \param[in] module_id Module ID of relevant PDCP entity
......
......@@ -369,7 +369,7 @@ public_rlc_rrc(void
* \param[in] eNB_flagP Flag to indicate eNB (1) or UE (0)
* \return A status about the processing, OK or error code.
*/
public_rlc_rrc(rlc_op_status_t rrc_rlc_remove_ue (const module_id_t enb_mod_idP,const module_id_t ue_mod_idP,const eNB_flag_t enb_flagP,const frame_t frameP,const eNB_flag_t enb_flagP);)
public_rlc_rrc(rlc_op_status_t rrc_rlc_remove_ue (const module_id_t enb_mod_idP,const module_id_t ue_mod_idP,const frame_t frameP,const eNB_flag);)
/*! \fn rlc_op_status_t rrc_rlc_remove_rlc (const module_id_t enb_mod_idP, const module_id_t ue_mod_idP, const frame_t frameP, const eNB_flag_t eNB_flagP, const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP)
......
......@@ -473,7 +473,6 @@ rb_free_rlc_union (void *rlcu_pP)
rlc_op_status_t rrc_rlc_remove_ue (
const module_id_t enb_mod_idP,
const module_id_t ue_mod_idP,
const eNB_flag_t enb_flagP,
const frame_t frameP,
const eNB_flag_t enb_flagP) {
//-----------------------------------------------------------------------------
......
......@@ -543,7 +543,9 @@ void rrc_eNB_free_UE_index(
eNB_rrc_inst[enb_mod_idP].Info.UE[ue_mod_idP].Status = RRC_IDLE;
eNB_rrc_inst[enb_mod_idP].Info.UE_list[ue_mod_idP] = 0;
rrc_rlc_remove_rlc(enb_mod_idP, ue_mod_idP, frameP, ENB_FLAG_YES, SRB_FLAG_YES, MBMS_FLAG_NO,1);
rrc_rlc_remove_ue(enb_mod_idP, ue_mod_idP, frameP,ENB_FLAG_YES);
pdcp_remove_UE(enb_mod_idP, ue_mod_idP, frameP);
free(eNB_rrc_inst[enb_mod_idP].SRB_configList[ue_mod_idP]);
}
......
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