Commit 56a9b74f authored by Sakthivel Velumani's avatar Sakthivel Velumani

Adding const and code clean-up

parent db3f68f7
...@@ -318,8 +318,8 @@ int cce_to_reg_interleaving(const int R, int k, int n_shift, const int C, int L, ...@@ -318,8 +318,8 @@ int cce_to_reg_interleaving(const int R, int k, int n_shift, const int C, int L,
return f; return f;
} }
void get_coreset_rballoc(uint8_t *FreqDomainResource,int *n_rb,int *rb_offset) { void get_coreset_rballoc(const uint8_t *FreqDomainResource, int *n_rb, int *rb_offset)
{
uint8_t count=0, start=0, start_set=0; uint8_t count=0, start=0, start_set=0;
uint64_t bitmap = (((uint64_t)FreqDomainResource[0])<<37)| uint64_t bitmap = (((uint64_t)FreqDomainResource[0])<<37)|
......
...@@ -190,7 +190,7 @@ uint32_t to_nrarfcn(int nr_bandP, uint64_t dl_CarrierFreq, uint8_t scs_index, ui ...@@ -190,7 +190,7 @@ uint32_t to_nrarfcn(int nr_bandP, uint64_t dl_CarrierFreq, uint8_t scs_index, ui
int get_first_ul_slot(int nrofDownlinkSlots, int nrofDownlinkSymbols, int nrofUplinkSymbols); int get_first_ul_slot(int nrofDownlinkSlots, int nrofDownlinkSymbols, int nrofUplinkSymbols);
int cce_to_reg_interleaving(const int R, int k, int n_shift, const int C, int L, const int N_regs); int cce_to_reg_interleaving(const int R, int k, int n_shift, const int C, int L, const int N_regs);
int get_SLIV(uint8_t S, uint8_t L); int get_SLIV(uint8_t S, uint8_t L);
void get_coreset_rballoc(uint8_t *FreqDomainResource,int *n_rb,int *rb_offset); void get_coreset_rballoc(const uint8_t *FreqDomainResource, int *n_rb, int *rb_offset);
int get_nr_table_idx(int nr_bandP, uint8_t scs_index); int get_nr_table_idx(int nr_bandP, uint8_t scs_index);
int32_t get_delta_duplex(int nr_bandP, uint8_t scs_index); int32_t get_delta_duplex(int nr_bandP, uint8_t scs_index);
frame_type_t get_frame_type(uint16_t nr_bandP, uint8_t scs_index); frame_type_t get_frame_type(uint16_t nr_bandP, uint8_t scs_index);
......
This diff is collapsed.
...@@ -58,7 +58,7 @@ int end_forms(void) { ...@@ -58,7 +58,7 @@ int end_forms(void) {
return -1; return -1;
} }
void copyData(void *scopeData, enum scopeDataType type, void *dataIn, int elementSz, int colSz, int lineSz, int offset) void copyData(void *scopeData, enum scopeDataType type, const void *dataIn, int elementSz, int colSz, int lineSz, int offset)
{ {
scopeData_t *tmp = (scopeData_t *)scopeData; scopeData_t *tmp = (scopeData_t *)scopeData;
......
...@@ -90,7 +90,7 @@ typedef struct scopeData_s { ...@@ -90,7 +90,7 @@ typedef struct scopeData_s {
RU_t *ru; RU_t *ru;
PHY_VARS_gNB *gNB; PHY_VARS_gNB *gNB;
scopeGraphData_t *liveData[MAX_SCOPE_TYPES]; scopeGraphData_t *liveData[MAX_SCOPE_TYPES];
void (*copyData)(void *, enum scopeDataType, void *data, int elementSz, int colSz, int lineSz, int offset); void (*copyData)(void *, enum scopeDataType, const void *data, int elementSz, int colSz, int lineSz, int offset);
pthread_mutex_t copyDataMutex; pthread_mutex_t copyDataMutex;
scopeGraphData_t *copyDataBufs[MAX_SCOPE_TYPES][COPIES_MEM]; scopeGraphData_t *copyDataBufs[MAX_SCOPE_TYPES][COPIES_MEM];
int copyDataBufsIdx[MAX_SCOPE_TYPES]; int copyDataBufsIdx[MAX_SCOPE_TYPES];
...@@ -100,7 +100,7 @@ typedef struct scopeData_s { ...@@ -100,7 +100,7 @@ typedef struct scopeData_s {
int load_softscope(char *exectype, void *initarg); int load_softscope(char *exectype, void *initarg);
int end_forms(void) ; int end_forms(void) ;
int copyDataMutexInit(scopeData_t *); int copyDataMutexInit(scopeData_t *);
void copyData(void *, enum scopeDataType type, void *dataIn, int elementSz, int colSz, int lineSz, int offset); void copyData(void *, enum scopeDataType type, const void *dataIn, int elementSz, int colSz, int lineSz, int offset);
#define UEscopeCopy(ue, type, ...) \ #define UEscopeCopy(ue, type, ...) \
if (ue->scopeData) \ if (ue->scopeData) \
......
...@@ -132,7 +132,7 @@ void nr_fill_dl_indication(nr_downlink_indication_t *dl_ind, ...@@ -132,7 +132,7 @@ void nr_fill_dl_indication(nr_downlink_indication_t *dl_ind,
fapi_nr_dci_indication_t *dci_ind, fapi_nr_dci_indication_t *dci_ind,
fapi_nr_rx_indication_t *rx_ind, fapi_nr_rx_indication_t *rx_ind,
const UE_nr_rxtx_proc_t *proc, const UE_nr_rxtx_proc_t *proc,
PHY_VARS_NR_UE *ue, const PHY_VARS_NR_UE *ue,
void *phy_data); void *phy_data);
/*@}*/ /*@}*/
......
...@@ -84,7 +84,7 @@ void nr_fill_dl_indication(nr_downlink_indication_t *dl_ind, ...@@ -84,7 +84,7 @@ void nr_fill_dl_indication(nr_downlink_indication_t *dl_ind,
fapi_nr_dci_indication_t *dci_ind, fapi_nr_dci_indication_t *dci_ind,
fapi_nr_rx_indication_t *rx_ind, fapi_nr_rx_indication_t *rx_ind,
const UE_nr_rxtx_proc_t *proc, const UE_nr_rxtx_proc_t *proc,
PHY_VARS_NR_UE *ue, const PHY_VARS_NR_UE *ue,
void *phy_data) void *phy_data)
{ {
memset((void*)dl_ind, 0, sizeof(nr_downlink_indication_t)); memset((void*)dl_ind, 0, sizeof(nr_downlink_indication_t));
......
...@@ -98,7 +98,7 @@ void nr_fill_dl_indication(nr_downlink_indication_t *dl_ind, ...@@ -98,7 +98,7 @@ void nr_fill_dl_indication(nr_downlink_indication_t *dl_ind,
fapi_nr_dci_indication_t *dci_ind, fapi_nr_dci_indication_t *dci_ind,
fapi_nr_rx_indication_t *rx_ind, fapi_nr_rx_indication_t *rx_ind,
const UE_nr_rxtx_proc_t *proc, const UE_nr_rxtx_proc_t *proc,
PHY_VARS_NR_UE *ue, const PHY_VARS_NR_UE *ue,
void *phy_data) void *phy_data)
{ {
} }
......
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