mirror of https://github.com/PentHertz/srsLTE.git
send DL-DCCH on SRB2 after it has been established
This commit is contained in:
parent
6b468b25f6
commit
49279c89d8
|
@ -194,6 +194,7 @@ public:
|
|||
virtual void add_bearer(uint16_t rnti, uint32_t lcid, srslte::rlc_config_t cnfg) = 0;
|
||||
virtual void add_bearer_mrb(uint16_t rnti, uint32_t lcid) = 0;
|
||||
virtual void write_sdu(uint16_t rnti, uint32_t lcid, srslte::unique_byte_buffer_t sdu) = 0;
|
||||
virtual bool has_bearer(uint16_t rnti, uint32_t lcid) = 0;
|
||||
};
|
||||
|
||||
// PDCP interface for GTPU
|
||||
|
|
|
@ -54,6 +54,7 @@ public:
|
|||
void rem_user(uint16_t rnti);
|
||||
void add_bearer(uint16_t rnti, uint32_t lcid, srslte::rlc_config_t cnfg);
|
||||
void add_bearer_mrb(uint16_t rnti, uint32_t lcid);
|
||||
bool has_bearer(uint16_t rnti, uint32_t lcid);
|
||||
|
||||
// rlc_interface_pdcp
|
||||
void write_sdu(uint16_t rnti, uint32_t lcid, srslte::unique_byte_buffer_t sdu);
|
||||
|
|
|
@ -2094,10 +2094,15 @@ void rrc::ue::send_dl_dcch(dl_dcch_msg_s* dl_dcch_msg, srslte::unique_byte_buffe
|
|||
dl_dcch_msg->pack(bref);
|
||||
pdu->N_bytes = 1u + (uint32_t)bref.distance_bytes(pdu->msg);
|
||||
|
||||
// send on SRB2 if user is fully registered (after RRC reconfig complete)
|
||||
uint32_t lcid =
|
||||
parent->rlc->has_bearer(rnti, RB_ID_SRB2) && state == RRC_STATE_REGISTERED ? RB_ID_SRB2 : RB_ID_SRB1;
|
||||
|
||||
char buf[32] = {};
|
||||
sprintf(buf, "SRB1 - rnti=0x%x", rnti);
|
||||
sprintf(buf, "SRB%d - rnti=0x%x", lcid, rnti);
|
||||
parent->log_rrc_message(buf, Tx, pdu.get(), *dl_dcch_msg);
|
||||
parent->pdcp->write_sdu(rnti, RB_ID_SRB1, std::move(pdu));
|
||||
|
||||
parent->pdcp->write_sdu(rnti, lcid, std::move(pdu));
|
||||
} else {
|
||||
parent->rrc_log->error("Allocating pdu\n");
|
||||
}
|
||||
|
|
|
@ -110,6 +110,17 @@ void rlc::add_bearer_mrb(uint16_t rnti, uint32_t lcid)
|
|||
pthread_rwlock_unlock(&rwlock);
|
||||
}
|
||||
|
||||
bool rlc::has_bearer(uint16_t rnti, uint32_t lcid)
|
||||
{
|
||||
pthread_rwlock_rdlock(&rwlock);
|
||||
bool result = false;
|
||||
if (users.count(rnti)) {
|
||||
result = users[rnti].rlc->has_bearer(lcid);
|
||||
}
|
||||
pthread_rwlock_unlock(&rwlock);
|
||||
return result;
|
||||
}
|
||||
|
||||
void rlc::read_pdu_pcch(uint8_t* payload, uint32_t buffer_size)
|
||||
{
|
||||
rrc->read_pdu_pcch(payload, buffer_size);
|
||||
|
|
Loading…
Reference in New Issue