Add implementation to trigger BWP switch from external source
This commit is contained in:
@@ -1065,6 +1065,24 @@ bool nr_update_sib19(const gnb_sat_position_update_t *sat_position)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool nr_trigger_bwp_switch(uint16_t rnti, int bwp_id)
|
||||||
|
{
|
||||||
|
gNB_MAC_INST *nrmac = RC.nrmac[0];
|
||||||
|
NR_SCHED_LOCK(&nrmac->sched_lock);
|
||||||
|
NR_UE_info_t *UE = find_nr_UE(&nrmac->UE_info, rnti);
|
||||||
|
bool success = false;
|
||||||
|
if (!UE) {
|
||||||
|
LOG_W(NR_MAC, "could not find UE for RNTI %04x\n", rnti);
|
||||||
|
} else if (UE->current_DL_BWP.bwp_id == bwp_id) {
|
||||||
|
LOG_W(NR_MAC, "UE %04x is already on BWP ID %d, not triggering reconfiguration\n", rnti, bwp_id);
|
||||||
|
} else { // UE != NULL && current_DL_BWP.bwp_id != bwp_id
|
||||||
|
nr_mac_trigger_reconfiguration(nrmac, UE, bwp_id);
|
||||||
|
success = true;
|
||||||
|
}
|
||||||
|
NR_SCHED_UNLOCK(&nrmac->sched_lock);
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
void prepare_du_configuration_update(gNB_MAC_INST *mac,
|
void prepare_du_configuration_update(gNB_MAC_INST *mac,
|
||||||
f1ap_served_cell_info_t *info,
|
f1ap_served_cell_info_t *info,
|
||||||
NR_BCCH_BCH_Message_t *mib,
|
NR_BCCH_BCH_Message_t *mib,
|
||||||
|
|||||||
@@ -43,4 +43,6 @@ typedef struct gnb_sat_position_update_s {
|
|||||||
|
|
||||||
bool nr_update_sib19(const gnb_sat_position_update_t *sat_position);
|
bool nr_update_sib19(const gnb_sat_position_update_t *sat_position);
|
||||||
|
|
||||||
|
bool nr_trigger_bwp_switch(uint16_t rnti, int bwp_id);
|
||||||
|
|
||||||
#endif /*__LAYER2_NR_MAC_CONFIG_H__*/
|
#endif /*__LAYER2_NR_MAC_CONFIG_H__*/
|
||||||
|
|||||||
Reference in New Issue
Block a user