avoid unnecessary call to nr_write_ce_msg3_pdu
this is for do-ra mostly and it was just called to compute MSG3 size which is fixed and known
This commit is contained in:
@@ -180,8 +180,6 @@ typedef struct {
|
||||
enum { b_none, b_long, b_short, b_short_trunc, b_long_trunc } type_bsr;
|
||||
} type_bsr_t;
|
||||
|
||||
int nr_write_ce_msg3_pdu(uint8_t *mac_ce, NR_UE_MAC_INST_t *mac, rnti_t crnti, uint8_t *mac_ce_end);
|
||||
|
||||
int nr_write_ce_ulsch_pdu(uint8_t *mac_ce,
|
||||
NR_UE_MAC_INST_t *mac,
|
||||
NR_SINGLE_ENTRY_PHR_MAC_CE *power_headroom,
|
||||
|
||||
@@ -142,11 +142,8 @@ bool init_RA(NR_UE_MAC_INST_t *mac, int frame)
|
||||
ra->Msg3_size = size_sdu + sizeof(NR_MAC_SUBHEADER_SHORT) + sizeof(NR_MAC_SUBHEADER_SHORT);
|
||||
}
|
||||
|
||||
} else if (!IS_SA_MODE(get_softmodem_params())) {
|
||||
uint8_t temp_pdu[16] = {0};
|
||||
size_sdu = nr_write_ce_msg3_pdu(temp_pdu, mac, mac->crnti, temp_pdu + sizeof(temp_pdu));
|
||||
ra->Msg3_size = size_sdu;
|
||||
}
|
||||
} else if (!IS_SA_MODE(get_softmodem_params()))
|
||||
ra->Msg3_size = sizeof(uint16_t) + sizeof(NR_MAC_SUBHEADER_FIXED);
|
||||
|
||||
// Random acces procedure initialization
|
||||
mac->state = UE_PERFORMING_RA;
|
||||
|
||||
@@ -3739,21 +3739,6 @@ void nr_ue_process_mac_pdu(NR_UE_MAC_INST_t *mac, nr_downlink_indication_t *dl_i
|
||||
}
|
||||
}
|
||||
|
||||
int nr_write_ce_msg3_pdu(uint8_t *mac_ce, NR_UE_MAC_INST_t *mac, rnti_t crnti, uint8_t *mac_ce_end)
|
||||
{
|
||||
uint8_t *pdu = mac_ce;
|
||||
if (IS_SA_MODE(get_softmodem_params()) && mac->ra.ra_state != nrRA_SUCCEEDED) {
|
||||
LOG_D(NR_MAC, "Generating C-RNTI MAC CE with C-RNTI %x\n", crnti);
|
||||
*(NR_MAC_SUBHEADER_FIXED *)mac_ce = (NR_MAC_SUBHEADER_FIXED){.R = 0, .LCID = UL_SCH_LCID_C_RNTI};
|
||||
mac_ce += sizeof(NR_MAC_SUBHEADER_FIXED);
|
||||
// C-RNTI MAC CE (2 octets)
|
||||
memcpy(mac_ce, &crnti, sizeof(crnti));
|
||||
// update pointer and length
|
||||
mac_ce += sizeof(crnti);
|
||||
}
|
||||
return mac_ce - pdu;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function: generating MAC CEs (MAC CE and subheader) for the ULSCH PDU
|
||||
* Parameters:
|
||||
|
||||
@@ -32,10 +32,6 @@ softmodem_params_t *get_softmodem_params(void)
|
||||
void nr_mac_rrc_ra_ind(const module_id_t mod_id, int frame, bool success)
|
||||
{
|
||||
}
|
||||
int nr_write_ce_msg3_pdu(uint8_t *mac_ce, NR_UE_MAC_INST_t *mac, rnti_t crnti, uint8_t *mac_ce_end)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
tbs_size_t mac_rlc_data_req(const module_id_t module_idP,
|
||||
const rnti_t rntiP,
|
||||
const eNB_index_t eNB_index,
|
||||
|
||||
Reference in New Issue
Block a user