do not automatically consider cells for which a measurment has been received as "in sync"

the in_sync flag has been misused in some parts of the code
receiving a PHY measurement for a cell does not automatically
mean that we are "in sync", as it is used in RRC as a condition
to indicate if we are camping on cell

the in_sync/out_of_sync condition should only be altered by the
corresponding functions sent from the PHY for the currently selected
cell (and not automatically for all cells)

the commit also removes the deletion of cells which are not "in sync"
from the list of neighbor cells. Instead, RRC calls a clean-up function
peridically that deletes old cells eventually.
This commit is contained in:
Andre Puschmann 2019-11-13 22:18:25 +01:00 committed by Xavier Arteaga
parent f5e4ff9f4d
commit 8ef0d6c6ca
2 changed files with 1 additions and 13 deletions

View File

@ -130,7 +130,6 @@ class cell_t
this->has_valid_sib13 = false;
this->phy_cell = phy_cell;
rsrp = rsrp_;
in_sync = true;
bzero(&sib1, sizeof(sib1));
bzero(&sib2, sizeof(sib2));
bzero(&sib3, sizeof(sib3));
@ -150,7 +149,6 @@ class cell_t
if (!std::isnan(rsrp_)) {
rsrp = rsrp_;
}
in_sync = true;
gettimeofday(&last_update, nullptr);
}

View File

@ -579,19 +579,9 @@ void rrc::clean_neighbours()
}
}
// Sort neighbour cells by decreasing order of RSRP and remove old cells from neighbor list
// Sort neighbour cells by decreasing order of RSRP
void rrc::sort_neighbour_cells()
{
// Remove out-of-sync cells
for (auto it = neighbour_cells.begin(); it != neighbour_cells.end();) {
if ((*it)->in_sync == false) {
rrc_log->info("Neighbour PCI=%d is out-of-sync. Deleting\n", (*it)->get_pci());
it = neighbour_cells.erase(it);
} else {
++it;
}
}
std::sort(std::begin(neighbour_cells), std::end(neighbour_cells), [](const unique_cell_t& a, const unique_cell_t& b) {
return a->greater(b.get());
});