Commit 2e9f391a authored by Robert Schmidt's avatar Robert Schmidt

Store active LCs in MAC, remove unneeded headers

parent 5420e740
...@@ -890,13 +890,13 @@ uint8_t flexran_get_rrc_status(mid_t mod_id, rnti_t rnti) { ...@@ -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) { 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; 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) { 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; 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) { 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, ...@@ -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 // SRB2_lchan_config->choice.explicitValue.ul_SpecificParameters->logicalChannelGroup
if (logicalChannelConfig != NULL) { // check for eMTC specific things if (logicalChannelConfig != NULL) { // check for eMTC specific things
UE_id = find_UE_id(Mod_idP, rntiP); UE_id = find_UE_id(Mod_idP, rntiP);
......
...@@ -852,10 +852,10 @@ typedef struct { ...@@ -852,10 +852,10 @@ typedef struct {
// Logical channel info for link with RLC // Logical channel info for link with RLC
/// LCGID mapping /// LCGID mapping (UL)
long lcgidmap[11]; long lcgidmap[11];
///UE logical channel priority ///UE logical channel priority (UL)
long lcgidpriority[11]; long lcgidpriority[11];
/// phr information /// phr information
...@@ -913,31 +913,15 @@ typedef struct { ...@@ -913,31 +913,15 @@ typedef struct {
/*! \brief scheduling control information set through an API (not used)*/ /*! \brief scheduling control information set through an API (not used)*/
typedef struct { typedef struct {
///UL transmission bandwidth in RBs /// number of active DL LCs
uint8_t ul_bandwidth[MAX_NUM_LCID]; uint8_t dl_lc_num;
///DL transmission bandwidth in RBs /// order in which DLSCH scheduler should allocate LCs
uint8_t dl_bandwidth[MAX_NUM_LCID]; uint8_t dl_lc_ids[MAX_NUM_LCID];
/// number of bytes to schedule for each LC
//To do GBR bearer uint32_t dl_lc_bytes[MAX_NUM_LCID];
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;
uint16_t max_rbs_allowed_slice_uplink[NFAPI_CC_MAX][MAX_NUM_SLICES]; 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 // resource scheduling information
/// Current DL harq round per harq_pid on each CC /// Current DL harq round per harq_pid on each CC
......
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