|
|
@ -554,18 +554,19 @@ void rrc::parse_ul_ccch(uint16_t rnti, byte_buffer_t *pdu)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint16_t old_rnti = 0;
|
|
|
|
uint16_t old_rnti = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (pdu) {
|
|
|
|
LIBLTE_RRC_UL_CCCH_MSG_STRUCT ul_ccch_msg;
|
|
|
|
LIBLTE_RRC_UL_CCCH_MSG_STRUCT ul_ccch_msg;
|
|
|
|
bzero(&ul_ccch_msg, sizeof(LIBLTE_RRC_UL_CCCH_MSG_STRUCT));
|
|
|
|
bzero(&ul_ccch_msg, sizeof(LIBLTE_RRC_UL_CCCH_MSG_STRUCT));
|
|
|
|
|
|
|
|
|
|
|
|
srslte_bit_unpack_vector(pdu->msg, bit_buf.msg, pdu->N_bytes*8);
|
|
|
|
srslte_bit_unpack_vector(pdu->msg, bit_buf.msg, pdu->N_bytes * 8);
|
|
|
|
bit_buf.N_bits = pdu->N_bytes*8;
|
|
|
|
bit_buf.N_bits = pdu->N_bytes * 8;
|
|
|
|
liblte_rrc_unpack_ul_ccch_msg((LIBLTE_BIT_MSG_STRUCT*)&bit_buf, &ul_ccch_msg);
|
|
|
|
liblte_rrc_unpack_ul_ccch_msg((LIBLTE_BIT_MSG_STRUCT *) &bit_buf, &ul_ccch_msg);
|
|
|
|
|
|
|
|
|
|
|
|
rrc_log->info_hex(pdu->msg, pdu->N_bytes,
|
|
|
|
rrc_log->info_hex(pdu->msg, pdu->N_bytes,
|
|
|
|
"SRB0 - Rx: %s",
|
|
|
|
"SRB0 - Rx: %s",
|
|
|
|
liblte_rrc_ul_ccch_msg_type_text[ul_ccch_msg.msg_type]);
|
|
|
|
liblte_rrc_ul_ccch_msg_type_text[ul_ccch_msg.msg_type]);
|
|
|
|
|
|
|
|
|
|
|
|
switch(ul_ccch_msg.msg_type) {
|
|
|
|
switch (ul_ccch_msg.msg_type) {
|
|
|
|
case LIBLTE_RRC_UL_CCCH_MSG_TYPE_RRC_CON_REQ:
|
|
|
|
case LIBLTE_RRC_UL_CCCH_MSG_TYPE_RRC_CON_REQ:
|
|
|
|
if (users.count(rnti)) {
|
|
|
|
if (users.count(rnti)) {
|
|
|
|
users[rnti].handle_rrc_con_req(&ul_ccch_msg.msg.rrc_con_req);
|
|
|
|
users[rnti].handle_rrc_con_req(&ul_ccch_msg.msg.rrc_con_req);
|
|
|
@ -575,8 +576,10 @@ void rrc::parse_ul_ccch(uint16_t rnti, byte_buffer_t *pdu)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case LIBLTE_RRC_UL_CCCH_MSG_TYPE_RRC_CON_REEST_REQ:
|
|
|
|
case LIBLTE_RRC_UL_CCCH_MSG_TYPE_RRC_CON_REEST_REQ:
|
|
|
|
rrc_log->debug("rnti=0x%x, phyid=0x%x, smac=0x%x, cause=%s\n",
|
|
|
|
rrc_log->debug("rnti=0x%x, phyid=0x%x, smac=0x%x, cause=%s\n",
|
|
|
|
ul_ccch_msg.msg.rrc_con_reest_req.ue_id.c_rnti, ul_ccch_msg.msg.rrc_con_reest_req.ue_id.phys_cell_id,
|
|
|
|
ul_ccch_msg.msg.rrc_con_reest_req.ue_id.c_rnti,
|
|
|
|
ul_ccch_msg.msg.rrc_con_reest_req.ue_id.short_mac_i, liblte_rrc_con_reest_req_cause_text[ul_ccch_msg.msg.rrc_con_reest_req.cause]
|
|
|
|
ul_ccch_msg.msg.rrc_con_reest_req.ue_id.phys_cell_id,
|
|
|
|
|
|
|
|
ul_ccch_msg.msg.rrc_con_reest_req.ue_id.short_mac_i,
|
|
|
|
|
|
|
|
liblte_rrc_con_reest_req_cause_text[ul_ccch_msg.msg.rrc_con_reest_req.cause]
|
|
|
|
);
|
|
|
|
);
|
|
|
|
if (users[rnti].is_idle()) {
|
|
|
|
if (users[rnti].is_idle()) {
|
|
|
|
old_rnti = ul_ccch_msg.msg.rrc_con_reest_req.ue_id.c_rnti;
|
|
|
|
old_rnti = ul_ccch_msg.msg.rrc_con_reest_req.ue_id.c_rnti;
|
|
|
@ -600,15 +603,18 @@ void rrc::parse_ul_ccch(uint16_t rnti, byte_buffer_t *pdu)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pool->deallocate(pdu);
|
|
|
|
pool->deallocate(pdu);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void rrc::parse_ul_dcch(uint16_t rnti, uint32_t lcid, byte_buffer_t *pdu)
|
|
|
|
void rrc::parse_ul_dcch(uint16_t rnti, uint32_t lcid, byte_buffer_t *pdu)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (pdu) {
|
|
|
|
if (users.count(rnti)) {
|
|
|
|
if (users.count(rnti)) {
|
|
|
|
users[rnti].parse_ul_dcch(lcid, pdu);
|
|
|
|
users[rnti].parse_ul_dcch(lcid, pdu);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
rrc_log->error("Processing %s: Unkown rnti=0x%x\n", rb_id_text[lcid], rnti);
|
|
|
|
rrc_log->error("Processing %s: Unkown rnti=0x%x\n", rb_id_text[lcid], rnti);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
/*******************************************************************************
|
|
|
@ -1757,7 +1763,7 @@ int rrc::ue::cqi_allocate(uint32_t period, uint32_t *pmi_idx, uint32_t *n_pucch)
|
|
|
|
*pmi_idx = 318 + parent->cfg.cqi_cfg.sf_mapping[j_min];
|
|
|
|
*pmi_idx = 318 + parent->cfg.cqi_cfg.sf_mapping[j_min];
|
|
|
|
} else if (period == 64) {
|
|
|
|
} else if (period == 64) {
|
|
|
|
*pmi_idx = 350 + parent->cfg.cqi_cfg.sf_mapping[j_min];
|
|
|
|
*pmi_idx = 350 + parent->cfg.cqi_cfg.sf_mapping[j_min];
|
|
|
|
} else if (period == 64) {
|
|
|
|
} else if (period == 128) {
|
|
|
|
*pmi_idx = 414 + parent->cfg.cqi_cfg.sf_mapping[j_min];
|
|
|
|
*pmi_idx = 414 + parent->cfg.cqi_cfg.sf_mapping[j_min];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|