Commit 4b02d818 authored by naoi's avatar naoi

Fix: Random access information may not release if msg3_round initial value is not zero.

parent 95f677f7
...@@ -1566,6 +1566,8 @@ initiate_ra_proc(module_id_t module_idP, ...@@ -1566,6 +1566,8 @@ initiate_ra_proc(module_id_t module_idP,
struct PRACH_ConfigSIB_v1310 *ext4_prach = NULL; struct PRACH_ConfigSIB_v1310 *ext4_prach = NULL;
PRACH_ParametersListCE_r13_t *prach_ParametersListCE_r13 = NULL; PRACH_ParametersListCE_r13_t *prach_ParametersListCE_r13 = NULL;
static uint8_t failure_cnt = 0;
if (cc->radioResourceConfigCommon_BR if (cc->radioResourceConfigCommon_BR
&& cc->radioResourceConfigCommon_BR->ext4) { && cc->radioResourceConfigCommon_BR->ext4) {
ext4_prach = ext4_prach =
...@@ -1649,6 +1651,7 @@ initiate_ra_proc(module_id_t module_idP, ...@@ -1649,6 +1651,7 @@ initiate_ra_proc(module_id_t module_idP,
} }
ra[i].RA_rnti = ra_rnti; ra[i].RA_rnti = ra_rnti;
ra[i].preamble_index = preamble_index; ra[i].preamble_index = preamble_index;
failure_cnt = 0;
LOG_D(MAC, LOG_D(MAC,
"[eNB %d][RAPROC] CC_id %d Frame %d Activating RAR generation in Frame %d, subframe %d for process %d, rnti %x, state %d\n", "[eNB %d][RAPROC] CC_id %d Frame %d Activating RAR generation in Frame %d, subframe %d for process %d, rnti %x, state %d\n",
module_idP, CC_id, frameP, ra[i].Msg2_frame, module_idP, CC_id, frameP, ra[i].Msg2_frame,
...@@ -1661,6 +1664,13 @@ initiate_ra_proc(module_id_t module_idP, ...@@ -1661,6 +1664,13 @@ initiate_ra_proc(module_id_t module_idP,
LOG_E(MAC, LOG_E(MAC,
"[eNB %d][RAPROC] FAILURE: CC_id %d Frame %d Initiating RA procedure for preamble index %d\n", "[eNB %d][RAPROC] FAILURE: CC_id %d Frame %d Initiating RA procedure for preamble index %d\n",
module_idP, CC_id, frameP, preamble_index); module_idP, CC_id, frameP, preamble_index);
failure_cnt++;
if(failure_cnt > 20) {
LOG_E(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d Clear Random access information\n");
clear_ra_proc(module_idP, CC_id, frameP);
}
} }
void void
...@@ -1687,3 +1697,18 @@ cancel_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP, ...@@ -1687,3 +1697,18 @@ cancel_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP,
} }
} }
} }
void clear_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP)
{
unsigned char i;
RA_t *ra = (RA_t *) & RC.mac[module_idP]->common_channels[CC_id].ra[0];
for (i = 0; i < NB_RA_PROC_MAX; i++) {
LOG_D(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d Clear Random access information rnti %x\n", module_idP, CC_id, frameP, ra[i].rnti);
ra[i].state = IDLE;
ra[i].timing_offset = 0;
ra[i].RRC_timer = 20;
ra[i].rnti = 0;
ra[i].msg3_round = 0;
}
}
...@@ -2170,16 +2170,8 @@ int rrc_mac_remove_ue(module_id_t mod_idP, rnti_t rntiP) ...@@ -2170,16 +2170,8 @@ int rrc_mac_remove_ue(module_id_t mod_idP, rnti_t rntiP)
eNB_dlsch_info[mod_idP][pCC_id][UE_id].serving_num = 0; eNB_dlsch_info[mod_idP][pCC_id][UE_id].serving_num = 0;
// check if this has an RA process active // check if this has an RA process active
RA_t *ra; if(find_RA_id(mod_idP, pCC_id, rntiP) != -1) {
for (i = 0; i < NB_RA_PROC_MAX; i++) { cancel_ra_proc(mod_idP, pCC_id, 0, rntiP);
ra = (RA_t *) & RC.mac[mod_idP]->common_channels[pCC_id].ra[i];
if (ra->rnti == rntiP) {
ra->state = IDLE;
ra->timing_offset = 0;
ra->RRC_timer = 20;
ra->rnti = 0;
//break;
}
} }
return 0; return 0;
......
...@@ -194,7 +194,7 @@ rx_sdu(const module_id_t enb_mod_idP, ...@@ -194,7 +194,7 @@ rx_sdu(const module_id_t enb_mod_idP,
(int) mac->common_channels[CC_idP]. (int) mac->common_channels[CC_idP].
radioResourceConfigCommon->rach_ConfigCommon. radioResourceConfigCommon->rach_ConfigCommon.
maxHARQ_Msg3Tx); maxHARQ_Msg3Tx);
if (ra[RA_id].msg3_round == if (ra[RA_id].msg3_round >=
mac->common_channels[CC_idP].radioResourceConfigCommon-> mac->common_channels[CC_idP].radioResourceConfigCommon->
rach_ConfigCommon.maxHARQ_Msg3Tx - 1) { rach_ConfigCommon.maxHARQ_Msg3Tx - 1) {
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti); cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti);
......
...@@ -299,6 +299,9 @@ void cancel_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP, ...@@ -299,6 +299,9 @@ void cancel_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP,
@param Msg3_frame frame where scheduling takes place @param Msg3_frame frame where scheduling takes place
@param Msg3_subframe subframe where scheduling takes place @param Msg3_subframe subframe where scheduling takes place
*/ */
void clear_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP);
void set_msg3_subframe(module_id_t Mod_id, void set_msg3_subframe(module_id_t Mod_id,
int CC_id, int CC_id,
int frame, int frame,
......
...@@ -84,6 +84,7 @@ fill_rar(const module_id_t module_idP, ...@@ -84,6 +84,7 @@ fill_rar(const module_id_t module_idP,
ra->msg3_TPC = 3; ra->msg3_TPC = 3;
ra->msg3_ULdelay = 0; ra->msg3_ULdelay = 0;
ra->msg3_cqireq = 0; ra->msg3_cqireq = 0;
ra->msg3_round = 0;
rar[2] |= ((ra->msg3_mcs & 0x8) >> 3); // mcs 10 rar[2] |= ((ra->msg3_mcs & 0x8) >> 3); // mcs 10
rar[3] = rar[3] =
(((ra->msg3_mcs & 0x7) << 5)) | ((ra->msg3_TPC & 7) << 2) | (((ra->msg3_mcs & 0x7) << 5)) | ((ra->msg3_TPC & 7) << 2) |
......
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