Commit 4335fb63 authored by Vijay Chadachan's avatar Vijay Chadachan

Changes for TA update for SS mode

parent ada2fddf
...@@ -154,7 +154,7 @@ generate_dlsch_header(unsigned char *mac_header, ...@@ -154,7 +154,7 @@ generate_dlsch_header(unsigned char *mac_header,
AssertFatal(timing_advance_cmd < 64, "timing_advance_cmd %d > 63\n", AssertFatal(timing_advance_cmd < 64, "timing_advance_cmd %d > 63\n",
timing_advance_cmd); timing_advance_cmd);
((TIMING_ADVANCE_CMD *) ce_ptr)->TA = timing_advance_cmd; //(timing_advance_cmd+31)&0x3f; ((TIMING_ADVANCE_CMD *) ce_ptr)->TA = timing_advance_cmd; //(timing_advance_cmd+31)&0x3f;
LOG_D(MAC, "timing advance =%d (%d)\n", LOG_A(MAC, "timing advance =%d (%d)\n",
timing_advance_cmd, timing_advance_cmd,
((TIMING_ADVANCE_CMD *) ce_ptr)->TA); ((TIMING_ADVANCE_CMD *) ce_ptr)->TA);
ce_ptr += sizeof(TIMING_ADVANCE_CMD); ce_ptr += sizeof(TIMING_ADVANCE_CMD);
...@@ -818,7 +818,7 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -818,7 +818,7 @@ schedule_ue_spec(module_id_t module_idP,
ta_update = ue_sched_ctrl->ta_update; ta_update = ue_sched_ctrl->ta_update;
/* if we send TA then set timer to not send it for a while */ /* if we send TA then set timer to not send it for a while */
if (ta_update != 31) { if (ta_update != 31 && (RC.ss.mode == SS_ENB)) {
ue_sched_ctrl->ta_timer = 20; ue_sched_ctrl->ta_timer = 20;
} }
...@@ -827,6 +827,21 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -827,6 +827,21 @@ schedule_ue_spec(module_id_t module_idP,
ue_sched_ctrl->ta_update_f = 31.0; ue_sched_ctrl->ta_update_f = 31.0;
} }
if(RC.ss.mode == SS_SOFTMODEM )
{
if(ue_sched_ctrl->ta_timer == 100)
{
ta_update = 2;
ue_sched_ctrl->ta_timer =0 ;
LOG_D(MAC,"TA scheduled SFN %d SF %d\n",frameP,subframeP);
}
else
{
ue_sched_ctrl->ta_timer++;
ta_update = 31;
ue_sched_ctrl->ta_update = 31;
}
}
int ta_len = (ta_update != 31) ? 2 : 0; int ta_len = (ta_update != 31) ? 2 : 0;
...@@ -1378,6 +1393,7 @@ schedule_ue_spec_br(module_id_t module_idP, ...@@ -1378,6 +1393,7 @@ schedule_ue_spec_br(module_id_t module_idP,
ta_update = 31; ta_update = 31;
} }
ta_len = (ta_update != 31) ? 2 : 0; ta_len = (ta_update != 31) ? 2 : 0;
header_len_dcch = 2; // 2 bytes DCCH SDU subheader header_len_dcch = 2; // 2 bytes DCCH SDU subheader
......
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