Add const qualifier in some variables
This commit is contained in:
@@ -928,7 +928,7 @@ bool nr_ue_periodic_srs_scheduling(module_id_t mod_id, frame_t frame, slot_t slo
|
||||
bool srs_scheduled = false;
|
||||
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id);
|
||||
NR_BWP_Id_t ul_bwp_id = mac->UL_BWP_Id;
|
||||
const NR_BWP_Id_t ul_bwp_id = mac->UL_BWP_Id;
|
||||
|
||||
NR_SRS_Config_t *srs_config = NULL;
|
||||
if (ul_bwp_id > 0 && mac->ULbwp[ul_bwp_id-1]) {
|
||||
|
||||
@@ -41,9 +41,9 @@ void nr_configure_srs(nfapi_nr_srs_pdu_t *srs_pdu, int module_id, int CC_id,NR_U
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
||||
|
||||
const NR_SIB1_t *sib1 = nrmac->common_channels[0].sib1 ? nrmac->common_channels[0].sib1->message.choice.c1->choice.systemInformationBlockType1 : NULL;
|
||||
NR_BWP_t *genericParameters = get_ul_bwp_genericParameters(sched_ctrl->active_ubwp,
|
||||
scc,
|
||||
sib1);
|
||||
const NR_BWP_t *genericParameters = get_ul_bwp_genericParameters(sched_ctrl->active_ubwp,
|
||||
scc,
|
||||
sib1);
|
||||
|
||||
srs_pdu->rnti = UE->rnti;
|
||||
srs_pdu->handle = 0;
|
||||
@@ -173,14 +173,14 @@ void nr_schedule_srs(int module_id, frame_t frame) {
|
||||
}
|
||||
|
||||
const NR_SIB1_t *sib1 = nrmac->common_channels[0].sib1 ? nrmac->common_channels[0].sib1->message.choice.c1->choice.systemInformationBlockType1 : NULL;
|
||||
NR_BWP_t *genericParameters = get_ul_bwp_genericParameters(sched_ctrl->active_ubwp,
|
||||
scc,
|
||||
sib1);
|
||||
const NR_BWP_t *genericParameters = get_ul_bwp_genericParameters(sched_ctrl->active_ubwp,
|
||||
scc,
|
||||
sib1);
|
||||
|
||||
uint16_t period = srs_period[srs_resource->resourceType.choice.periodic->periodicityAndOffset_p.present];
|
||||
uint16_t offset = get_nr_srs_offset(srs_resource->resourceType.choice.periodic->periodicityAndOffset_p);
|
||||
|
||||
int n_slots_frame = nr_slots_per_frame[genericParameters->subcarrierSpacing];
|
||||
const int n_slots_frame = nr_slots_per_frame[genericParameters->subcarrierSpacing];
|
||||
|
||||
// Check if UE will transmit the SRS in this frame
|
||||
if ( ((frame - offset/n_slots_frame)*n_slots_frame)%period == 0) {
|
||||
|
||||
@@ -789,7 +789,7 @@ void handle_nr_srs_measurements(const module_id_t module_id,
|
||||
}
|
||||
#endif
|
||||
|
||||
NR_UE_info_t* UE = find_nr_UE(&RC.nrmac[module_id]->UE_info, rnti);
|
||||
NR_UE_info_t *UE = find_nr_UE(&RC.nrmac[module_id]->UE_info, rnti);
|
||||
if (!UE) {
|
||||
LOG_W(NR_MAC, "Could not find UE for RNTI 0x%04x\n", rnti);
|
||||
return;
|
||||
@@ -799,7 +799,7 @@ void handle_nr_srs_measurements(const module_id_t module_id,
|
||||
NR_mac_stats_t *stats = &UE->mac_stats;
|
||||
stats->srs_wide_band_snr = (wide_band_snr>>1)-64;
|
||||
|
||||
int ul_prbblack_SNR_threshold = nr_mac->ul_prbblack_SNR_threshold;
|
||||
const int ul_prbblack_SNR_threshold = nr_mac->ul_prbblack_SNR_threshold;
|
||||
uint16_t *ulprbbl = nr_mac->ulprbbl;
|
||||
|
||||
memset(ulprbbl, 0, reported_symbol_list[0].num_rbs*sizeof(uint16_t));
|
||||
|
||||
@@ -230,8 +230,8 @@ void handle_nr_srs(NR_UL_IND_t *UL_info) {
|
||||
const module_id_t module_id = UL_info->module_id;
|
||||
const frame_t frame = UL_info->srs_ind.sfn;
|
||||
const sub_frame_t slot = UL_info->srs_ind.slot;
|
||||
int num_srs = UL_info->srs_ind.number_of_pdus;
|
||||
nfapi_nr_srs_indication_pdu_t *srs_list = UL_info->srs_ind.pdu_list;
|
||||
const int num_srs = UL_info->srs_ind.number_of_pdus;
|
||||
const nfapi_nr_srs_indication_pdu_t *srs_list = UL_info->srs_ind.pdu_list;
|
||||
|
||||
for (int i = 0; i < num_srs; i++) {
|
||||
const nfapi_nr_srs_indication_pdu_t *srs_ind = &srs_list[i];
|
||||
|
||||
@@ -2067,7 +2067,7 @@ void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, NR_CellGr
|
||||
}
|
||||
|
||||
void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
|
||||
int uid,
|
||||
const int uid,
|
||||
NR_UE_NR_Capability_t *uecap,
|
||||
const gNB_RrcConfigurationReq* configuration) {
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ void fill_initial_cellGroupConfig(int uid,
|
||||
const gNB_RrcConfigurationReq *configuration);
|
||||
|
||||
void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
|
||||
int uid,
|
||||
const int uid,
|
||||
NR_UE_NR_Capability_t *uecap,
|
||||
const gNB_RrcConfigurationReq *configuration);
|
||||
|
||||
|
||||
@@ -324,7 +324,7 @@ void config_csiim(int do_csirs, int dl_antenna_ports, int curr_bwp,
|
||||
}
|
||||
|
||||
// TODO: Implement to b_SRS = 1 and b_SRS = 2
|
||||
long rrc_get_max_nr_csrs(uint8_t max_rbs, long b_SRS) {
|
||||
long rrc_get_max_nr_csrs(const uint8_t max_rbs, const long b_SRS) {
|
||||
|
||||
if(b_SRS>0) {
|
||||
LOG_E(NR_RRC,"rrc_get_max_nr_csrs(): Not implemented yet for b_SRS>0\n");
|
||||
@@ -349,9 +349,9 @@ long rrc_get_max_nr_csrs(uint8_t max_rbs, long b_SRS) {
|
||||
}
|
||||
|
||||
void config_srs(NR_SetupRelease_SRS_Config_t *setup_release_srs_Config,
|
||||
NR_ServingCellConfigCommon_t *servingcellconfigcommon,
|
||||
int uid,
|
||||
int do_srs) {
|
||||
const NR_ServingCellConfigCommon_t *servingcellconfigcommon,
|
||||
const int uid,
|
||||
const int do_srs) {
|
||||
|
||||
setup_release_srs_Config->present = NR_SetupRelease_SRS_Config_PR_setup;
|
||||
|
||||
|
||||
@@ -129,9 +129,9 @@ void config_csirs(NR_ServingCellConfigCommon_t *servingcellconfigcommon,
|
||||
void config_csiim(int do_csirs, int dl_antenna_ports, int curr_bwp,
|
||||
NR_CSI_MeasConfig_t *csi_MeasConfig);
|
||||
void config_srs(NR_SetupRelease_SRS_Config_t *setup_release_srs_Config,
|
||||
NR_ServingCellConfigCommon_t *servingcellconfigcommon,
|
||||
int uid,
|
||||
int do_srs);
|
||||
const NR_ServingCellConfigCommon_t *servingcellconfigcommon,
|
||||
const int uid,
|
||||
const int do_srs);
|
||||
void set_dl_mcs_table(int scs, NR_UE_NR_Capability_t *cap,
|
||||
NR_SpCellConfig_t *SpCellConfig,
|
||||
NR_BWP_DownlinkDedicated_t *bwp_Dedicated,
|
||||
|
||||
Reference in New Issue
Block a user