Commit c090b1f7 authored by francescomani's avatar francescomani

further improvements in BSR handling after being triggered

parent 310f6260
......@@ -756,6 +756,7 @@ static void nr_configure_lc_config(NR_UE_MAC_INST_t *mac,
struct NR_LogicalChannelConfig__ul_SpecificParameters *ul_parm = mac_lc_config->ul_SpecificParameters;
lc_info->priority = ul_parm->priority;
lc_info->sr_DelayTimerApplied = ul_parm->logicalChannelSR_DelayTimerApplied;
lc_info->lc_SRMask = ul_parm->logicalChannelSR_Mask;
lc_info->pbr = nr_get_pbr(ul_parm->prioritisedBitRate);
// if logicalChannelGroup we release LCGID and set it to invalid
lc_sched_info->LCGID = ul_parm->logicalChannelGroup ? *ul_parm->logicalChannelGroup : NR_INVALID_LCGID;
......
......@@ -208,6 +208,10 @@ typedef struct {
NR_LC_SCHEDULING_INFO lc_sched_info[NR_MAX_NUM_LCID];
// lcg scheduling info
NR_LCG_SCHEDULING_INFO lcg_sched_info[NR_MAX_NUM_LCGID];
/// BSR report flag management
uint8_t BSR_reporting_active;
// LCID triggering BSR
NR_LogicalChannelIdentity_t regularBSR_trigger_lcid;
/// SR pending as defined in 38.321
uint8_t SR_pending;
/// SR_COUNTER as defined in 38.321
......@@ -447,6 +451,7 @@ typedef struct nr_lcordered_info_s {
// Bucket size per lcid
uint32_t bucket_size;
bool sr_DelayTimerApplied;
bool lc_SRMask;
} nr_lcordered_info_t;
......@@ -524,9 +529,6 @@ typedef struct NR_UE_MAC_INST_s {
nr_phy_config_t phy_config;
nr_synch_request_t synch_request;
/// BSR report flag management
uint8_t BSR_reporting_active;
// order lc info
A_SEQUENCE_OF(nr_lcordered_info_t) lc_ordered_list;
......
......@@ -120,25 +120,6 @@ subframe number \param[in] slotP slot number
*/
int8_t nr_ue_get_SR(NR_UE_MAC_INST_t *mac, frame_t frameP, slot_t slotP);
/*! \fn nr_update_bsr
\brief get the rlc stats and update the bsr level for each lcid
\param[in] mac pointer to UE MAC instance
\param[in] frameP Frame index
\param[in] slotP number
\param[in] gNB_index
*/
void nr_update_bsr(NR_UE_MAC_INST_t *mac, frame_t frameP, slot_t slotP, uint8_t gNB_index);
/*! \fn nr_locate_BsrIndexByBufferSize (int *table, int size, int value)
\brief locate the BSR level in the table as defined in 38.321. This function requires that he values in table to be monotonic, either increasing or decreasing. The returned value is not less than 0, nor greater than n-1, where n is the size of table.
\param[in] *table Pointer to BSR table
\param[in] size Size of the table
\param[in] value Value of the buffer
\return the index in the BSR_LEVEL table
*/
uint8_t nr_locate_BsrIndexByBufferSize(const uint32_t *table, int size,
int value);
int8_t nr_ue_process_dci(NR_UE_MAC_INST_t *mac,
int cc_id,
frame_t frame,
......
......@@ -192,7 +192,7 @@ void reset_mac_inst(NR_UE_MAC_INST_t *nr_mac)
nr_mac->scheduling_info.sr_id = -1; // invalid init value
// cancel any triggered Buffer Status Reporting procedure
nr_mac->BSR_reporting_active = NR_BSR_TRIGGER_NONE;
nr_mac->scheduling_info.BSR_reporting_active = NR_BSR_TRIGGER_NONE;
// cancel any triggered Power Headroom Reporting procedure
// TODO PHR not implemented yet
......
......@@ -2511,8 +2511,7 @@ int8_t nr_ue_get_SR(NR_UE_MAC_INST_t *mac, frame_t frameP, slot_t slot)
// release all pucch resource
//mac->physicalConfigDedicated = NULL; // todo
//mac->ul_active = 0; // todo
mac->BSR_reporting_active =
NR_BSR_TRIGGER_NONE;
si->BSR_reporting_active = NR_BSR_TRIGGER_NONE;
LOG_I(NR_MAC, "[UE %d] Release all SRs \n", mac->ue_id);
}
si->SR_pending = 0;
......
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