Move get_lcid_from_srbid/drbid() to central gNB MAC primitives
In later commits, we will call these functions from multiple places in the scheduler, so move them to a central place.
This commit is contained in:
@@ -3210,3 +3210,13 @@ void nr_mac_trigger_reconfiguration(const gNB_MAC_INST *nrmac, const NR_UE_info_
|
||||
};
|
||||
nrmac->mac_rrc.ue_context_modification_required(&required);
|
||||
}
|
||||
|
||||
long get_lcid_from_drbid(int drb_id)
|
||||
{
|
||||
return drb_id + 3; /* LCID is DRB + 3 */
|
||||
}
|
||||
|
||||
long get_lcid_from_srbid(int srb_id)
|
||||
{
|
||||
return srb_id;
|
||||
}
|
||||
|
||||
@@ -425,6 +425,8 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t frameP, sub_frame_t slotP);
|
||||
size_t dump_mac_stats(gNB_MAC_INST *gNB, char *output, size_t strlen, bool reset_rsrp);
|
||||
|
||||
void process_CellGroup(NR_CellGroupConfig_t *CellGroup, NR_UE_info_t *UE);
|
||||
long get_lcid_from_drbid(int drb_id);
|
||||
long get_lcid_from_srbid(int srb_id);
|
||||
|
||||
void prepare_initial_ul_rrc_message(gNB_MAC_INST *mac, NR_UE_info_t *UE);
|
||||
void send_initial_ul_rrc_message(int rnti, const uint8_t *sdu, sdu_size_t sdu_len, void *data);
|
||||
|
||||
@@ -90,16 +90,6 @@ bool DURecvCb(protocol_ctxt_t *ctxt_pP,
|
||||
return true;
|
||||
}
|
||||
|
||||
static long get_lcid_from_drbid(int drb_id)
|
||||
{
|
||||
return drb_id + 3; /* LCID is DRB + 3 */
|
||||
}
|
||||
|
||||
static long get_lcid_from_srbid(int srb_id)
|
||||
{
|
||||
return srb_id;
|
||||
}
|
||||
|
||||
static bool check_plmn_identity(const f1ap_plmn_t *check_plmn, const f1ap_plmn_t *plmn)
|
||||
{
|
||||
return plmn->mcc == check_plmn->mcc && plmn->mnc_digit_length == check_plmn->mnc_digit_length && plmn->mnc == check_plmn->mnc;
|
||||
|
||||
Reference in New Issue
Block a user