SRSUE: SRSUE: fix timealigmenttimer

master
Xavier Arteaga 5 years ago committed by Xavier Arteaga
parent bcde542111
commit 1fa5a19a55

@ -176,6 +176,8 @@ public:
void set(uint32_t duration_) { impl()->set(duration_); } void set(uint32_t duration_) { impl()->set(duration_); }
bool is_set() const { return (impl()->duration != 0); }
bool is_running() const { return impl()->is_running(); } bool is_running() const { return impl()->is_running(); }
bool is_expired() const { return impl()->is_expired(); } bool is_expired() const { return impl()->is_expired(); }

@ -480,6 +480,7 @@ struct mac_cfg_t {
void set_defaults() void set_defaults()
{ {
rach_cfg.reset(); rach_cfg.reset();
sr_cfg.reset();
set_mac_main_cfg_default(); set_mac_main_cfg_default();
} }
@ -487,7 +488,6 @@ struct mac_cfg_t {
{ {
bsr_cfg.reset(); bsr_cfg.reset();
phr_cfg.reset(); phr_cfg.reset();
sr_cfg.reset();
harq_cfg.reset(); harq_cfg.reset();
time_alignment_timer = -1; time_alignment_timer = -1;
} }
@ -497,7 +497,7 @@ struct mac_cfg_t {
sr_cfg_t sr_cfg; sr_cfg_t sr_cfg;
rach_cfg_t rach_cfg; rach_cfg_t rach_cfg;
ul_harq_cfg_t harq_cfg; ul_harq_cfg_t harq_cfg;
int time_alignment_timer; int time_alignment_timer = -1;
}; };
/*************************** /***************************

@ -272,9 +272,12 @@ bool demux::process_ce(srslte::sch_subh *subh) {
break; break;
case srslte::sch_subh::TA_CMD: case srslte::sch_subh::TA_CMD:
phy_h->set_timeadv(subh->get_ta_cmd()); phy_h->set_timeadv(subh->get_ta_cmd());
Info("Received TA=%d\n", subh->get_ta_cmd()); Info("Received TA=%d (%d/%d) \n",
// Start or restart timeAlignmentTimer only if running subh->get_ta_cmd(),
if (time_alignment_timer->is_running()) { time_alignment_timer->value(),
time_alignment_timer->duration());
// Start or restart timeAlignmentTimer only if set
if (time_alignment_timer->is_set()) {
time_alignment_timer->run(); time_alignment_timer->run();
} }
break; break;

@ -2723,6 +2723,10 @@ void rrc::set_phy_default_pucch_srs()
{ {
rrc_log->info("Setting default PHY config dedicated\n"); rrc_log->info("Setting default PHY config dedicated\n");
set_phy_config_dedicated_default(); set_phy_config_dedicated_default();
// SR configuration affects to MAC SR too
current_mac_cfg.sr_cfg.reset();
mac->set_config(current_mac_cfg);
} }
void rrc::set_mac_default() { void rrc::set_mac_default() {

Loading…
Cancel
Save