fixed UE not reattaching after paging
This commit is contained in:
parent
0f9f76ff00
commit
5fed766806
|
@ -77,6 +77,7 @@ public:
|
|||
|
||||
// RRC interface
|
||||
void reset();
|
||||
void empty_queue();
|
||||
void add_bearer(uint32_t lcid);
|
||||
void add_bearer(uint32_t lcid, srslte_rlc_config_t cnfg);
|
||||
|
||||
|
|
|
@ -56,6 +56,7 @@ public:
|
|||
|
||||
void configure(srslte_rlc_config_t cnfg);
|
||||
void reset();
|
||||
void empty_queue();
|
||||
bool active();
|
||||
|
||||
rlc_mode_t get_mode();
|
||||
|
|
|
@ -380,7 +380,7 @@ int decode_cqi_long(srslte_uci_cqi_pusch_t *q, int16_t *q_bits, uint32_t Q,
|
|||
ret = srslte_crc_checksum(&q->crc, q->tmp_cqi, nof_bits + 8);
|
||||
if (ret == 0) {
|
||||
memcpy(data, q->tmp_cqi, nof_bits*sizeof(uint8_t));
|
||||
ret = 1;
|
||||
ret = 1;
|
||||
} else {
|
||||
ret = 0;
|
||||
}
|
||||
|
|
|
@ -102,6 +102,14 @@ void rlc::reset()
|
|||
rlc_array[0].init(RLC_MODE_TM, rlc_log, default_lcid, pdcp, rrc, mac_timers); // SRB0
|
||||
}
|
||||
|
||||
void rlc::empty_queue()
|
||||
{
|
||||
for(uint32_t i=0; i<SRSLTE_N_RADIO_BEARERS; i++) {
|
||||
if(rlc_array[i].active())
|
||||
rlc_array[i].empty_queue();
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
PDCP interface
|
||||
*******************************************************************************/
|
||||
|
|
|
@ -76,6 +76,12 @@ void rlc_entity::reset()
|
|||
rlc = NULL;
|
||||
}
|
||||
|
||||
|
||||
void rlc_entity::empty_queue()
|
||||
{
|
||||
rlc->empty_queue();
|
||||
}
|
||||
|
||||
bool rlc_entity::active()
|
||||
{
|
||||
return (rlc != NULL);
|
||||
|
|
|
@ -259,7 +259,7 @@ void mac::rl_failure(uint16_t rnti)
|
|||
if (ue_db.count(rnti)) {
|
||||
uint32_t nof_fails = ue_db[rnti]->rl_failure();
|
||||
if (nof_fails >= (uint32_t) args.link_failure_nof_err && args.link_failure_nof_err > 0) {
|
||||
Info("Detected PUSCH failure for rnti=0x%x\n", rnti);
|
||||
Info("Detected Uplink failure for rnti=0x%x\n", rnti);
|
||||
rrc_h->rl_failure(rnti);
|
||||
ue_db[rnti]->rl_failure_reset();
|
||||
}
|
||||
|
|
|
@ -152,7 +152,7 @@ void parse_args(all_args_t *args, int argc, char* argv[]) {
|
|||
"Maximum number of turbo decoder iterations")
|
||||
|
||||
("expert.tx_amplitude",
|
||||
bpo::value<float>(&args->expert.phy.tx_amplitude)->default_value(0.8),
|
||||
bpo::value<float>(&args->expert.phy.tx_amplitude)->default_value(0.6),
|
||||
"Transmit amplitude factor")
|
||||
|
||||
("expert.nof_phy_threads",
|
||||
|
@ -176,7 +176,7 @@ void parse_args(all_args_t *args, int argc, char* argv[]) {
|
|||
"Chooses the coefficients for the 3-tap channel estimator centered filter.")
|
||||
|
||||
("expert.rrc_inactivity_timer",
|
||||
bpo::value<uint32_t>(&args->expert.rrc_inactivity_timer)->default_value(30000),
|
||||
bpo::value<uint32_t>(&args->expert.rrc_inactivity_timer)->default_value(10000),
|
||||
"Inactivity timer in ms")
|
||||
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ void phch_worker::init(phch_common* phy_, srslte::log *log_h_)
|
|||
return;
|
||||
}
|
||||
|
||||
srslte_pucch_set_threshold(&enb_ul.pucch, 0.8, 0.5);
|
||||
srslte_pucch_set_threshold(&enb_ul.pucch, 0.5, 0.5);
|
||||
srslte_sch_set_max_noi(&enb_ul.pusch.ul_sch, phy->params.pusch_max_its);
|
||||
srslte_enb_dl_set_amp(&enb_dl, phy->params.tx_amplitude);
|
||||
|
||||
|
@ -355,7 +355,6 @@ int phch_worker::decode_pusch(srslte_enb_ul_pusch_t *grants, uint32_t nof_pusch,
|
|||
}
|
||||
if (cqi_enabled) {
|
||||
uci_data.uci_cqi_len = srslte_cqi_size(&cqi_value);
|
||||
Info("cqi enabled len=%d\n", uci_data.uci_cqi_len);
|
||||
}
|
||||
|
||||
// mark this tti as having an ul grant to avoid pucch
|
||||
|
@ -415,7 +414,7 @@ int phch_worker::decode_pusch(srslte_enb_ul_pusch_t *grants, uint32_t nof_pusch,
|
|||
}
|
||||
*/
|
||||
log_h->info_hex(grants[i].data, phy_grant.mcs.tbs/8,
|
||||
"PUSCH: rnti=0x%x, prb=(%d,%d), tbs=%d, mcs=%d, rv=%d, snr=%.1f dB, n_iter=%d, crc=%s%s%s%s\n",
|
||||
"PUSCH: rnti=0x%x, prb=(%d,%d), tbs=%d, mcs=%d, rv=%d, snr=%.1f dB, n_iter=%d, crc=%s%s%s%s\n",
|
||||
rnti, phy_grant.n_prb[0], phy_grant.n_prb[0]+phy_grant.L_prb,
|
||||
phy_grant.mcs.tbs/8, phy_grant.mcs.idx, grants[i].grant.rv_idx,
|
||||
snr_db,
|
||||
|
|
|
@ -83,11 +83,11 @@ void rlc::reset(uint16_t rnti)
|
|||
void rlc::clear_buffer(uint16_t rnti)
|
||||
{
|
||||
if (users.count(rnti)) {
|
||||
log_h->info("Clearing buffer rnti=0x%x\n", rnti);
|
||||
users[rnti].rlc->reset();
|
||||
users[rnti].rlc->empty_queue();
|
||||
for (int i=0;i<SRSLTE_N_RADIO_BEARERS;i++) {
|
||||
mac->rlc_buffer_state(rnti, i, 0, 0);
|
||||
}
|
||||
log_h->info("Cleared buffer rnti=0x%x\n", rnti);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -313,7 +313,7 @@ void rrc::release_complete(uint16_t rnti)
|
|||
rlc->clear_buffer(rnti);
|
||||
users[rnti].send_connection_release();
|
||||
// There is no RRCReleaseComplete message from UE thus sleep to enable all retx in PHY +50%
|
||||
usleep(1.5*8*1e3*cfg.mac_cnfg.ulsch_cnfg.max_harq_tx);
|
||||
usleep(1500*8*cfg.mac_cnfg.ulsch_cnfg.max_harq_tx);
|
||||
}
|
||||
rem_user(rnti);
|
||||
} else {
|
||||
|
@ -437,7 +437,7 @@ void rrc::add_paging_id(uint32_t ueid, LIBLTE_S1AP_UEPAGINGID_STRUCT UEPagingID)
|
|||
// Described in Section 7 of 36.304
|
||||
bool rrc::is_paging_opportunity(uint32_t tti, uint32_t *payload_len)
|
||||
{
|
||||
int sf_pattern[4][3] = {{9, 4, 0}, {-1, 9, 4}, {-1, -1, 5}, {-1, -1, 9}};
|
||||
int sf_pattern[4][4] = {{9, 4, -1, 0}, {-1, 9, -1, 4}, {-1, -1, -1, 5}, {-1, -1, -1, 9}};
|
||||
|
||||
if (pending_paging.empty()) {
|
||||
return false;
|
||||
|
@ -466,7 +466,7 @@ bool rrc::is_paging_opportunity(uint32_t tti, uint32_t *payload_len)
|
|||
|
||||
if ((sfn % T) == (T/N) * (ueid % N)) {
|
||||
|
||||
int sf_idx = sf_pattern[i_s%4][(Ns-1)%3];
|
||||
int sf_idx = sf_pattern[i_s%4][(Ns-1)%4];
|
||||
if (sf_idx < 0) {
|
||||
rrc_log->error("SF pattern is N/A for Ns=%d, i_s=%d, imsi_decimal=%d\n", Ns, i_s, ueid);
|
||||
} else if ((uint32_t) sf_idx == (tti%10)) {
|
||||
|
|
Loading…
Reference in New Issue