• Thomas Schlichter's avatar
    Fix channel estimation for 3/4 sampling · ef3be740
    Thomas Schlichter authored
    In 3/4 sampling mode, the OFDM symbol size is _not_ a power of two (e.g. 1536 instead of 2048).
    In this case it is _not_ OK to calculate the modulus using a binary AND, it _must_ use either the actul modulus operator (%) using an integer division,
    or a _correct_ if statement or tertianary operator like this:
    
    re_offset = (re_offset + 4 >= ue->frame_parms.ofdm_symbol_size) ? (re_offset + 4 - ue->frame_parms.ofdm_symbol_size) : (re_offset + 4);
    
    But of course using the actual modulus operator is much more readable and surely not much slower:
    
    re_offset = (re_offset + 4) % ue->frame_parms.ofdm_symbol_size;
    ef3be740
nr_ul_channel_estimation.c 14.7 KB