Commit 4b859a2e authored by Thomas Schlichter's avatar Thomas Schlichter Committed by Robert Schmidt

fix sidelink UE issues found by sanitizer

parent d47eb536
......@@ -802,7 +802,7 @@ void *UE_thread(void *arg)
bool syncRunning = false;
const int nb_slot_frame = fp->slots_per_frame;
int absolute_slot = 0, decoded_frame_rx = INT_MAX, trashed_frames = 0;
int absolute_slot = 0, decoded_frame_rx = MAX_FRAME_NUMBER - 1, trashed_frames = 0;
int tx_wait_for_dlsch[NR_MAX_SLOTS_PER_FRAME];
int num_ind_fifo = nb_slot_frame;
......@@ -897,7 +897,7 @@ void *UE_thread(void *arg)
"");
// we have the decoded frame index in the return of the synch process
// and we shifted above to the first slot of next frame
decoded_frame_rx++;
decoded_frame_rx = (decoded_frame_rx + 1) % MAX_FRAME_NUMBER;
// we do ++ first in the regular processing, so it will be begin of frame;
absolute_slot = decoded_frame_rx * nb_slot_frame - 1;
if (UE->sl_mode == 2) {
......
......@@ -120,9 +120,9 @@ typedef struct sl_bch_params {
//configured from RRC
//Parameters used to determine PSBCH slot
sl_ssb_timealloc_t ssb_time_alloc;
uint8_t sl_mib[4] __attribute__((aligned(4)));
uint16_t slss_id;
bool status;
uint8_t sl_mib[4];
//Parameters incremented by MAC PSBCH scheduler
//after every SSB txn/reception
......
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