Store active LCs in MAC, remove unneeded headers
This commit is contained in:
@@ -890,13 +890,13 @@ uint8_t flexran_get_rrc_status(mid_t mod_id, rnti_t rnti) {
|
||||
uint64_t flexran_get_ue_aggregated_max_bitrate_dl(mid_t mod_id, mid_t ue_id) {
|
||||
if (!mac_is_present(mod_id)) return 0;
|
||||
|
||||
return RC.mac[mod_id]->UE_info.UE_sched_ctrl[ue_id].ue_AggregatedMaximumBitrateDL;
|
||||
return 0; //RC.mac[mod_id]->UE_info.UE_sched_ctrl[ue_id].ue_AggregatedMaximumBitrateDL;
|
||||
}
|
||||
|
||||
uint64_t flexran_get_ue_aggregated_max_bitrate_ul(mid_t mod_id, mid_t ue_id) {
|
||||
if (!mac_is_present(mod_id)) return 0;
|
||||
|
||||
return RC.mac[mod_id]->UE_info.UE_sched_ctrl[ue_id].ue_AggregatedMaximumBitrateUL;
|
||||
return 0; //RC.mac[mod_id]->UE_info.UE_sched_ctrl[ue_id].ue_AggregatedMaximumBitrateUL;
|
||||
}
|
||||
|
||||
int flexran_get_half_duplex(mid_t mod_id, rnti_t rnti) {
|
||||
|
||||
@@ -882,6 +882,34 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
}
|
||||
}
|
||||
|
||||
if (logicalChannelIdentity > 0) { // is SRB1,2 or DRB
|
||||
if ((UE_id = find_UE_id(Mod_idP, rntiP)) < 0) {
|
||||
LOG_E(MAC,"Configuration received for unknown UE (%x), shouldn't happen\n",rntiP);
|
||||
return(-1);
|
||||
}
|
||||
int idx = -1;
|
||||
UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
|
||||
for (int i = 0; i < sched_ctrl->dl_lc_num; ++i) {
|
||||
if (sched_ctrl->dl_lc_ids[i] == logicalChannelIdentity) {
|
||||
/* TODO this might also mean we have to remove it, not clear */
|
||||
idx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (idx < 0) {
|
||||
sched_ctrl->dl_lc_num++;
|
||||
sched_ctrl->dl_lc_ids[sched_ctrl->dl_lc_num-1] = logicalChannelIdentity;
|
||||
sched_ctrl->dl_lc_bytes[sched_ctrl->dl_lc_num-1] = 0;
|
||||
LOG_I(MAC, "UE %d RNTI %x adding LC %ld idx %d to scheduling control (total %d)\n", UE_id, rntiP, logicalChannelIdentity, sched_ctrl->dl_lc_num-1, sched_ctrl->dl_lc_num);
|
||||
if (logicalChannelIdentity == 1) { // if it is SRB1, add SRB2 directly because RRC does not indicate this separately
|
||||
sched_ctrl->dl_lc_num++;
|
||||
sched_ctrl->dl_lc_ids[sched_ctrl->dl_lc_num-1] = 2;
|
||||
sched_ctrl->dl_lc_bytes[sched_ctrl->dl_lc_num-1] = 0;
|
||||
LOG_I(MAC, "UE %d RNTI %x adding LC 2 idx %d to scheduling control (total %d)\n", UE_id, rntiP, sched_ctrl->dl_lc_num-1, sched_ctrl->dl_lc_num);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// SRB2_lchan_config->choice.explicitValue.ul_SpecificParameters->logicalChannelGroup
|
||||
if (logicalChannelConfig != NULL) { // check for eMTC specific things
|
||||
UE_id = find_UE_id(Mod_idP, rntiP);
|
||||
|
||||
@@ -852,10 +852,10 @@ typedef struct {
|
||||
|
||||
// Logical channel info for link with RLC
|
||||
|
||||
/// LCGID mapping
|
||||
/// LCGID mapping (UL)
|
||||
long lcgidmap[11];
|
||||
|
||||
///UE logical channel priority
|
||||
///UE logical channel priority (UL)
|
||||
long lcgidpriority[11];
|
||||
|
||||
/// phr information
|
||||
@@ -913,31 +913,15 @@ typedef struct {
|
||||
|
||||
/*! \brief scheduling control information set through an API (not used)*/
|
||||
typedef struct {
|
||||
///UL transmission bandwidth in RBs
|
||||
uint8_t ul_bandwidth[MAX_NUM_LCID];
|
||||
///DL transmission bandwidth in RBs
|
||||
uint8_t dl_bandwidth[MAX_NUM_LCID];
|
||||
|
||||
//To do GBR bearer
|
||||
uint8_t min_ul_bandwidth[MAX_NUM_LCID];
|
||||
|
||||
uint8_t min_dl_bandwidth[MAX_NUM_LCID];
|
||||
|
||||
///aggregated bit rate of non-gbr bearer per UE
|
||||
uint64_t ue_AggregatedMaximumBitrateDL;
|
||||
///aggregated bit rate of non-gbr bearer per UE
|
||||
uint64_t ue_AggregatedMaximumBitrateUL;
|
||||
///CQI scheduling interval in subframes.
|
||||
uint16_t cqiSchedInterval;
|
||||
///Contention resolution timer used during random access
|
||||
uint8_t mac_ContentionResolutionTimer;
|
||||
/// number of active DL LCs
|
||||
uint8_t dl_lc_num;
|
||||
/// order in which DLSCH scheduler should allocate LCs
|
||||
uint8_t dl_lc_ids[MAX_NUM_LCID];
|
||||
/// number of bytes to schedule for each LC
|
||||
uint32_t dl_lc_bytes[MAX_NUM_LCID];
|
||||
|
||||
uint16_t max_rbs_allowed_slice_uplink[NFAPI_CC_MAX][MAX_NUM_SLICES];
|
||||
|
||||
uint8_t max_mcs[MAX_NUM_LCID];
|
||||
|
||||
uint16_t priority[MAX_NUM_LCID];
|
||||
|
||||
// resource scheduling information
|
||||
|
||||
/// Current DL harq round per harq_pid on each CC
|
||||
|
||||
Reference in New Issue
Block a user