Commit cf208d41 authored by Cedric Roux's avatar Cedric Roux

bugfix: frame is bigger than 8 bits

parent dd44c827
......@@ -151,18 +151,19 @@ unsigned char subframe2_ul_harq(LTE_DL_FRAME_PARMS *frame_parms,unsigned char su
return(0);
}
uint8_t phich_frame2_pusch_frame(LTE_DL_FRAME_PARMS *frame_parms,frame_t frame,uint8_t subframe)
int phich_frame2_pusch_frame(LTE_DL_FRAME_PARMS *frame_parms, int frame, int subframe)
{
uint8_t pusch_frame = 255;
int pusch_frame;
if (frame_parms->frame_type == FDD) {
pusch_frame = ((subframe<4) ? (frame - 1) : frame);
pusch_frame = subframe<4 ? frame + 1024 - 1 : frame;
} else {
// Note this is not true, but it doesn't matter, the frame number is irrelevant for TDD!
pusch_frame = (frame);
}
LOG_D(PHY, "frame %d subframe %d: PUSCH frame = %d\n", frame, subframe, pusch_frame);
return pusch_frame;
return pusch_frame % 1024;
}
uint8_t phich_subframe2_pusch_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe)
......
......@@ -1950,7 +1950,7 @@ uint8_t phich_subframe2_pusch_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint8_t s
@param subframe Subframe of received/transmitted PHICH
@returns frame of PUSCH transmission
*/
uint8_t phich_frame2_pusch_frame(LTE_DL_FRAME_PARMS *frame_parms,frame_t frame,uint8_t subframe);
int phich_frame2_pusch_frame(LTE_DL_FRAME_PARMS *frame_parms, int frame, int subframe);
void print_CQI(void *o,UCI_format_t uci_format,uint8_t eNB_id,int N_RB_DL);
......
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