Commit 83d46bb5 authored by Jaroslava Fiedlerova's avatar Jaroslava Fiedlerova

Merge remote-tracking branch 'origin/NR_UE_rework_LC_config' into integration_2024_w06

parents 2b796874 f3c61b12
This diff is collapsed.
......@@ -181,12 +181,10 @@ typedef struct {
int32_t LCID_buffer_remain;
// buffer status for each lcid
uint8_t LCID_status;
// logical channel group id of this LCID
long LCGID;
// Bj bucket usage per lcid
int32_t Bj;
// Bucket size per lcid
int32_t bucket_size;
// logical channel group id for each LCID
uint8_t LCGID;
} NR_LC_SCHEDULING_INFO;
typedef struct {
......@@ -434,10 +432,11 @@ typedef struct ssb_list_info {
typedef struct nr_lcordered_info_s {
// logical channels ids ordered as per priority
int lcids_ordered;
// logical channel configurations reordered as per priority
NR_LogicalChannelConfig_t *logicalChannelConfig_ordered;
NR_LogicalChannelIdentity_t lcid;
long priority;
long prioritisedBitRate;
// Bucket size per lcid
uint32_t bucket_size;
} nr_lcordered_info_t;
typedef struct {
......@@ -513,11 +512,9 @@ typedef struct NR_UE_MAC_INST_s {
/// BSR report flag management
uint8_t BSR_reporting_active;
// Pointers to LogicalChannelConfig indexed by LogicalChannelIdentity. Note NULL means LCHAN is inactive.
NR_LogicalChannelConfig_t *logicalChannelConfig[NR_MAX_NUM_LCID];
// order lc info
nr_lcordered_info_t lc_ordered_info[NR_MAX_NUM_LCID];
A_SEQUENCE_OF(nr_lcordered_info_t) lc_ordered_list;
NR_UE_SCHEDULING_INFO scheduling_info;
/// PHR
......
......@@ -239,12 +239,12 @@ bool nr_update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t
uint8_t nr_locate_BsrIndexByBufferSize(const uint32_t *table, int size,
int value);
/*! \fn int nr_get_pbr(uint8_t prioritizedbitrate)
/*! \fn int nr_get_pbr(long prioritizedbitrate)
\brief get the rate in kbps from the rate configured by the higher layer
\param[in] prioritizedbitrate
\return the rate in kbps
*/
uint32_t nr_get_pbr(uint8_t prioritizedbitrate);
uint32_t nr_get_pbr(long prioritizedbitrate);
/*! \fn int nr_get_sf_periodicBSRTimer(uint8_t periodicBSR_Timer)
\brief get the number of subframe from the periodic BSR timer configured by the higher layers
......
......@@ -99,11 +99,9 @@ void nr_ue_mac_default_configs(NR_UE_MAC_INST_t *mac)
for (int i = 0; i < NR_MAX_NUM_LCID; i++) {
LOG_D(NR_MAC, "Applying default logical channel config for LCGID %d\n", i);
mac->scheduling_info.lc_sched_info[i].Bj = -1;
mac->scheduling_info.lc_sched_info[i].bucket_size = -1;
mac->scheduling_info.lc_sched_info[i].LCGID = 0; // defaults to 0 irrespective of SRB or DRB
mac->scheduling_info.lc_sched_info[i].LCID_status = LCID_EMPTY;
mac->scheduling_info.lc_sched_info[i].LCID_buffer_remain = 0;
mac->scheduling_info.lc_sched_info[i].Bj = 0;
}
}
......@@ -146,7 +144,8 @@ void reset_mac_inst(NR_UE_MAC_INST_t *nr_mac)
nr_ue_mac_default_configs(nr_mac);
// initialize Bj for each logical channel to zero
// Done in default config but to -1 (is that correct?)
for (int i = 0; i < NR_MAX_NUM_LCID; i++)
nr_mac->scheduling_info.lc_sched_info[i].Bj = 0;
// stop all running timers
// TODO
......@@ -221,9 +220,10 @@ void release_mac_configuration(NR_UE_MAC_INST_t *mac)
for (int i = 0; i < mac->ul_BWPs.count; i++)
release_ul_BWP(mac, i);
for (int i = 0; i < NR_MAX_NUM_LCID; i++) {
nr_release_mac_config_logicalChannelBearer(mac, i + 1);
memset(&mac->lc_ordered_info[i], 0, sizeof(nr_lcordered_info_t));
for (int i = 0; i < mac->lc_ordered_list.count; i++) {
nr_lcordered_info_t *lc_info = mac->lc_ordered_list.array[i];
asn_sequence_del(&mac->lc_ordered_list, i, 0);
free(lc_info);
}
memset(&mac->ssb_measurements, 0, sizeof(mac->ssb_measurements));
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment