Use is_mixed_slot in stack
This commit is contained in:
committed by
Guido Casati
parent
0b7bee96cb
commit
92460a80cd
@@ -386,8 +386,7 @@ int get_first_ul_slot(const frame_structure_t *fs, bool mixed)
|
||||
|
||||
if (fs->is_tdd) {
|
||||
for (int i = 0; i < fs->numb_slots_period; i++) {
|
||||
bool is_mixed = fs->period_cfg.tdd_slot_bitmap[i].num_ul_symbols && fs->period_cfg.tdd_slot_bitmap[i].slot_type == TDD_NR_MIXED_SLOT;
|
||||
if ((mixed && is_mixed) || fs->period_cfg.tdd_slot_bitmap[i].slot_type == TDD_NR_UPLINK_SLOT) {
|
||||
if ((mixed && is_ul_slot(i, fs)) || fs->period_cfg.tdd_slot_bitmap[i].slot_type == TDD_NR_UPLINK_SLOT) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
@@ -486,8 +485,7 @@ int get_ul_slot_offset(const frame_structure_t *fs, int idx, bool count_mixed)
|
||||
/* Populate the indices of UL slots in the TDD period from the bitmap
|
||||
count also mixed slots with UL symbols if flag count_mixed is present */
|
||||
for (int i = 0; i < fs->numb_slots_period; i++) {
|
||||
bool is_mixed = (fs->period_cfg.tdd_slot_bitmap[i].num_ul_symbols > 1) && (fs->period_cfg.tdd_slot_bitmap[i].slot_type == TDD_NR_MIXED_SLOT);
|
||||
if ((count_mixed && is_mixed) || fs->period_cfg.tdd_slot_bitmap[i].slot_type == TDD_NR_UPLINK_SLOT) {
|
||||
if ((count_mixed && is_ul_slot(i, fs)) || fs->period_cfg.tdd_slot_bitmap[i].slot_type == TDD_NR_UPLINK_SLOT) {
|
||||
ul_slot_idxs[ul_slot_count++] = i;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -982,7 +982,7 @@ static bool get_feasible_msg3_tda(const NR_ServingCellConfigCommon_t *scc,
|
||||
const tdd_bitmap_t *tdd_slot_bitmap = fs->period_cfg.tdd_slot_bitmap;
|
||||
int s = get_slot_idx_in_period(temp_slot, fs);
|
||||
// check if enough symbols in case of mixed slot
|
||||
bool is_mixed = (tdd_slot_bitmap[s].slot_type == TDD_NR_MIXED_SLOT);
|
||||
bool is_mixed = is_mixed_slot(s, fs);
|
||||
// if the mixed slot has not enough symbols, skip
|
||||
if (is_mixed && tdd_slot_bitmap[s].num_ul_symbols < 3)
|
||||
continue;
|
||||
|
||||
@@ -65,7 +65,7 @@ int get_dl_tda(const gNB_MAC_INST *nrmac, int slot)
|
||||
int s = get_slot_idx_in_period(slot, fs);
|
||||
// if there is a mixed slot where we can transmit DL
|
||||
const tdd_bitmap_t *tdd_slot_bitmap = fs->period_cfg.tdd_slot_bitmap;
|
||||
if (tdd_slot_bitmap[s].num_dl_symbols > 1 && (tdd_slot_bitmap[s].slot_type == TDD_NR_MIXED_SLOT)) {
|
||||
if (tdd_slot_bitmap[s].num_dl_symbols > 1 && is_mixed_slot(s, fs)) {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,8 +52,7 @@ int get_ul_tda(gNB_MAC_INST *nrmac, int frame, int slot)
|
||||
// if there is uplink symbols in mixed slot
|
||||
int s = get_slot_idx_in_period(slot, fs);
|
||||
tdd_bitmap_t *tdd_slot_bitmap = fs->period_cfg.tdd_slot_bitmap;
|
||||
if ((tdd_slot_bitmap[s].num_ul_symbols > 1)
|
||||
&& (tdd_slot_bitmap[s].slot_type == TDD_NR_MIXED_SLOT)) {
|
||||
if ((tdd_slot_bitmap[s].num_ul_symbols > 1) && is_mixed_slot(s, fs)) {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user