Commit cab28f0f authored by Jaroslava Fiedlerova's avatar Jaroslava Fiedlerova

Merge remote-tracking branch 'origin/misc-fixes' into integration_2024_w41

parents e15fa14c 01066a3f
...@@ -154,17 +154,10 @@ static inline uint16_t BIT_STRING_to_uint16(const BIT_STRING_t *asn) { ...@@ -154,17 +154,10 @@ static inline uint16_t BIT_STRING_to_uint16(const BIT_STRING_t *asn) {
DevCheck ((asn->size > 0) && (asn->size <= 2), asn->size, 0, 0); DevCheck ((asn->size > 0) && (asn->size <= 2), asn->size, 0, 0);
switch (asn->size) { if (asn->size == 2) {
case 2: result |= asn->buf[index++] << (8 - asn->bits_unused);
result |= asn->buf[index++] << (8 - asn->bits_unused);
case 1:
result |= asn->buf[index] >> asn->bits_unused;
break;
default:
break;
} }
result |= asn->buf[index] >> asn->bits_unused;
return result; return result;
} }
......
...@@ -82,7 +82,7 @@ void nr_fill_sl_rx_indication(sl_nr_rx_indication_t *rx_ind, ...@@ -82,7 +82,7 @@ void nr_fill_sl_rx_indication(sl_nr_rx_indication_t *rx_ind,
sl_nr_ssb_pdu_t *ssb_pdu = &rx_ind->rx_indication_body[n_pdus - 1].ssb_pdu; sl_nr_ssb_pdu_t *ssb_pdu = &rx_ind->rx_indication_body[n_pdus - 1].ssb_pdu;
if (typeSpecific) { if (typeSpecific) {
uint8_t *psbch_decoded_output = (uint8_t *)typeSpecific; uint8_t *psbch_decoded_output = (uint8_t *)typeSpecific;
memcpy(ssb_pdu->psbch_payload, psbch_decoded_output, sizeof(4)); // 4 bytes of PSBCH payload bytes memcpy(ssb_pdu->psbch_payload, psbch_decoded_output, 4); // 4 bytes of PSBCH payload bytes
ssb_pdu->rsrp_dbm = sl_phy_params->psbch.rsrp_dBm_per_RE; ssb_pdu->rsrp_dbm = sl_phy_params->psbch.rsrp_dBm_per_RE;
ssb_pdu->rx_slss_id = rx_slss_id; ssb_pdu->rx_slss_id = rx_slss_id;
ssb_pdu->decode_status = true; ssb_pdu->decode_status = true;
......
...@@ -463,7 +463,7 @@ int main(int argc, char **argv) ...@@ -463,7 +463,7 @@ int main(int argc, char **argv)
s_im = malloc(n_tx*sizeof(double*)); s_im = malloc(n_tx*sizeof(double*));
r_re = malloc(n_rx*sizeof(double*)); r_re = malloc(n_rx*sizeof(double*));
r_im = malloc(n_rx*sizeof(double*)); r_im = malloc(n_rx*sizeof(double*));
memcpy((void*)&gNB->frame_parms,(void*)frame_parms,sizeof(frame_parms)); memcpy((void *)&gNB->frame_parms, (void *)frame_parms, sizeof(*frame_parms));
for (int aatx=0; aatx<n_tx; aatx++) { for (int aatx=0; aatx<n_tx; aatx++) {
s_re[aatx] = calloc(1,frame_length_complex_samples*sizeof(double)); s_re[aatx] = calloc(1,frame_length_complex_samples*sizeof(double));
s_im[aatx] = calloc(1,frame_length_complex_samples*sizeof(double)); s_im[aatx] = calloc(1,frame_length_complex_samples*sizeof(double));
......
...@@ -1662,7 +1662,7 @@ void extract_BEARER_CONTEXT_RELEASE_COMMAND(const E1AP_E1AP_PDU_t *pdu, e1ap_bea ...@@ -1662,7 +1662,7 @@ void extract_BEARER_CONTEXT_RELEASE_COMMAND(const E1AP_E1AP_PDU_t *pdu, e1ap_bea
if ((ie->value.choice.Cause.present != E1AP_Cause_PR_NOTHING) && if ((ie->value.choice.Cause.present != E1AP_Cause_PR_NOTHING) &&
(ie->value.choice.Cause.present != E1AP_Cause_PR_choice_extension)) (ie->value.choice.Cause.present != E1AP_Cause_PR_choice_extension))
bearerCxt->cause = ie->value.choice.Cause.choice.radioNetwork; bearerCxt->cause = ie->value.choice.Cause.choice.radioNetwork;
break;
default: default:
LOG_E(E1AP, "Handle for this IE is not implemented (or) invalid IE detected\n"); LOG_E(E1AP, "Handle for this IE is not implemented (or) invalid IE detected\n");
......
...@@ -1901,6 +1901,7 @@ static uint32_t nr_get_sf_periodicBSRTimer(long periodicBSR) ...@@ -1901,6 +1901,7 @@ static uint32_t nr_get_sf_periodicBSRTimer(long periodicBSR)
break; break;
case NR_BSR_Config__periodicBSR_Timer_infinity: case NR_BSR_Config__periodicBSR_Timer_infinity:
timer = UINT_MAX; timer = UINT_MAX;
break;
default: default:
AssertFatal(false, "Invalid periodicBSR_Timer %ld\n", periodicBSR); AssertFatal(false, "Invalid periodicBSR_Timer %ld\n", periodicBSR);
} }
......
...@@ -132,6 +132,7 @@ void clear_nr_nfapi_information(gNB_MAC_INST *gNB, ...@@ -132,6 +132,7 @@ void clear_nr_nfapi_information(gNB_MAC_INST *gNB,
} }
free(future_ul_tti_req->pdus_list[i].srs_pdu.beamforming.prgs_list); free(future_ul_tti_req->pdus_list[i].srs_pdu.beamforming.prgs_list);
} }
break;
default: default:
break; break;
} }
......
...@@ -386,7 +386,7 @@ static uint32_t schedule_control_sib1(module_id_t module_id, ...@@ -386,7 +386,7 @@ static uint32_t schedule_control_sib1(module_id_t module_id,
pdsch->mcs = 0; // starting from mcs 0 pdsch->mcs = 0; // starting from mcs 0
gNB_mac->sched_ctrlCommon->num_total_bytes = num_total_bytes; gNB_mac->sched_ctrlCommon->num_total_bytes = num_total_bytes;
uint8_t nr_of_candidates; uint8_t nr_of_candidates = 0;
for (int i=0; i<3; i++) { for (int i=0; i<3; i++) {
find_aggregation_candidates(&gNB_mac->sched_ctrlCommon->aggregation_level, &nr_of_candidates, gNB_mac->sched_ctrlCommon->search_space,4<<i); find_aggregation_candidates(&gNB_mac->sched_ctrlCommon->aggregation_level, &nr_of_candidates, gNB_mac->sched_ctrlCommon->search_space,4<<i);
......
...@@ -776,7 +776,7 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP) ...@@ -776,7 +776,7 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP)
pc5s_header->destinationL2Id=destinationL2Id; pc5s_header->destinationL2Id=destinationL2Id;
} }
} /* end of !ctxt.enb_flag */ } /* end of !ctxt.enb_flag */
break;
default: default:
LOG_D(PDCP, "pc5s message type %d, unknown...\n", pc5s_header->traffic_type); LOG_D(PDCP, "pc5s message type %d, unknown...\n", pc5s_header->traffic_type);
break; break;
......
...@@ -1376,7 +1376,7 @@ int MCE_handle_MBMS_SESSION_COUNTING_FAILURE(instance_t instance, module_id_t d ...@@ -1376,7 +1376,7 @@ int MCE_handle_MBMS_SESSION_COUNTING_FAILURE(instance_t instance, module_id_t d
/* mandatory */ /* mandatory */
/* c1. MCCH_Update_Time */ //long /* c1. MCCH_Update_Time */ //long
ie=(M2AP_MbmsServiceCountingRequest_Ies_t *)calloc(1,sizeof(M2AP_MbmsSchedulingInformation_Ies_t)); ie = calloc(1, sizeof(*ie));
ie->id = M2AP_ProtocolIE_ID_id_MCCH_Update_Time; ie->id = M2AP_ProtocolIE_ID_id_MCCH_Update_Time;
ie->criticality = M2AP_Criticality_reject; ie->criticality = M2AP_Criticality_reject;
ie->value.present = M2AP_MbmsServiceCountingRequest_Ies__value_PR_MCCH_Update_Time; ie->value.present = M2AP_MbmsServiceCountingRequest_Ies__value_PR_MCCH_Update_Time;
...@@ -1388,7 +1388,7 @@ int MCE_handle_MBMS_SESSION_COUNTING_FAILURE(instance_t instance, module_id_t d ...@@ -1388,7 +1388,7 @@ int MCE_handle_MBMS_SESSION_COUNTING_FAILURE(instance_t instance, module_id_t d
/* mandatory */ /* mandatory */
/* c1. MCE_MBMS_M2AP_ID (integer value) */ //long /* c1. MCE_MBMS_M2AP_ID (integer value) */ //long
ie = (M2AP_MbmsServiceCountingRequest_Ies_t *)calloc(1, sizeof(M2AP_MbmsServiceCountingRequest_Ies_t)); ie = calloc(1, sizeof(*ie));
ie->id = M2AP_ProtocolIE_ID_id_MBSFN_Area_ID; ie->id = M2AP_ProtocolIE_ID_id_MBSFN_Area_ID;
ie->criticality = M2AP_Criticality_reject; ie->criticality = M2AP_Criticality_reject;
ie->value.present = M2AP_MbmsServiceCountingRequest_Ies__value_PR_MBSFN_Area_ID; ie->value.present = M2AP_MbmsServiceCountingRequest_Ies__value_PR_MBSFN_Area_ID;
...@@ -1397,7 +1397,7 @@ int MCE_handle_MBMS_SESSION_COUNTING_FAILURE(instance_t instance, module_id_t d ...@@ -1397,7 +1397,7 @@ int MCE_handle_MBMS_SESSION_COUNTING_FAILURE(instance_t instance, module_id_t d
/* mandatory */ /* mandatory */
/* c2. TMGI (integrer value) */ /* c2. TMGI (integrer value) */
ie = (M2AP_MbmsServiceCountingRequest_Ies_t *)calloc(1, sizeof(M2AP_MbmsServiceCountingRequest_Ies_t )); ie = calloc(1, sizeof(*ie));
ie->id = M2AP_ProtocolIE_ID_id_MBMS_Counting_Request_Session; ie->id = M2AP_ProtocolIE_ID_id_MBMS_Counting_Request_Session;
ie->criticality = M2AP_Criticality_reject; ie->criticality = M2AP_Criticality_reject;
ie->value.present = M2AP_MbmsServiceCountingRequest_Ies__value_PR_MBMS_Counting_Request_Session; ie->value.present = M2AP_MbmsServiceCountingRequest_Ies__value_PR_MBMS_Counting_Request_Session;
......
...@@ -215,7 +215,7 @@ static void prepare_NR_SL_BWPConfigCommon(NR_SL_BWP_ConfigCommon_r16_t *sl_bwp, ...@@ -215,7 +215,7 @@ static void prepare_NR_SL_BWPConfigCommon(NR_SL_BWP_ConfigCommon_r16_t *sl_bwp,
// Value can be between symbols 0 to 7 // Value can be between symbols 0 to 7
sl_bwp->sl_BWP_Generic_r16->sl_StartSymbol_r16 = calloc(1, sizeof(long)); sl_bwp->sl_BWP_Generic_r16->sl_StartSymbol_r16 = calloc(1, sizeof(long));
sl_bwp->sl_BWP_Generic_r16->sl_PSBCH_Config_r16 = calloc(1,sizeof(NR_SL_PSBCH_Config_r16_t)); sl_bwp->sl_BWP_Generic_r16->sl_PSBCH_Config_r16 = calloc(1, sizeof(*sl_bwp->sl_BWP_Generic_r16->sl_PSBCH_Config_r16));
// PSBCH CONFIG contains PO and alpha for PSBCH powercontrol. // PSBCH CONFIG contains PO and alpha for PSBCH powercontrol.
sl_bwp->sl_BWP_Generic_r16->sl_PSBCH_Config_r16->present = NR_SetupRelease_SL_PSBCH_Config_r16_PR_release; sl_bwp->sl_BWP_Generic_r16->sl_PSBCH_Config_r16->present = NR_SetupRelease_SL_PSBCH_Config_r16_PR_release;
......
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