Commit a3049674 authored by Francesco Mani's avatar Francesco Mani

warning fixed in get_band

parent d5d5c61a
...@@ -337,13 +337,14 @@ nr_bandentry_t nr_bandtable[] = { ...@@ -337,13 +337,14 @@ nr_bandentry_t nr_bandtable[] = {
{86, 1710000, 1785000, 000, 000, 20, 342000} {86, 1710000, 1785000, 000, 000, 20, 342000}
}; };
int get_band(uint32_t downlink_frequency, uint8_t *current_band, int32_t *current_offset, lte_frame_type_t *current_type) { void get_band(uint32_t downlink_frequency, uint8_t *current_band, int32_t *current_offset, lte_frame_type_t *current_type) {
int ind; int ind;
int64_t dl_freq_khz = downlink_frequency/1000; int64_t dl_freq_khz = downlink_frequency/1000;
for ( ind=0; for ( ind=0;
ind < sizeof(nr_bandtable) / sizeof(nr_bandtable[0]); ind < sizeof(nr_bandtable) / sizeof(nr_bandtable[0]);
ind++) { ind++) {
*current_band = nr_bandtable[ind].band; *current_band = nr_bandtable[ind].band;
LOG_I(PHY, "Scanning band %d, dl_min %"PRIu32", ul_min %"PRIu32"\n", ind, nr_bandtable[ind].dl_min,nr_bandtable[ind].ul_min); LOG_I(PHY, "Scanning band %d, dl_min %"PRIu32", ul_min %"PRIu32"\n", ind, nr_bandtable[ind].dl_min,nr_bandtable[ind].ul_min);
...@@ -360,9 +361,8 @@ int get_band(uint32_t downlink_frequency, uint8_t *current_band, int32_t *cu ...@@ -360,9 +361,8 @@ int get_band(uint32_t downlink_frequency, uint8_t *current_band, int32_t *cu
} }
} }
if( ind == sizeof(nr_bandtable) / sizeof(nr_bandtable[0])) { AssertFatal(ind != (sizeof(nr_bandtable) / sizeof(nr_bandtable[0])),
LOG_E(PHY,"Can't find EUTRA band for frequency %d\n", downlink_frequency); "Can't find EUTRA band for frequency %d\n", downlink_frequency);
return(-1);
}
} }
...@@ -391,7 +391,7 @@ void init_nr_transport(PHY_VARS_gNB *gNB); ...@@ -391,7 +391,7 @@ void init_nr_transport(PHY_VARS_gNB *gNB);
void init_dfts(void); void init_dfts(void);
int get_band(uint32_t downlink_frequency, uint8_t *current_band, int32_t *current_offset, lte_frame_type_t *current_type); void get_band(uint32_t downlink_frequency, uint8_t *current_band, int32_t *current_offset, lte_frame_type_t *current_type);
/** @} */ /** @} */
......
...@@ -154,7 +154,7 @@ int main(int argc, char **argv) ...@@ -154,7 +154,7 @@ int main(int argc, char **argv)
int pbch_tx_ant; int pbch_tx_ant;
int N_RB_DL=273,mu=1; int N_RB_DL=273,mu=1;
uint64_t ssb_pattern = 0; uint64_t ssb_pattern = 0x01;
unsigned char frame_type = 0; unsigned char frame_type = 0;
unsigned char pbch_phase = 0; unsigned char pbch_phase = 0;
......
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