Commit 34cc91e9 authored by aligungr's avatar aligungr

Initial cell selection bug fix

parent 8c250700
...@@ -26,6 +26,8 @@ void UeRrcTask::performCellSelection() ...@@ -26,6 +26,8 @@ void UeRrcTask::performCellSelection()
if (currentTime - m_startedTime <= 1000LL && m_cellDesc.empty()) if (currentTime - m_startedTime <= 1000LL && m_cellDesc.empty())
return; return;
if (currentTime - m_startedTime <= 4000LL && !m_base->shCtx.selectedPlmn.get().hasValue())
return;
auto lastCell = m_base->shCtx.currentCell.get(); auto lastCell = m_base->shCtx.currentCell.get();
...@@ -47,7 +49,7 @@ void UeRrcTask::performCellSelection() ...@@ -47,7 +49,7 @@ void UeRrcTask::performCellSelection()
m_logger->warn( m_logger->warn(
"Suitable cell selection failed in [%d] cells. [%d] out of PLMN, [%d] no SI, [%d] reserved, " "Suitable cell selection failed in [%d] cells. [%d] out of PLMN, [%d] no SI, [%d] reserved, "
"[%d] barred, ftai [%d]", "[%d] barred, ftai [%d]",
static_cast<int>(m_cellDesc.size()), report.outOfPlmnCells, report.sib1MissingCells, static_cast<int>(m_cellDesc.size()), report.outOfPlmnCells, report.siMissingCells,
report.reservedCells, report.barredCells, report.forbiddenTaiCells); report.reservedCells, report.barredCells, report.forbiddenTaiCells);
} }
else else
...@@ -74,7 +76,7 @@ void UeRrcTask::performCellSelection() ...@@ -74,7 +76,7 @@ void UeRrcTask::performCellSelection()
{ {
m_logger->warn("Acceptable cell selection failed in [%d] cells. [%d] no SI, [%d] reserved, [%d] " m_logger->warn("Acceptable cell selection failed in [%d] cells. [%d] no SI, [%d] reserved, [%d] "
"barred, ftai [%d]", "barred, ftai [%d]",
static_cast<int>(m_cellDesc.size()), report.sib1MissingCells, report.reservedCells, static_cast<int>(m_cellDesc.size()), report.siMissingCells, report.reservedCells,
report.barredCells, report.forbiddenTaiCells); report.barredCells, report.forbiddenTaiCells);
} }
else else
...@@ -122,7 +124,13 @@ bool UeRrcTask::lookForSuitableCell(ActiveCellInfo &cellInfo, CellSelectionRepor ...@@ -122,7 +124,13 @@ bool UeRrcTask::lookForSuitableCell(ActiveCellInfo &cellInfo, CellSelectionRepor
if (!cell.sib1.hasSib1) if (!cell.sib1.hasSib1)
{ {
report.sib1MissingCells++; report.siMissingCells++;
continue;
}
if (!cell.mib.hasMib)
{
report.siMissingCells++;
continue; continue;
} }
...@@ -132,14 +140,11 @@ bool UeRrcTask::lookForSuitableCell(ActiveCellInfo &cellInfo, CellSelectionRepor ...@@ -132,14 +140,11 @@ bool UeRrcTask::lookForSuitableCell(ActiveCellInfo &cellInfo, CellSelectionRepor
continue; continue;
} }
if (cell.mib.hasMib)
{
if (cell.mib.isBarred) if (cell.mib.isBarred)
{ {
report.barredCells++; report.barredCells++;
continue; continue;
} }
}
if (cell.sib1.isReserved) if (cell.sib1.isReserved)
{ {
...@@ -201,18 +206,21 @@ bool UeRrcTask::lookForAcceptableCell(ActiveCellInfo &cellInfo, CellSelectionRep ...@@ -201,18 +206,21 @@ bool UeRrcTask::lookForAcceptableCell(ActiveCellInfo &cellInfo, CellSelectionRep
if (!cell.sib1.hasSib1) if (!cell.sib1.hasSib1)
{ {
report.sib1MissingCells++; report.siMissingCells++;
continue; continue;
} }
if (cell.mib.hasMib) if (!cell.mib.hasMib)
{ {
report.siMissingCells++;
continue;
}
if (cell.mib.isBarred) if (cell.mib.isBarred)
{ {
report.barredCells++; report.barredCells++;
continue; continue;
} }
}
if (cell.sib1.isReserved) if (cell.sib1.isReserved)
{ {
......
...@@ -153,7 +153,7 @@ struct UeConfig ...@@ -153,7 +153,7 @@ struct UeConfig
struct CellSelectionReport struct CellSelectionReport
{ {
int outOfPlmnCells{}; int outOfPlmnCells{};
int sib1MissingCells{}; int siMissingCells{};
int reservedCells{}; int reservedCells{};
int barredCells{}; int barredCells{};
int forbiddenTaiCells{}; int forbiddenTaiCells{};
......
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