mirror of https://github.com/PentHertz/srsLTE.git
use alternative method for conres CE scheduling
This commit is contained in:
parent
df1f8836b1
commit
cd0202aeaf
|
@ -260,6 +260,9 @@ int mac::ue_set_crnti(uint16_t temp_crnti, uint16_t crnti, sched_interface::ue_c
|
|||
if (temp_crnti != crnti) {
|
||||
// if C-RNTI is changed, it corresponds to older user. Handover scenario.
|
||||
ue_db[crnti]->reset();
|
||||
} else {
|
||||
// Schedule ConRes Msg4
|
||||
scheduler.dl_mac_buffer_state(crnti, (uint32_t)srslte::dl_sch_lcid::CON_RES_ID);
|
||||
}
|
||||
int ret = ue_cfg(crnti, cfg);
|
||||
if (ret != SRSLTE_SUCCESS) {
|
||||
|
@ -513,6 +516,7 @@ void mac::rach_detected(uint32_t tti, uint32_t enb_cc_idx, uint32_t preamble_idx
|
|||
ue_cfg.supported_cc_list.emplace_back();
|
||||
ue_cfg.supported_cc_list.back().active = true;
|
||||
ue_cfg.supported_cc_list.back().enb_cc_idx = enb_cc_idx;
|
||||
ue_cfg.ue_bearers[0].direction = srsenb::sched_interface::ue_bearer_cfg_t::BOTH;
|
||||
ue_cfg.dl_cfg.tm = SRSLTE_TM1;
|
||||
if (scheduler.ue_cfg(rnti, ue_cfg) != SRSLTE_SUCCESS) {
|
||||
Error("Registering new user rnti=0x%x to SCHED\n", rnti);
|
||||
|
@ -531,9 +535,6 @@ void mac::rach_detected(uint32_t tti, uint32_t enb_cc_idx, uint32_t preamble_idx
|
|||
// Trigger scheduler RACH
|
||||
scheduler.dl_rach_info(enb_cc_idx, rar_info);
|
||||
|
||||
// Schedule ConRes Msg4
|
||||
scheduler.dl_mac_buffer_state(rnti, (uint32_t)srslte::dl_sch_lcid::CON_RES_ID);
|
||||
|
||||
log_h->info("RACH: tti=%d, preamble=%d, offset=%d, temp_crnti=0x%x\n", tti, preamble_idx, time_adv, rnti);
|
||||
log_h->console("RACH: tti=%d, preamble=%d, offset=%d, temp_crnti=0x%x\n", tti, preamble_idx, time_adv, rnti);
|
||||
});
|
||||
|
|
|
@ -879,6 +879,7 @@ std::pair<uint32_t, uint32_t> sched_ue::get_requested_dl_bytes(uint32_t ue_cc_id
|
|||
// Ensure there is space for ConRes and RRC Setup
|
||||
// SRB0 is a special case due to being RLC TM (no segmentation possible)
|
||||
if (not bearer_is_dl(&lch[0])) {
|
||||
log_h->error("SRB0 must always be activated for DL\n");
|
||||
return {0, 0};
|
||||
}
|
||||
if (not carriers[ue_cc_idx].is_active()) {
|
||||
|
@ -894,7 +895,11 @@ std::pair<uint32_t, uint32_t> sched_ue::get_requested_dl_bytes(uint32_t ue_cc_id
|
|||
}
|
||||
// Add pending CEs
|
||||
if (ue_cc_idx == 0) {
|
||||
for (const auto& ce : pending_ces) {
|
||||
if (srb0_data == 0 and not pending_ces.empty() and pending_ces.front() == srslte::dl_sch_lcid::CON_RES_ID) {
|
||||
// Wait for SRB0 data to be available for Msg4 before scheduling the ConRes CE
|
||||
return {0, 0};
|
||||
}
|
||||
for (const ce_cmd& ce : pending_ces) {
|
||||
sum_ce_data += srslte::ce_total_size(ce);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -243,6 +243,7 @@ void rrc::ue::handle_rrc_con_req(rrc_conn_request_s* msg)
|
|||
{
|
||||
if (not parent->s1ap->is_mme_connected()) {
|
||||
parent->rrc_log->error("MME isn't connected. Sending Connection Reject\n");
|
||||
parent->mac->ue_set_crnti(rnti, rnti, ¤t_sched_ue_cfg);
|
||||
send_connection_reject();
|
||||
return;
|
||||
}
|
||||
|
@ -328,11 +329,6 @@ void rrc::ue::handle_rrc_con_setup_complete(rrc_conn_setup_complete_s* msg, srsl
|
|||
|
||||
void rrc::ue::send_connection_reject()
|
||||
{
|
||||
// Activate SRB0 if not yet activated
|
||||
sched_interface::ue_bearer_cfg_t srb0{};
|
||||
srb0.direction = sched_interface::ue_bearer_cfg_t::DL;
|
||||
parent->mac->bearer_ue_cfg(rnti, 0, &srb0);
|
||||
|
||||
dl_ccch_msg_s dl_ccch_msg;
|
||||
dl_ccch_msg.msg.set_c1().set_rrc_conn_reject().crit_exts.set_c1().set_rrc_conn_reject_r8().wait_time = 10;
|
||||
send_dl_ccch(&dl_ccch_msg);
|
||||
|
|
Loading…
Reference in New Issue