Commit 1c0b3bab authored by Laurent THOMAS's avatar Laurent THOMAS Committed by laurent

mr2553 add LOG_DDUMP() to dump a buffer in the regular tracing filter system...

mr2553 add LOG_DDUMP() to dump a buffer in the regular tracing filter system (like PHY, MAC, ...), use it and do simple cleaning (better format)
parent c599e172
This diff is collapsed.
......@@ -3640,14 +3640,7 @@ void nr_ue_process_mac_pdu(NR_UE_MAC_INST_t *mac, nr_downlink_indication_t *dl_i
}
if (mac_len > 0) {
LOG_D(NR_MAC,"DL_SCH_LCID_CCCH (e.g. RRCSetup) with payload len %d\n", mac_len);
for (int i = 0; i < mac_subheader_len; i++) {
LOG_D(NR_MAC, "MAC header %d: 0x%x\n", i, pduP[i]);
}
for (int i = 0; i < mac_len; i++) {
LOG_D(NR_MAC, "%d: 0x%x\n", i, pduP[mac_subheader_len + i]);
}
LOG_DDUMP(NR_MAC, (void *)pduP, mac_subheader_len + mac_len, LOG_DUMP_CHAR, "DL_SCH_LCID_CCCH (e.g. RRCSetup) payload: ");
mac_rlc_data_ind(mac->ue_id,
mac->ue_id,
gNB_index,
......
......@@ -2070,29 +2070,18 @@ static void nr_fill_rar(uint8_t Mod_idP, NR_RA_t *ra, uint8_t *dlsch_buffer, nfa
LOG_I(NR_MAC, "rar->TCRNTI_1 = 0x%x\n", rar->TCRNTI_1);
LOG_I(NR_MAC, "rar->TCRNTI_2 = 0x%x\n", rar->TCRNTI_2);
#endif
int mcs = (unsigned char) (rar->UL_GRANT_4 >> 4);
// time alloc
int Msg3_t_alloc = (unsigned char) (rar->UL_GRANT_3 & 0x0f);
// frequency alloc
int Msg3_f_alloc = (uint16_t) ((rar->UL_GRANT_3 >> 4) | (rar->UL_GRANT_2 << 4) | ((rar->UL_GRANT_1 & 0x03) << 12));
// frequency hopping
int freq_hopping = (unsigned char) (rar->UL_GRANT_1 >> 2);
// TA command
int ta_command = rar->TA2 + (rar->TA1 << 5);
// TC-RNTI
int t_crnti = rar->TCRNTI_2 + (rar->TCRNTI_1 << 8);
LOG_D(NR_MAC, "In %s: Transmitted RAR with t_alloc %d f_alloc %d ta_command %d mcs %d freq_hopping %d tpc_command %d csi_req %d t_crnti %x \n",
LOG_D(NR_MAC,
"In %s: Transmitted RAR with t_alloc %d f_alloc %d ta_command %d mcs %d freq_hopping %d tpc_command %d csi_req %d t_crnti "
"%x \n",
__FUNCTION__,
Msg3_t_alloc,
Msg3_f_alloc,
ta_command,
mcs,
freq_hopping,
rar->UL_GRANT_3 & 0x0f,
(rar->UL_GRANT_3 >> 4) | (rar->UL_GRANT_2 << 4) | ((rar->UL_GRANT_1 & 0x03) << 12),
rar->TA2 + (rar->TA1 << 5),
rar->UL_GRANT_4 >> 4,
rar->UL_GRANT_1 >> 2,
tpc_command,
csi_req,
t_crnti);
rar->TCRNTI_2 + (rar->TCRNTI_1 << 8));
}
void nr_schedule_RA(module_id_t module_idP,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment