Cleanup before merge
The clean up includes removing white space changes, adding logs, adding comments to make various changes more obvious, etc.
This commit is contained in:
@@ -48,9 +48,7 @@ void handle_rach(UL_IND_t *UL_info) {
|
||||
UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles = 0;
|
||||
UL_RCC_INFO.rach_ind[j].header.message_id = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
if (UL_info->rach_ind.rach_indication_body.number_of_preambles>0) {
|
||||
AssertFatal(UL_info->rach_ind.rach_indication_body.number_of_preambles==1,"More than 1 preamble not supported\n");
|
||||
UL_info->rach_ind.rach_indication_body.number_of_preambles=0;
|
||||
@@ -703,16 +701,13 @@ void UL_indication(UL_IND_t *UL_info, L1_rxtx_proc_t *proc) {
|
||||
Sched_Rsp_t *sched_info = &Sched_INFO[module_id][CC_id];
|
||||
IF_Module_t *ifi = if_inst[module_id];
|
||||
eNB_MAC_INST *mac = RC.mac[module_id];
|
||||
LOG_D(PHY,"SFN/SF:%d%d module_id:%d CC_id:%d UL_info[rx_ind:%d harqs:%d crcs:%d cqis:%d preambles:%d sr_ind:%d]\n",
|
||||
UL_info->frame,UL_info->subframe,
|
||||
module_id,CC_id,
|
||||
UL_info->rx_ind.rx_indication_body.number_of_pdus, UL_info->harq_ind.harq_indication_body.number_of_harqs, UL_info->crc_ind.crc_indication_body.number_of_crcs,
|
||||
UL_info->cqi_ind.cqi_indication_body.number_of_cqis, UL_info->rach_ind.rach_indication_body.number_of_preambles, UL_info->sr_ind.sr_indication_body.number_of_srs);
|
||||
|
||||
LOG_D(PHY, "Frame:%d Subframe:%d module_id:%d CC_id:%d UL_info[rx_ind:%d harqs:%d crcs:%d cqis:%d preambles:%d sr_ind:%d]\n",
|
||||
UL_info->frame, UL_info->subframe,
|
||||
module_id, CC_id,
|
||||
UL_info->rx_ind.rx_indication_body.number_of_pdus, UL_info->harq_ind.harq_indication_body.number_of_harqs,
|
||||
UL_info->crc_ind.crc_indication_body.number_of_crcs,
|
||||
UL_info->cqi_ind.cqi_indication_body.number_of_cqis, UL_info->rach_ind.rach_indication_body.number_of_preambles,
|
||||
UL_info->sr_ind.sr_indication_body.number_of_srs);
|
||||
|
||||
if (UL_info->frame==1023&&UL_info->subframe==6) { // dl scheduling (0,0)
|
||||
if(UL_info->frame==1023&&UL_info->subframe==6) { // dl scheduling (0,0)
|
||||
frame_cnt= (frame_cnt + 1)%7; // to prevent frame_cnt get too big
|
||||
LOG_D(MAC,"current (%d,%d) frame count dl is %d\n",UL_info->frame,UL_info->subframe,frame_cnt);
|
||||
}
|
||||
@@ -798,6 +793,7 @@ IF_Module_t *IF_Module_init(int Mod_id) {
|
||||
AssertFatal(pthread_mutex_init(&if_inst[Mod_id]->if_mutex,NULL)==0,
|
||||
"allocation of if_inst[%d]->if_mutex fails\n",Mod_id);
|
||||
}
|
||||
|
||||
memset(&UL_RCC_INFO, 0, sizeof(UL_RCC_INFO));
|
||||
return if_inst[Mod_id];
|
||||
}
|
||||
|
||||
@@ -94,6 +94,7 @@ void fill_rx_indication_UE_MAC(module_id_t Mod_id,
|
||||
pdu->rx_indication_rel9.tl.tag = NFAPI_RX_INDICATION_REL9_TAG;
|
||||
pdu->rx_indication_rel9.timing_advance_r9 = 0;
|
||||
|
||||
// ulsch_buffer is necessary to keep its value.
|
||||
pdu->data = malloc(buflen);
|
||||
memcpy(pdu->data, ulsch_buffer, buflen);
|
||||
LOG_I(MAC, "buflen of rx_ind pdu_data = %u SFN.SF: %d.%d\n", buflen,
|
||||
@@ -396,12 +397,6 @@ void fill_uci_harq_indication_UE_MAC(int Mod_id,
|
||||
pdu->harq_indication_fdd_rel13.harq_tb_n[0] =
|
||||
1; // Assuming always an ACK (No NACK or DTX)
|
||||
|
||||
// TODO: Fix ack/dtx -- needed for 5G
|
||||
// 1.) if received dl_config_req (with c-rnti) store this info and corresponding subframe.
|
||||
// 2.) if receiving ul_config_req for uci ack/nack or ulsch ack/nak in subframe n
|
||||
// go look to see if dl_config_req (with c-rnti) was received in subframe (n - 4)
|
||||
// 3.) if the answer to #2 is yes then send ACK IF NOT send DTX
|
||||
|
||||
} else if ((harq_information->harq_information_rel9_fdd.ack_nack_mode == 0)
|
||||
&& (harq_information->harq_information_rel9_fdd.harq_size
|
||||
== 2)) {
|
||||
@@ -501,7 +496,9 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
|
||||
ul_config_req);
|
||||
}
|
||||
}
|
||||
} else if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_HARQ_PDU_TYPE) {
|
||||
}
|
||||
|
||||
else if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_HARQ_PDU_TYPE) {
|
||||
// AssertFatal((UE_id =
|
||||
// find_ulsch(ul_config_pdu->ulsch_harq_pdu.ulsch_pdu.ulsch_pdu_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE))>=0,
|
||||
// "No available UE ULSCH for rnti
|
||||
@@ -784,7 +781,7 @@ void dl_config_req_UE_MAC_dci(int sfn,
|
||||
if (rnti_type == 1) { // C-RNTI (Normal DLSCH case)
|
||||
for (int ue_id = 0; ue_id < num_ue; ue_id++) {
|
||||
if (UE_mac_inst[ue_id].crnti == rnti) {
|
||||
LOG_I(MAC,
|
||||
LOG_D(MAC,
|
||||
"%s() Received data: sfn/sf:%d.%d "
|
||||
"size:%d, TX_PDU index: %d, tx_req_num_elems: %d \n",
|
||||
__func__,
|
||||
@@ -1526,30 +1523,6 @@ void enqueue_dl_config_req_tx_req(nfapi_dl_config_request_t *dl_config_req, nfap
|
||||
}
|
||||
}
|
||||
|
||||
const char *hexdump(const void *data, size_t data_len, char *out, size_t out_len)
|
||||
{
|
||||
char *p = out;
|
||||
char *endp = out + out_len;
|
||||
const uint8_t *q = data;
|
||||
snprintf(p, endp - p, "[%zu]", data_len);
|
||||
p += strlen(p);
|
||||
for (size_t i = 0; i < data_len; ++i)
|
||||
{
|
||||
if (p >= endp)
|
||||
{
|
||||
static const char ellipses[] = "...";
|
||||
char *s = endp - sizeof(ellipses);
|
||||
if (s >= p)
|
||||
{
|
||||
strcpy(s, ellipses);
|
||||
}
|
||||
break;
|
||||
}
|
||||
snprintf(p, endp - p, " %02X", *q++);
|
||||
p += strlen(p);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
__attribute__((unused))
|
||||
static void print_rx_ind(nfapi_rx_indication_t *p)
|
||||
|
||||
@@ -140,10 +140,13 @@ void hi_dci0_req_UE_MAC(int sfn,
|
||||
|
||||
int memcpy_dl_config_req (L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t* pnf_p7, nfapi_dl_config_request_t* req);
|
||||
|
||||
|
||||
int memcpy_ul_config_req (L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t* pnf_p7, nfapi_ul_config_request_t* req);
|
||||
|
||||
|
||||
int memcpy_tx_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_tx_request_t* req);
|
||||
|
||||
|
||||
int memcpy_hi_dci0_req (L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t* pnf_p7, nfapi_hi_dci0_request_t* req);
|
||||
|
||||
void UE_config_stub_pnf(void);
|
||||
|
||||
Reference in New Issue
Block a user