This commit is contained in:
2026-01-14 04:27:37 +00:00
parent cf4ca86169
commit c28054a285
13 changed files with 294 additions and 281 deletions
@@ -793,10 +793,10 @@ static void pf_dl(gNB_MAC_INST *mac,
while (rbStart < rbStop && (rballoc_mask[rbStart + bwp_start] & slbitmap))
rbStart++;
uint16_t max_rbSize = 10;
uint16_t max_rbSize = 1;
/* while (rbStart + max_rbSize <= rbStop && !(rballoc_mask[rbStart + max_rbSize + bwp_start] & slbitmap)) */
/* max_rbSize++; */
while (rbStart + max_rbSize <= rbStop && !(rballoc_mask[rbStart + max_rbSize + bwp_start] & slbitmap))
max_rbSize++;
if (max_rbSize < min_rbSize) {
LOG_D(NR_MAC,
@@ -223,15 +223,23 @@ uint16_t get_pm_index(const gNB_MAC_INST *nrmac,
return 0;
}
// O-RAN MPLANE-TRX-CONTROL: When antennas are muted, the UE's PMI report
// is based on the full antenna array and may be invalid. Use identity matrix.
// O-RAN MPLANE-TRX-CONTROL: Handle antenna muting and recovery mode
if (nrmac->antenna_state) {
int active_tx = nr_get_active_tx_antenna_count(nrmac->antenna_state);
int configured_tx = nrmac->antenna_state->num_tx_antennas;
if (active_tx < configured_tx) {
LOG_D(NR_MAC, "[ANTENNA_MUTE] Using identity matrix: %d/%d TX antennas active\n",
active_tx, configured_tx);
return 0; // Use identity matrix when any antennas are muted
// During recovery mode after unmuting, use identity matrix to allow CSI update
if (nr_is_in_recovery_mode(nrmac->antenna_state)) {
LOG_D(NR_MAC, "[ANTENNA_MUTE] Recovery mode active, using identity matrix\n");
return 0;
}
// When antennas are muted and we're using fewer layers than configured,
// use identity matrix for robustness (UE's PMI based on old config)
if (active_tx < configured_tx && layers < configured_tx) {
LOG_D(NR_MAC, "[ANTENNA_MUTE] Using identity matrix: %d/%d TX antennas active, %d layers\n",
active_tx, configured_tx, layers);
return 0;
}
}
const int report_id = sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.csi_report_id;
@@ -2176,8 +2176,8 @@ static int pf_ul(gNB_MAC_INST *nrmac,
/* if it's for inactivity, min_grant_prb is enough, otherwise check what
* would be the maximum */
/* uint16_t max_rbSize = iterator->sched_inactive ? min_rb : bi.bwpSize; */
uint16_t max_rbSize = min_rb;
uint16_t max_rbSize = iterator->sched_inactive ? min_rb : bi.bwpSize;
/* uint16_t max_rbSize = min_rb; */
uint16_t available_rb = 1;
while (rbStart + available_rb < bi.bwpSize && !(rballoc_mask[rbStart + bi.bwpStart + available_rb] & slbitmap) && available_rb < max_rbSize)
available_rb++;