Ignore PDSCH during cell selection

This commit is contained in:
Ismael Gomez 2021-09-20 19:18:32 +02:00
parent d59ebfce9d
commit ad646f436c
3 changed files with 16 additions and 1 deletions

View File

@ -56,6 +56,8 @@ public:
srsran::phy_cfg_mbsfn_t mbsfn_config = {};
std::atomic<bool> cell_is_selecting = {false};
// Secondary serving cell states
scell::state cell_state;

View File

@ -280,7 +280,12 @@ bool cc_worker::work_dl_regular()
// Decode PDSCH
decode_pdsch(ack_resource, &dl_action, dl_ack);
// Informs Stack about the decoding status
// Informs Stack about the decoding status, send NACK if cell is in process of re-selection
if (phy->cell_is_selecting) {
for (uint32_t i = 0; i < SRSRAN_MAX_CODEWORDS; i++) {
dl_ack[i] = false;
}
}
phy->stack->tb_decoded(cc_idx, mac_grant, dl_ack);
}

View File

@ -306,6 +306,10 @@ bool phy::cell_select(phy_cell_t cell)
if (sfsync.cell_select_init(cell)) {
// Update PCI before starting the background command to make sure PRACH gets the updated value
selected_cell.id = cell.pci;
// Indicate workers that cell selection is in progress
common.cell_is_selecting = true;
cmd_worker_cell.add_cmd([this, cell]() {
// Wait SYNC transitions to IDLE
sfsync.wait_idle();
@ -320,6 +324,10 @@ bool phy::cell_select(phy_cell_t cell)
selected_cell = sync_cell;
}
stack->cell_select_complete(ret);
// Indicate workers that cell selection has finished
common.cell_is_selecting = false;
});
return true;
} else {