Commit 81f04d29 authored by Louis Adrien Dufrene's avatar Louis Adrien Dufrene

Apply diff between ssr (CDRX) branch and develop

parent ee547c1d
......@@ -189,7 +189,15 @@ const char* eurecomVariablesNames[] = {
"ue0_trx_write_ns_missing",
"enb_thread_rxtx_CPUID",
"ru_thread_CPUID",
"ru_thread_tx_CPUID"
"ru_thread_tx_CPUID",
"ue0_on_duration_timer",
"ue0_drx_inactivity",
"ue0_drx_short_cycle",
"ue0_short_drx_cycle_number",
"ue0_drx_long_cycle",
"ue0_drx_retransmission_harq0",
"ue0_drx_active_time",
"ue0_drx_active_time_condition"
};
const char* eurecomFunctionsNames[] = {
......
......@@ -167,6 +167,14 @@ typedef enum {
VCD_SIGNAL_DUMPER_VARIABLES_CPUID_ENB_THREAD_RXTX,
VCD_SIGNAL_DUMPER_VARIABLES_CPUID_RU_THREAD,
VCD_SIGNAL_DUMPER_VARIABLES_CPUID_RU_THREAD_TX,
VCD_SIGNAL_DUMPER_VARIABLES_ON_DURATION_TIMER,
VCD_SIGNAL_DUMPER_VARIABLES_DRX_INACTIVITY,
VCD_SIGNAL_DUMPER_VARIABLES_DRX_SHORT_CYCLE,
VCD_SIGNAL_DUMPER_VARIABLES_SHORT_DRX_CYCLE_NUMBER,
VCD_SIGNAL_DUMPER_VARIABLES_DRX_LONG_CYCLE,
VCD_SIGNAL_DUMPER_VARIABLES_DRX_RETRANSMISSION_HARQ0,
VCD_SIGNAL_DUMPER_VARIABLES_DRX_ACTIVE_TIME,
VCD_SIGNAL_DUMPER_VARIABLES_DRX_ACTIVE_TIME_CONDITION,
VCD_SIGNAL_DUMPER_VARIABLES_END
} vcd_signal_dump_variables;
......
......@@ -44,7 +44,7 @@ typedef struct {
#define VCD_NUM_FUNCTIONS 190
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_VARIABLES 128
#define VCD_NUM_VARIABLES 136
/* first VCD function (to be kept up to date! see in T_messages.txt) */
#define VCD_FIRST_FUNCTION ((uintptr_t)T_VCD_FUNCTION_RT_SLEEP)
......
......@@ -1676,6 +1676,46 @@ ID = VCD_VARIABLE_CPUID_RU_THREAD_TX
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = ru_thread_tx_CPUID
ID = VCD_VARIABLE_ON_DURATION_TIMER
DESC = VCD variable ON_DURATION_TIMER
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = ue0_on_duration_timer
ID = VCD_VARIABLE_DRX_INACTIVITY
DESC = VCD variable DRX_INACTIVITY
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = ue0_drx_inactivity
ID = VCD_VARIABLE_DRX_SHORT_CYCLE
DESC = VCD variable DRX_SHORT_CYCLE
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = ue0_drx_short_cycle
ID = VCD_VARIABLE_SHORT_DRX_CYCLE_NUMBER
DESC = VCD variable SHORT_DRX_CYCLE_NUMBER
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = ue0_short_drx_cycle_number
ID = VCD_VARIABLE_DRX_LONG_CYCLE
DESC = VCD variable DRX_LONG_CYCLE
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = ue0_drx_long_cycle
ID = VCD_VARIABLE_DRX_RETRANSMISSION_HARQ0
DESC = VCD variable DRX_RETRANSMISSION_HARQ0
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = ue0_drx_retransmission_harq0
ID = VCD_VARIABLE_DRX_ACTIVE_TIME
DESC = VCD variable DRX_ACTIVE_TIME
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = ue0_drx_active_time
ID = VCD_VARIABLE_DRX_ACTIVE_TIME_CONDITION
DESC = VCD variable DRX_ACTIVE_TIME_CONDITION
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = ue0_drx_active_time_condition
#functions
......
......@@ -722,17 +722,13 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,uint8_t br_flag
#endif
)
)
//-----------------------------------------------------------------------------
{
static int first_call=1;
static int first_call = 1;
LTE_eNB_COMMON *common_vars = &eNB->common_vars;
LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
// PUCCH_CONFIG_DEDICATED *pucch_config_dedicated = &eNB->pucch_config_dedicated[UE_id];
int8_t sigma2_dB = max(eNB->measurements.n0_subband_power_tot_dB[0],
eNB->measurements.n0_subband_power_tot_dB[eNB->frame_parms.N_RB_UL-1]);
int8_t sigma2_dB = max(eNB->measurements.n0_subband_power_tot_dB[0], eNB->measurements.n0_subband_power_tot_dB[eNB->frame_parms.N_RB_UL-1]);
uint32_t u,v,n,aa;
uint32_t z[12*14];
......@@ -779,7 +775,6 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
int16_t Fmt3xDataAvgSym[2][12][2]; //[Slot][Subcarrier][Complex]
int16_t IFFTOutData_Fmt3[2][12][2]; //[Slot][Subcarrier][Complex]
int16_t b[48]; //[bit]
//int16_t IP_CsData_allavg[NB_ANTENNAS_RX][12][4][2]; //[Antenna][Symbol][Nouse Cyclic Shift][Complex]
int16_t payload_entity = -1;
int16_t Interpw;
int16_t payload_max;
......
......@@ -329,7 +329,7 @@ typedef struct {
uint8_t subframe;
/// corresponding UE RNTI
uint16_t rnti;
/// Type (SR,HARQ,CQI,HARQ_SR,HARQ_CQI,SR_CQI,HARQ_SR_CQI)
/// Type (SR, HARQ, CQI, HARQ_SR, HARQ_CQI, SR_CQI, HARQ_SR_CQI)
UCI_type_t type;
/// SRS active flag
uint8_t srs_active;
......
......@@ -598,7 +598,12 @@ void handle_uci_harq_information(PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci,nfapi_ul_co
}
}
void handle_uci_sr_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu_t *ul_config_pdu,uint16_t frame,uint8_t subframe,uint8_t srs_active)
void handle_uci_sr_pdu(PHY_VARS_eNB *eNB,
int UE_id,
nfapi_ul_config_request_pdu_t *ul_config_pdu,
uint16_t frame,
uint8_t subframe,
uint8_t srs_active)
{
LTE_eNB_UCI *uci = &eNB->uci_vars[UE_id];
......@@ -620,7 +625,10 @@ void handle_uci_sr_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu_t
uci->total_repetitions = ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel13.total_number_of_repetitions;
#endif
LOG_D(PHY,"Programming UCI SR rnti %x, pucch1_0 %d for (%d,%d)\n",
uci->rnti,uci->n_pucch_1_0_sr[0],frame,subframe);
uci->rnti,
uci->n_pucch_1_0_sr[0],
frame,
subframe);
}
void handle_uci_sr_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu_t *ul_config_pdu,uint16_t frame,uint8_t subframe,uint8_t srs_active)
......
This diff is collapsed.
......@@ -36,6 +36,7 @@
#include "LTE_SystemInformationBlockType2.h"
#include "LTE_SL-OffsetIndicator-r12.h"
#include "LTE_SubframeBitmapSL-r12.h"
#include "LTE_DRX-Config.h" // Add DRX SSR 2018-10
#include "LTE_SL-CP-Len-r12.h"
#include "LTE_SL-PeriodComm-r12.h"
#include "LTE_SL-DiscResourcePool-r12.h"
......@@ -141,6 +142,14 @@ typedef struct RadioResourceConfig_s {
long bcch_modificationPeriodCoeff;
long pcch_defaultPagingCycle;
long pcch_nB;
LTE_DRX_Config_PR drx_Config_present; // Add DRX SSR 2018-10
long drx_onDurationTimer; // Add DRX SSR 2018-10
long drx_InactivityTimer; // Add DRX SSR 2018-10
long drx_RetransmissionTimer; // Add DRX SSR 2018-10
LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR drx_longDrx_CycleStartOffset_present; // Add DRX SSR 2018-10
long drx_longDrx_CycleStartOffset; // Add DRX SSR 2018-10
long drx_shortDrx_Cycle; // Add DRX SSR 2018-10
long drx_shortDrx_ShortCycleTimer; // Add DRX SSR 2018-10
long ue_TimersAndConstants_t300;
long ue_TimersAndConstants_t301;
long ue_TimersAndConstants_t310;
......
This diff is collapsed.
......@@ -932,6 +932,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
break;
}
RRC_CONFIGURATION_REQ (msg_p).rar_HoppingConfig_r13[cc_idx][rachCEInfoIndex] = eMTCconfig->rar_HoppingConfig_r13;
AssertFatal(eMTCconfig->rar_HoppingConfig_r13 == 0 || eMTCconfig->rar_HoppingConfig_r13 == 1,
"illegal rar_HoppingConfig_r13 %d\n",eMTCconfig->rar_HoppingConfig_r13);
} // end for loop (rach ce level info)
......@@ -1101,11 +1102,12 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
/** PCCH CONFIG V1310 */
RRC_CONFIGURATION_REQ(msg_p).pcch_config_v1310[cc_idx] = TRUE;
RRC_CONFIGURATION_REQ(msg_p).paging_narrowbands_r13[cc_idx] = eMTCconfig->paging_narrowbands_r13;
RRC_CONFIGURATION_REQ(msg_p).mpdcch_numrepetition_paging_r13[cc_idx] = eMTCconfig->mpdcch_numrepetition_paging_r13;
AssertFatal (eMTCconfig->mpdcch_numrepetition_paging_r13 == 1 ||
AssertFatal (eMTCconfig->mpdcch_numrepetition_paging_r13 == 0 ||
eMTCconfig->mpdcch_numrepetition_paging_r13 == 1 ||
eMTCconfig->mpdcch_numrepetition_paging_r13 == 2 ||
eMTCconfig->mpdcch_numrepetition_paging_r13 == 4 ||
eMTCconfig->mpdcch_numrepetition_paging_r13 == 8 ||
......@@ -1117,7 +1119,6 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
"illegal mpdcch_numrepetition_paging_r13 %d\n",
eMTCconfig->mpdcch_numrepetition_paging_r13);
// RRC_CONFIGURATION_REQ(msg_p).nb_v1310[cc_idx] = CALLOC(1, sizeof(long));
// if (!strcmp(nb_v1310, "one64thT")) {
// *RRC_CONFIGURATION_REQ(msg_p).nb_v1310[cc_idx] = 0;
......
......@@ -323,7 +323,6 @@ typedef enum {
#define ENB_CONFIG_STRING_FREQ_HOPPING_PARAMETERS_R13 "sib2_freq_hoppingParameters_r13"
#define ENB_CONFIG_STRING_PDSCH_RS_EPRE "pdsch_referenceSignalPower"
#define ENB_CONFIG_STRING_PDSCH_PB "pdsch_p_b"
#define ENB_CONFIG_STRING_PUSCH_N_SB "pusch_n_SB"
......@@ -364,6 +363,14 @@ typedef enum {
#define ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX "rach_maxHARQ_Msg3Tx"
#define ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE "pcch_default_PagingCycle"
#define ENB_CONFIG_STRING_PCCH_NB "pcch_nB"
#define ENB_CONFIG_STRING_DRX_CONFIG_PRESENT "drx_Config_present" // Add DRX SSR 2018-10
#define ENB_CONFIG_STRING_DRX_ONDURATIONTIMER "drx_onDurationTimer" // Add DRX SSR 2018-10
#define ENB_CONFIG_STRING_DRX_INACTIVITYTIMER "drx_InactivityTimer" // Add DRX SSR 2018-10
#define ENB_CONFIG_STRING_DRX_RETRANSMISSIONTIMER "drx_RetransmissionTimer" // Add DRX SSR 2018-10
#define ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_PRESENT "drx_longDrx_CycleStartOffset_present" // Add DRX SSR 2018-10
#define ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET "drx_longDrx_CycleStartOffset" // Add DRX SSR 2018-10
#define ENB_CONFIG_STRING_DRX_SHORTDRX_CYCLE "drx_shortDrx_Cycle" // Add DRX SSR 2018-10
#define ENB_CONFIG_STRING_DRX_SHORTDRX_SHORTCYCLETIMER "drx_shortDrx_ShortCycleTimer" // Add DRX SSR 2018-10
#define ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF "bcch_modificationPeriodCoeff"
#define ENB_CONFIG_STRING_UETIMERS_T300 "ue_TimersAndConstants_t300"
#define ENB_CONFIG_STRING_UETIMERS_T301 "ue_TimersAndConstants_t301"
......@@ -496,6 +503,14 @@ typedef struct ccparams_lte_s {
int32_t rach_maxHARQ_Msg3Tx;
int32_t pcch_defaultPagingCycle;
char *pcch_nB;
char *drx_Config_present;
char *drx_onDurationTimer;
char *drx_InactivityTimer;
char *drx_RetransmissionTimer;
char *drx_longDrx_CycleStartOffset_present;
int32_t drx_longDrx_CycleStartOffset;
char *drx_shortDrx_Cycle;
int32_t drx_shortDrx_ShortCycleTimer;
int32_t bcch_modificationPeriodCoeff;
int32_t ue_TimersAndConstants_t300;
int32_t ue_TimersAndConstants_t301;
......@@ -574,6 +589,14 @@ typedef struct ccparams_lte_s {
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , /* Add DRX SSR 2018-10 */ \
{ .s5= {NULL }} , /* Add DRX SSR 2018-10 */ \
{ .s5= {NULL }} , /* Add DRX SSR 2018-10 */ \
{ .s5= {NULL }} , /* Add DRX SSR 2018-10 */ \
{ .s5= {NULL }} , /* Add DRX SSR 2018-10 */ \
{ .s5= {NULL }} , /* Add DRX SSR 2018-10 */ \
{ .s5= {NULL }} , /* Add DRX SSR 2018-10 */ \
{ .s5= {NULL }} , /* Add DRX SSR 2018-10 */ \
{ .s5= {NULL }} , \
{ .s1a= { config_check_modify_integer, UETIMER_T300_OKVALUES, UETIMER_T300_MODVALUES,8}} , \
{ .s1a= { config_check_modify_integer, UETIMER_T301_OKVALUES, UETIMER_T301_MODVALUES,8}} , \
......@@ -688,6 +711,14 @@ typedef struct ccparams_lte_s {
{ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX, NULL, 0, iptr:&ccparams.rach_maxHARQ_Msg3Tx, defintval:4, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE, NULL, 0, iptr:&ccparams.pcch_defaultPagingCycle, defintval:128, TYPE_INT, 0}, \
{ENB_CONFIG_STRING_PCCH_NB, NULL, 0, strptr:&ccparams.pcch_nB, defstrval:"oneT", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DRX_CONFIG_PRESENT, NULL, 0, strptr:&ccparams.drx_Config_present, defstrval:"prNothing", TYPE_STRING, 0}, /* Add DRX SSR 2018-10 */ \
{ENB_CONFIG_STRING_DRX_ONDURATIONTIMER, NULL, 0, strptr:&ccparams.drx_onDurationTimer, defstrval:"psf10", TYPE_STRING, 0}, /* Add DRX SSR 2018-10 */ \
{ENB_CONFIG_STRING_DRX_INACTIVITYTIMER, NULL, 0, strptr:&ccparams.drx_InactivityTimer, defstrval:"psf10", TYPE_STRING, 0}, /* Add DRX SSR 2018-10 */ \
{ENB_CONFIG_STRING_DRX_RETRANSMISSIONTIMER, NULL, 0, strptr:&ccparams.drx_RetransmissionTimer, defstrval:"psf8", TYPE_STRING, 0}, /* Add DRX SSR 2018-10 */ \
{ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_PRESENT, NULL, 0, strptr:&ccparams.drx_longDrx_CycleStartOffset_present, defstrval:"prSf128", TYPE_STRING, 0}, /* Add DRX SSR 2018-10 */ \
{ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET, NULL, 0, iptr:&ccparams.drx_longDrx_CycleStartOffset, defintval:0, TYPE_UINT, 0}, /* Add DRX SSR 2018-10 */ \
{ENB_CONFIG_STRING_DRX_SHORTDRX_CYCLE, NULL, 0, strptr:&ccparams.drx_shortDrx_Cycle, defstrval:"sf32", TYPE_STRING, 0}, /* Add DRX SSR 2018-10 */ \
{ENB_CONFIG_STRING_DRX_SHORTDRX_SHORTCYCLETIMER, NULL, 0, iptr:&ccparams.drx_shortDrx_ShortCycleTimer, defintval:3, TYPE_UINT, 0}, /* Add DRX SSR 2018-10 */ \
{ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF, NULL, 0, iptr:&ccparams.bcch_modificationPeriodCoeff, defintval:2, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UETIMERS_T300, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t300, defintval:1000, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UETIMERS_T301, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t301, defintval:1000, TYPE_UINT, 0}, \
......@@ -761,14 +792,22 @@ typedef struct ccparams_lte_s {
#define ENB_CONFIG_RACH_MAXHARQMSG3TX_IDX 57
#define ENB_CONFIG_PCCH_DEFAULT_PAGING_CYCLE_IDX 58
#define ENB_CONFIG_PCCH_NB_IDX 59
#define ENB_CONFIG_BCCH_MODIFICATIONPERIODCOEFF_IDX 60
#define ENB_CONFIG_UETIMERS_T300_IDX 61
#define ENB_CONFIG_UETIMERS_T301_IDX 62
#define ENB_CONFIG_UETIMERS_T310_IDX 63
#define ENB_CONFIG_UETIMERS_T311_IDX 64
#define ENB_CONFIG_UETIMERS_N310_IDX 65
#define ENB_CONFIG_UETIMERS_N311_IDX 66
#define ENB_CONFIG_UE_TRANSMISSION_MODE_IDX 67
#define ENB_CONFIG_STRING_DRX_CONFIG_PRESENT_IDX 60 // Add DRX SSR 2018-10
#define ENB_CONFIG_STRING_DRX_ONDURATIONTIMER_IDX 61 // Add DRX SSR 2018-10
#define ENB_CONFIG_STRING_DRX_INACTIVITYTIMER_IDX 62 // Add DRX SSR 2018-10
#define ENB_CONFIG_STRING_DRX_RETRANSMISSIONTIMER_IDX 63 // Add DRX SSR 2018-10
#define ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_PRESENT_IDX 64 // Add DRX SSR 2018-10
#define ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_IDX 65 // Add DRX SSR 2018-10
#define ENB_CONFIG_STRING_DRX_SHORTDRX_CYCLE_IDX 66 // Add DRX SSR 2018-10
#define ENB_CONFIG_STRING_DRX_SHORTDRX_SHORTCYCLETIMER_IDX 67 // Add DRX SSR 2018-10
#define ENB_CONFIG_BCCH_MODIFICATIONPERIODCOEFF_IDX 68 // Modif DRX SSR 2018-10
#define ENB_CONFIG_UETIMERS_T300_IDX 69 // Modif DRX SSR 2018-10
#define ENB_CONFIG_UETIMERS_T301_IDX 70 // Modif DRX SSR 2018-10
#define ENB_CONFIG_UETIMERS_T310_IDX 71 // Modif DRX SSR 2018-10
#define ENB_CONFIG_UETIMERS_T311_IDX 72 // Modif DRX SSR 2018-10
#define ENB_CONFIG_UETIMERS_N310_IDX 73 // Modif DRX SSR 2018-10
#define ENB_CONFIG_UETIMERS_N311_IDX 74 // Modif DRX SSR 2018-10
#define ENB_CONFIG_UE_TRANSMISSION_MODE_IDX 75 // Modif DRX SSR 2018-10
/*------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* SRB1 configuration parameters section name */
......
......@@ -61,7 +61,10 @@
#define ENB_CONFIG_STRING_PREAMBLE_TRANSMAX_CE_R13 "preamble_TransMax_ce_r13"
#define ENB_CONFIG_STRING_PREAMBLE_TRANSMAX_CE_R13_VAL "preamble_TransMax_ce_r13_val"
#define ENB_CONFIG_STRING_PDSCH_MAX_NUM_REPETITION_CE_MODE_A_R13 "pdsch_maxNumRepetitionCEmodeA_r13"
#define ENB_CONFIG_STRING_PDSCH_MAX_NUM_REPETITION_CE_MODE_B_R13 "pdsch_maxNumRepetitionCEmodeB_r13"
#define ENB_CONFIG_STRING_PUSCH_MAX_NUM_REPETITION_CE_MODE_A_R13 "pusch_maxNumRepetitionCEmodeA_r13"
#define ENB_CONFIG_STRING_PUSCH_MAX_NUM_REPETITION_CE_MODE_B_R13 "pusch_maxNumRepetitionCEmodeB_r13"
#define ENB_CONFIG_STRING_PUSCH_HOPPING_OFFSET_V1310 "pusch_HoppingOffset_v1310"
#define ENB_CONFIG_STRING_SYSTEM_INFO_VALUE_TAG_LIST "system_info_value_tag_SI"
#define ENB_CONFIG_STRING_FIRST_PREAMBLE_R13 "firstPreamble_r13"
#define ENB_CONFIG_STRING_LAST_PREAMBLE_R13 "lastPreamble_r13"
......@@ -81,6 +84,9 @@
#define ENB_CONFIG_STRING_PUCCH_INFO_VALUE "pucch_info_value"
#define ENB_CONFIG_STRING_N1PUCCH_AN_INFOLIST_R13 "n1PUCCH_AN_InfoList_r13"
#define ENB_CONFIG_STRING_PCCH_CONFIG_V1310 "pcch_config_v1310"
#define ENB_CONFIG_STRING_PAGING_NARROWBANDS_R13 "paging_narrowbands_r13"
#define ENB_CONFIG_STRING_MPDCCH_NUMREPETITION_PAGING_R13 "mpdcch_numrepetition_paging_r13"
#define ENB_CONFIG_STRING_NB_V1310 "nb_v1310"
#define ENB_CONFIG_STRING_SIB2_FREQ_HOPPINGPARAMETERS_R13 "sib2_freq_hoppingParameters_r13"
typedef struct ccparams_eMTC_s {
......
This diff is collapsed.
This diff is collapsed.
......@@ -353,6 +353,9 @@ void generate_Msg2(module_id_t module_idP,
AssertFatal (cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13 != NULL, "cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13 is null\n");
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.start_symbol = cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->startSymbolBR_r13;
LOG_E(MAC, "start_symbol = %d \n", dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.start_symbol);
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.ecce_index = 0; // Note: this should be dynamic
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.aggregation_level = 24; // OK for CEModeA r1-3 (9.1.5-1b) or CEModeB r1-4
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.rnti_type = 2; // RA-RNTI
......
......@@ -477,7 +477,7 @@ schedule_ue_spec(module_id_t module_idP,
int TBS, j, padding = 0, post_padding = 0;
rnti_t rnti;
unsigned char dlsch_buffer[MAX_DLSCH_PAYLOAD_BYTES];
int round = 0;
int round_DL = 0;
int harq_pid = 0;
uint16_t release_num;
uint8_t ra_ii;
......@@ -636,12 +636,15 @@ schedule_ue_spec(module_id_t module_idP,
LOG_D(MAC, "doing schedule_ue_spec for CC_id %d UE %d\n",
CC_id,
UE_id);
continue_flag = 0; // reset the flag to allow allocation for the remaining UEs
rnti = UE_RNTI(module_idP, UE_id);
ue_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id];
ue_template = &UE_list->UE_template[CC_id][UE_id];
if (ue_template->rach_resource_type > 0) continue_flag = 1;
if (ue_template->rach_resource_type > 0) {
continue_flag = 1;
}
if (&(UE_list->eNB_UE_stats[CC_id][UE_id]) == NULL) {
LOG_D(MAC, "[eNB] Cannot find eNB_UE_stats\n");
......@@ -722,11 +725,11 @@ schedule_ue_spec(module_id_t module_idP,
harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,
frameP,
subframeP);
round = ue_sched_ctrl->round[CC_id][harq_pid];
round_DL = ue_sched_ctrl->round[CC_id][harq_pid];
eNB_UE_stats->crnti = rnti;
eNB_UE_stats->rrc_status = mac_eNB_get_rrc_status(module_idP, rnti);
eNB_UE_stats->harq_pid = harq_pid;
eNB_UE_stats->harq_round = round;
eNB_UE_stats->harq_round = round_DL;
if (eNB_UE_stats->rrc_status < RRC_CONNECTED) {
LOG_D(MAC, "UE %d is not in RRC_CONNECTED\n",
......@@ -760,24 +763,55 @@ schedule_ue_spec(module_id_t module_idP,
LOG_D(MAC, "[eNB %d] Frame %d: Scheduling UE %d on CC_id %d (rnti %x, harq_pid %d, round %d, rb %d, cqi %d, mcs %d, rrc %d)\n",
module_idP,
frameP, UE_id,
frameP,
UE_id,
CC_id,
rnti,
harq_pid,
round,
round_DL,
nb_available_rb,
ue_sched_ctrl->dl_cqi[CC_id],
eNB_UE_stats->dlsch_mcs1,
eNB_UE_stats->rrc_status);
/* process retransmission */
if (round != 8) {
/* Process retransmission */
if (round_DL != 8) {
//if (round_DL > 0) {
// get freq_allocation
nb_rb = ue_template->nb_rb[harq_pid];
TBS = get_TBS_DL(ue_template->oldmcs1[harq_pid],
nb_rb);
if (nb_rb <= nb_available_rb) {
/* CDRX */
ue_sched_ctrl->harq_rtt_timer[CC_id][harq_pid] = 1; // restart HARQ RTT timer
/*
LOG_W(MAC, "HELLO : round!=8 UE_id = %d, frame = %d; subframe = %d; CC_id %d, harq_pid = %d , RTT_timer = %d,%d,%d,%d,%d,%d,%d,%d\n",
UE_id,
frameP,
subframeP,
CC_id,
harq_pid,
ue_sched_ctrl->harq_rtt_timer[CC_id][0],
ue_sched_ctrl->harq_rtt_timer[CC_id][1],
ue_sched_ctrl->harq_rtt_timer[CC_id][2],
ue_sched_ctrl->harq_rtt_timer[CC_id][3],
ue_sched_ctrl->harq_rtt_timer[CC_id][4],
ue_sched_ctrl->harq_rtt_timer[CC_id][5],
ue_sched_ctrl->harq_rtt_timer[CC_id][6],
ue_sched_ctrl->harq_rtt_timer[CC_id][7]);
*/
if (ue_sched_ctrl->cdrx_configured) {
ue_sched_ctrl->drx_retransmission_timer[harq_pid] = 0; // stop drx retransmission
/* May be a problem with drx_retransmission_timer[harq_pid]. Here the timer is reset not stop.
* Can create a problem with several CC_id with the same UE??
*/
if (harq_pid == 0) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DRX_RETRANSMISSION_HARQ0, (unsigned long) ue_sched_ctrl->drx_retransmission_timer[0]);
}
}
if (cc[CC_id].tdd_Config != NULL) {
ue_template->DAI++;
update_ul_dci(module_idP,
......@@ -852,7 +886,7 @@ schedule_ue_spec(module_id_t module_idP,
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // Don't adjust power when retransmitting
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = ue_template->oldNDI[harq_pid];
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = ue_template->oldmcs1[harq_pid];
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = round & 3;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = round_DL & 3;
// TDD
if (cc[CC_id].tdd_Config != NULL) {
......@@ -861,7 +895,7 @@ schedule_ue_spec(module_id_t module_idP,
module_idP,
CC_id,
harq_pid,
round,
round_DL,
ue_template->DAI - 1,
ue_template->oldmcs1[harq_pid]);
} else {
......@@ -869,7 +903,7 @@ schedule_ue_spec(module_id_t module_idP,
module_idP,
CC_id,
harq_pid,
round,
round_DL,
ue_template->oldmcs1[harq_pid]);
}
......@@ -893,7 +927,7 @@ schedule_ue_spec(module_id_t module_idP,
0, // virtual_resource_block_assignment_flag, unused here
0, // resource_block_coding, to be filled in later
getQm(ue_template->oldmcs1[harq_pid]),
round & 3, // redundancy version
round_DL & 3, // redundancy version
1, // transport blocks
0, // transport block to codeword swap flag
cc[CC_id].p_eNB == 1 ? 0 : 1, // transmission_scheme
......@@ -911,7 +945,7 @@ schedule_ue_spec(module_id_t module_idP,
LOG_D(MAC, "Filled NFAPI configuration for DCI/DLSCH %d, retransmission round %d\n",
eNB->pdu_index[CC_id],
round);
round_DL);
program_dlsch_acknak(module_idP,
CC_id,
UE_id,
......@@ -946,7 +980,8 @@ schedule_ue_spec(module_id_t module_idP,
CC_id,
UE_id);
}
} else { /* This is a potentially new SDU opportunity */
} else {
/* This is a potentially new SDU opportunity */
rlc_status.bytes_in_buffer = 0;
// Now check RLC information to compute number of required RBs
// get maximum TBS size for RLC request
......@@ -1265,7 +1300,7 @@ schedule_ue_spec(module_id_t module_idP,
}
}
/* last header does not have length field */
/* Last header does not have length field */
if (header_length_total) {
header_length_total -= header_length_last;
header_length_total++;
......@@ -1569,6 +1604,38 @@ schedule_ue_spec(module_id_t module_idP,
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
eNB->DL_req[CC_id].sfn_sf = frameP << 4 | subframeP;
eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST;
/* CDRX */
ue_sched_ctrl->harq_rtt_timer[CC_id][harq_pid] = 1; // restart HARQ RTT timer
/*
LOG_W(MAC, "HELLO : round=8, UE_id = %d, frame = %d; subframe = %d ; CC_id %d, harq_pid = %d , RTT_timer = %d,%d,%d,%d,%d,%d,%d,%d\n",
UE_id,
frameP,
subframeP,
CC_id,
harq_pid,
ue_sched_ctrl->harq_rtt_timer[CC_id][0],
ue_sched_ctrl->harq_rtt_timer[CC_id][1],
ue_sched_ctrl->harq_rtt_timer[CC_id][2],
ue_sched_ctrl->harq_rtt_timer[CC_id][3],
ue_sched_ctrl->harq_rtt_timer[CC_id][4],
ue_sched_ctrl->harq_rtt_timer[CC_id][5],
ue_sched_ctrl->harq_rtt_timer[CC_id][6],
ue_sched_ctrl->harq_rtt_timer[CC_id][7]);
*/
if (ue_sched_ctrl->cdrx_configured) {
ue_sched_ctrl->drx_inactivity_timer = 1; // restart drx inactivity timer when new transmission
ue_sched_ctrl->drx_retransmission_timer[harq_pid] = 0; // stop drx retransmission
/* May be a problem with drx_retransmission_timer[harq_pid]. Here the timer is reset not stop.
* Can create a problem with several CC_id with the same UE??
*/
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DRX_INACTIVITY, (unsigned long) ue_sched_ctrl->drx_inactivity_timer);
if (harq_pid == 0) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DRX_RETRANSMISSION_HARQ0, (unsigned long) ue_sched_ctrl->drx_retransmission_timer[0]);
}
}
// Toggle NDI for next time
LOG_D(MAC, "CC_id %d Frame %d, subframeP %d: Toggling Format1 NDI for UE %d (rnti %x/%d) oldNDI %d\n",
CC_id,
......@@ -1983,6 +2050,13 @@ schedule_ue_spec_br(module_id_t module_idP,
continue;
}
/* CDRX LTE-M */
if (ue_sched_ctl->cdrx_configured == TRUE) {
if ((ue_sched_ctl->bypass_cdrx == FALSE) && (ue_sched_ctl->in_active_time == FALSE)) {
continue;
}
}
round_DL = ue_sched_ctl->round[CC_id][harq_pid];
AssertFatal (UE_template->physicalConfigDedicated != NULL, "UE_template->physicalConfigDedicated is null\n");
......
This diff is collapsed.
......@@ -553,6 +553,7 @@ typedef struct {
uint16_t serving_num;
UE_ULSCH_STATUS status;
} eNB_ULSCH_INFO;
/*! \brief temp struct for DLSCH sched */
typedef struct {
rnti_t rnti;
......@@ -561,6 +562,7 @@ typedef struct {
uint16_t serving_num;
UE_DLSCH_STATUS status;
} eNB_DLSCH_INFO;
/*! \brief eNB overall statistics */
typedef struct {
/// num BCCH PDU per CC
......@@ -635,6 +637,7 @@ typedef struct {
int missed_deadlines;
} eNB_STATS;
/*! \brief eNB statistics for the connected UEs*/
typedef struct {
/// CRNTI of UE
......@@ -778,6 +781,7 @@ typedef struct {
} eNB_UE_STATS;
/*! \brief eNB template for UE context information */
typedef struct {
/// C-RNTI of UE
rnti_t rnti;
......@@ -995,6 +999,49 @@ typedef struct {
int32_t uplane_inactivity_timer;
uint8_t crnti_reconfigurationcomplete_flag;
uint8_t cqi_req_flag;
/* HARQ RRT Timers */
/// (UL) HARQ RTT timers, especially used for CDRX operations, one timer per cell per harq process (and per user)
uint8_t harq_rtt_timer[NFAPI_CC_MAX][8];
uint8_t ul_harq_rtt_timer[NFAPI_CC_MAX][8]; // Note: UL HARQ RTT timers are only for asynchronous HARQ processes!!
uint8_t ul_synchronous_harq_timer[NFAPI_CC_MAX][8];
/* C-DRX related timers */
/* Note: only valid for FDD when this comment is written (11-01-19)*/
/// is TRUE if the cqi mask feature is activated by RRC configuration
boolean_t cqi_mask_boolean;
/// is TRUE if the following drx parameters are configured for UE
boolean_t cdrx_configured;
/// if TRUE, the scheduler should bypass in_active_time and consider the UE as active
boolean_t bypass_cdrx;
/// is TRUE if the UE is in "Active Time", hence listening to PDCCH
boolean_t in_active_time;
/// OnDurationTimer
uint16_t on_duration_timer;
uint16_t on_duration_timer_thres;
/// drx-InactivityTimer
uint16_t drx_inactivity_timer;
uint16_t drx_inactivity_timer_thres;
/// is TRUE if UE is currently in short DRX cycle
boolean_t in_short_drx_cycle;
/// drxShortCycleTimer int (1..16) (number of short DRX cycles duration before long DRX cycles)
uint8_t drx_shortCycle_timer_value;
/// shortDRX-Cycle (duration of a short DRX cycle)
uint16_t short_drx_cycle_duration;
/// DRX short cycle timer before switching to long DRX cycle = drx_shortCycle_timer_value * short_drx_cycle_duration
uint16_t drx_shortCycle_timer;
uint16_t drx_shortCycle_timer_thres;
/// is TRUE if UE is currently in long DRX cycle
boolean_t in_long_drx_cycle;
/// longDRX-CycleStartOffset (long DRX cycle timer)
uint16_t drx_longCycle_timer;
uint16_t drx_longCycle_timer_thres;
/// longDRX-CycleStartOffset (offset value)
uint16_t drx_start_offset;
/// DRX retransmission timer, one per DL HARQ process
uint8_t drx_retransmission_timer[8];
uint8_t drx_retransmission_timer_thres[8];
/* End of C-DRX related timers */
} UE_sched_ctrl;
/*! \brief eNB template for the Random access information */
......@@ -1482,6 +1529,7 @@ typedef struct {
int16_t bucket_size[MAX_NUM_LCID];
} UE_SCHEDULING_INFO;
/*!\brief Top level UE MAC structure */
typedef struct {
uint16_t Node_id;
/// RX frame counter
......
......@@ -1280,6 +1280,10 @@ uint16_t nb_rbs_allowed_slice(float rb_percentage, int total_rbs);
int ue_dl_slice_membership(module_id_t mod_id, int UE_id, int slice_idx);
int ue_ul_slice_membership(module_id_t mod_id, int UE_id, int slice_idx);
/* DRX Configuration */
/* Configure local DRX timers and thresh following the drx_configuration input */
void eNB_Config_Local_DRX(module_id_t Mod_id, rnti_t rnti, LTE_DRX_Config_t *drx_Configuration);
/* from here: prototypes to get rid of compilation warnings: doc to be written by function author */
uint8_t ul_subframe2_k_phich(COMMON_channels_t * cc, sub_frame_t ul_subframe);
#endif
......
......@@ -459,7 +459,7 @@ void decode_slice_positioning(module_id_t Mod_idP,
}
// This fuction sorts the UE in order their dlsch buffer and CQI
// This function sorts the UE in order their dlsch buffer and CQI
void
sort_UEs(module_id_t Mod_idP,
int slice_idx,
......@@ -471,9 +471,19 @@ sort_UEs(module_id_t Mod_idP,
int list_size = 0;
struct sort_ue_dl_params params = {Mod_idP, frameP, subframeP, slice_idx};
UE_list_t *UE_list = &RC.mac[Mod_idP]->UE_list;
UE_sched_ctrl *UE_scheduling_control = NULL;
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
UE_scheduling_control = &(UE_list->UE_sched_ctrl[i]);
if (UE_scheduling_control->cdrx_configured == TRUE) {
if ((UE_scheduling_control->bypass_cdrx == FALSE) && (UE_scheduling_control->in_active_time == FALSE)) {
continue;
}
}
if (UE_list->active[i] == TRUE &&
UE_RNTI(Mod_idP, i) != NOT_A_RNTI &&
UE_list->UE_sched_ctrl[i].ul_out_of_sync != 1 &&
......@@ -1636,8 +1646,9 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
uint16_t average_rbs_per_user[NFAPI_CC_MAX];
int16_t total_remaining_rbs[NFAPI_CC_MAX];
uint16_t total_ue_count[NFAPI_CC_MAX];
UE_list_t *UE_list = &RC.mac[module_idP]->UE_list;
slice_info_t *sli = &RC.mac[module_idP]->slice_info;
eNB_MAC_INST *eNB = RC.mac[module_idP];
UE_list_t *UE_list = &eNB->UE_list;
slice_info_t *sli = &eNB->slice_info;
UE_TEMPLATE *UE_template = 0;
UE_sched_ctrl *ue_sched_ctl;
int N_RB_UL = 0;
......@@ -1695,7 +1706,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
nCCE_to_be_used[CC_id] = nCCE_to_be_used[CC_id] + (1<<aggregation);
max_num_ue_to_be_scheduled+=1;
} */
N_RB_UL = to_prb(RC.mac[module_idP]->common_channels[CC_id].ul_Bandwidth);
N_RB_UL = to_prb(eNB->common_channels[CC_id].ul_Bandwidth);
ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_idx] =
nb_rbs_allowed_slice(sli->ul[slice_idx].pct, N_RB_UL);
......@@ -1740,7 +1751,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
// This is the actual CC_id in the list
CC_id = UE_list->ordered_ULCCids[n][UE_id];
UE_template = &UE_list->UE_template[CC_id][UE_id];
harq_pid = subframe2harqpid(&RC.mac[module_idP]->common_channels[CC_id],
harq_pid = subframe2harqpid(&eNB->common_channels[CC_id],
frameP, sched_subframeP);
// mac_xface->get_ue_active_harq_pid(module_idP,CC_id,rnti,frameP,subframeP,&harq_pid,&round,openair_harq_UL);
......@@ -1772,7 +1783,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
// This is the actual CC_id in the list
CC_id = UE_list->ordered_ULCCids[n][UE_id];
UE_template = &UE_list->UE_template[CC_id][UE_id];
N_RB_UL = to_prb(RC.mac[module_idP]->common_channels[CC_id].ul_Bandwidth);
N_RB_UL = to_prb(eNB->common_channels[CC_id].ul_Bandwidth);
first_rb_offset = UE_list->first_rb_offset[CC_id][slice_idx];
available_rbs = cmin(ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_idx], N_RB_UL - first_rb[CC_id] - first_rb_offset);
total_remaining_rbs[CC_id] = available_rbs - total_allocated_rbs[CC_id];
......@@ -1993,8 +2004,19 @@ sort_ue_ul(module_id_t module_idP,
int list_size = 0;
struct sort_ue_ul_params params = { module_idP, frameP, subframeP };
UE_list_t *UE_list = &RC.mac[module_idP]->UE_list;
UE_sched_ctrl *UE_scheduling_control = NULL;
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
UE_scheduling_control = &(UE_list->UE_sched_ctrl[i]);
if (UE_scheduling_control->cdrx_configured == TRUE) {
if ((UE_scheduling_control->bypass_cdrx == FALSE) && (UE_scheduling_control->in_active_time == FALSE)) {
continue;
}
}
rntiTable[i] = UE_RNTI(module_idP, i);
// Valid element and is not the actual CC_id in the list
if (UE_list->active[i] == TRUE &&
......
......@@ -38,7 +38,7 @@
#include "common/ran_context.h"
#if defined(ENABLE_ITTI)
# include "intertask_interface.h"
#include "intertask_interface.h"
#endif
//#define RRC_DATA_REQ_DEBUG
......@@ -49,21 +49,21 @@ extern RAN_CONTEXT_t RC;
//------------------------------------------------------------------------------
uint8_t
rrc_data_req(
const protocol_ctxt_t* const ctxt_pP,
const protocol_ctxt_t *const ctxt_pP,
const rb_id_t rb_idP,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_sizeP,
uint8_t* const buffer_pP,
uint8_t *const buffer_pP,
const pdcp_transmission_mode_t modeP
)
//------------------------------------------------------------------------------
{
if(sdu_sizeP == 255)
{
if(sdu_sizeP == 255) {
LOG_I(RRC,"sdu_sizeP == 255");
return FALSE;
}
MSC_LOG_TX_MESSAGE(
ctxt_pP->enb_flag ? MSC_RRC_ENB : MSC_RRC_UE,
ctxt_pP->enb_flag ? MSC_PDCP_ENB : MSC_PDCP_UE,
......@@ -74,20 +74,16 @@ rrc_data_req(
ctxt_pP->rnti,
muiP,
sdu_sizeP);
#if defined(ENABLE_ITTI)
{
MessageDef *message_p;
// Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling).
uint8_t *message_buffer;
message_buffer = itti_malloc (
ctxt_pP->enb_flag ? TASK_RRC_ENB : TASK_RRC_UE,
ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE,
sdu_sizeP);
memcpy (message_buffer, buffer_pP, sdu_sizeP);
message_p = itti_alloc_new_message (ctxt_pP->enb_flag ? TASK_RRC_ENB : TASK_RRC_UE, RRC_DCCH_DATA_REQ);
RRC_DCCH_DATA_REQ (message_p).frame = ctxt_pP->frame;
RRC_DCCH_DATA_REQ (message_p).enb_flag = ctxt_pP->enb_flag;
......@@ -102,7 +98,6 @@ rrc_data_req(
RRC_DCCH_DATA_REQ (message_p).module_id = ctxt_pP->module_id;
RRC_DCCH_DATA_REQ (message_p).rnti = ctxt_pP->rnti;
RRC_DCCH_DATA_REQ (message_p).eNB_index = ctxt_pP->eNB_index;
itti_send_msg_to_task (
ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE,
ctxt_pP->instance,
......@@ -117,7 +112,6 @@ rrc_data_req(
#endif
return TRUE; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
}
#else
return pdcp_data_req (
......@@ -135,10 +129,10 @@ rrc_data_req(
//------------------------------------------------------------------------------
void
rrc_data_ind(
const protocol_ctxt_t* const ctxt_pP,
const protocol_ctxt_t *const ctxt_pP,
const rb_id_t Srb_id,
const sdu_size_t sdu_sizeP,
const uint8_t* const buffer_pP
const uint8_t *const buffer_pP
)
//------------------------------------------------------------------------------
{
......@@ -162,10 +156,8 @@ rrc_data_ind(
MessageDef *message_p;
// Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling).
uint8_t *message_buffer;
message_buffer = itti_malloc (ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE, ctxt_pP->enb_flag ? TASK_RRC_ENB : TASK_RRC_UE, sdu_sizeP);
memcpy (message_buffer, buffer_pP, sdu_sizeP);
message_p = itti_alloc_new_message (ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE, RRC_DCCH_DATA_IND);
RRC_DCCH_DATA_IND (message_p).frame = ctxt_pP->frame;
RRC_DCCH_DATA_IND (message_p).dcch_index = DCCH_index;
......@@ -174,16 +166,13 @@ rrc_data_ind(
RRC_DCCH_DATA_IND (message_p).rnti = ctxt_pP->rnti;
RRC_DCCH_DATA_IND (message_p).module_id = ctxt_pP->module_id;
RRC_DCCH_DATA_IND (message_p).eNB_index = ctxt_pP->eNB_index;
itti_send_msg_to_task (ctxt_pP->enb_flag ? TASK_RRC_ENB : TASK_RRC_UE, ctxt_pP->instance, message_p);
}
#else
rrc_eNB_decode_dcch(
ctxt_pP,
DCCH_index,
buffer_pP,
sdu_sizeP);
#endif
}
This diff is collapsed.
This diff is collapsed.
......@@ -70,6 +70,15 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich
#endif
);
/**
\brief Generate configuration for DRX_Config (Add DRX SSR 2018-11)
@param Mod_id Instance of eNB
@param CC_id Id of component to configure
@param configuration Pointer Configuration Request structure
@param UEcap Pointer Configuration UE capablities
@return DRX_Config structure pointer or NULL => error*/
LTE_DRX_Config_t *do_DrxConfig(uint8_t Mod_id, int CC_id, RrcConfigurationReq *configuration, LTE_UE_EUTRA_Capability_t *UEcap);
/**
\brief Generate configuration for SIB1 (eNB).
@param carrier pointer to Carrier information
......
......@@ -140,8 +140,8 @@ static uint8_t check_trigger_meas_event(
LTE_Q_OffsetRange_t ofs, LTE_Q_OffsetRange_t ocs, long a3_offset, LTE_TimeToTrigger_t ttt);
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
static void decode_MBSFNAreaConfiguration(module_id_t module_idP, uint8_t eNB_index, frame_t frameP,uint8_t mbsfn_sync_area);
uint8_t rrc_ue_generate_SidelinkUEInformation( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,LTE_SL_DestinationInfoList_r12_t *destinationInfoList, long *discTxResourceReq,
static void decode_MBSFNAreaConfiguration(module_id_t module_idP, uint8_t eNB_index, frame_t frameP,uint8_t mbsfn_sync_area);
uint8_t rrc_ue_generate_SidelinkUEInformation( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,LTE_SL_DestinationInfoList_r12_t *destinationInfoList, long *discTxResourceReq,
SL_TRIGGER_t mode);
#endif
......
......@@ -46,8 +46,7 @@ int rrc_ue_ral_delete_all_thresholds_type(unsigned int mod_idP, ral_link_param_t
rrc_ral_threshold_key_t *keys = NULL;
unsigned int num_keys = 0;
int return_code = 0;
rc = obj_hashtable_get_keys(UE_rrc_inst[mod_idP].ral_meas_thresholds, (void*)&keys, &num_keys);
rc = obj_hashtable_get_keys(UE_rrc_inst[mod_idP].ral_meas_thresholds, (void *)&keys, &num_keys);
if (rc == HASH_TABLE_OK) {
key = keys;
......@@ -82,10 +81,9 @@ int rrc_ue_ral_delete_threshold(unsigned int mod_idP, ral_link_param_type_t *par
{
hashtable_rc_t rc;
rrc_ral_threshold_key_t ref_key;
memcpy(&ref_key.link_param_type, param_type_pP, sizeof(ral_link_param_type_t));
memcpy(&ref_key.threshold, threshold_pP, sizeof(ral_threshold_t));
rc = obj_hashtable_remove (UE_rrc_inst[mod_idP].ral_meas_thresholds, (void*)&ref_key, sizeof(rrc_ral_threshold_key_t));
rc = obj_hashtable_remove (UE_rrc_inst[mod_idP].ral_meas_thresholds, (void *)&ref_key, sizeof(rrc_ral_threshold_key_t));
if (rc == HASH_TABLE_OK) {
return 0;
......@@ -106,12 +104,9 @@ int rrc_ue_ral_handle_configure_threshold_request(unsigned int mod_idP, MessageD
MessageDef *message_p = NULL;
unsigned int ix_param = 0;
unsigned int ix_thresholds = 0;
DevAssert(msg_pP != NULL);
LOG_I(RRC, "[UE %d] Received %s\n", mod_idP, ITTI_MSG_NAME (msg_pP));
configure_threshold_req_p = &RRC_RAL_CONFIGURE_THRESHOLD_REQ(msg_pP);
transaction_id = configure_threshold_req_p->transaction_id;
for (ix_param = 0; ix_param < configure_threshold_req_p->num_link_cfg_params; ix_param++) {
......@@ -121,7 +116,6 @@ int rrc_ue_ral_handle_configure_threshold_request(unsigned int mod_idP, MessageD
case RAL_TH_ACTION_SET_NORMAL_THRESHOLD:
case RAL_TH_ACTION_SET_ONE_SHOT_THRESHOLD:
switch (link_cfg_param_p->link_param_type.choice) {
case RAL_LINK_PARAM_TYPE_CHOICE_GEN:
switch (link_cfg_param_p->link_param_type._union.link_param_gen) {
case RAL_LINK_PARAM_GEN_DATA_RATE:
......
......@@ -55,9 +55,7 @@ rrc_init_global_param(
)
//-----------------------------------------------------------------------------
{
rrc_rlc_register_rrc (rrc_data_ind, NULL); //register with rlc
DCCH_LCHAN_DESC.transport_block_size = 4;
DCCH_LCHAN_DESC.max_transport_blocks = 16;
DCCH_LCHAN_DESC.Delay_class = 1;
......@@ -67,13 +65,11 @@ rrc_init_global_param(
DTCH_UL_LCHAN_DESC.transport_block_size = 52;
DTCH_UL_LCHAN_DESC.max_transport_blocks = 20;
DTCH_UL_LCHAN_DESC.Delay_class = 1;
Rlc_info_um.rlc_mode = RLC_MODE_UM;
Rlc_info_um.rlc.rlc_um_info.timer_reordering = 5;
Rlc_info_um.rlc.rlc_um_info.sn_field_length = 10;
Rlc_info_um.rlc.rlc_um_info.is_mXch = 0;
//Rlc_info_um.rlc.rlc_um_info.sdu_discard_mode=16;
Rlc_info_am_config.rlc_mode = RLC_MODE_AM;
Rlc_info_am_config.rlc.rlc_am_info.max_retx_threshold = 50;
Rlc_info_am_config.rlc.rlc_am_info.poll_pdu = 8;
......@@ -81,20 +77,18 @@ rrc_init_global_param(
Rlc_info_am_config.rlc.rlc_am_info.t_poll_retransmit = 15;
Rlc_info_am_config.rlc.rlc_am_info.t_reordering = 50;
Rlc_info_am_config.rlc.rlc_am_info.t_status_prohibit = 10;
return 0;
}
//-----------------------------------------------------------------------------
void
rrc_config_buffer(
SRB_INFO* Srb_info,
SRB_INFO *Srb_info,
uint8_t Lchan_type,
uint8_t Role
)
//-----------------------------------------------------------------------------
{
Srb_info->Rx_buffer.payload_size = 0;
Srb_info->Tx_buffer.payload_size = 0;
}
......@@ -279,12 +273,12 @@ static earfcn earfcn_table[] = {
{ 43, 3600000000UL, 43590, 43590, 45589, 3600000000UL, 43590, 43590, 45589 },
};
int freq_to_arfcn10(int band, unsigned long freq)
{
int freq_to_arfcn10(int band, unsigned long freq) {
int N = sizeof(earfcn_table) / sizeof(earfcn_table[0]);
int i;
for (i = 0; i < N; i++) if (bands[i].band == band) break;
if (i == N) return -1;
if (!(bands[i].dl_minfreq < freq && freq < bands[i].dl_maxfreq))
......
......@@ -200,6 +200,8 @@ void *send_UE_status_notification(void *);
/* for ImsiMobileIdentity_t */
#include "MobileIdentity.h"
#include "LTE_DRX-Config.h" // Add DRX SSR 2018-11
/* correct Rel(8|10)/Rel14 differences
* the code is in favor of Rel14, those defines do the translation
*/
......
This diff is collapsed.
......@@ -41,7 +41,7 @@
//------------------------------------------------------------------------------
void
uid_linear_allocator_init(
uid_allocator_t* const uid_pP
uid_allocator_t *const uid_pP
)
//------------------------------------------------------------------------------
{
......@@ -51,14 +51,14 @@ uid_linear_allocator_init(
//------------------------------------------------------------------------------
uid_t
uid_linear_allocator_new(
eNB_RRC_INST* const rrc_instance_pP
eNB_RRC_INST *const rrc_instance_pP
)
//------------------------------------------------------------------------------
{
unsigned int i;
unsigned int bit_index = 1;
uid_t uid = 0;
uid_allocator_t* uia_p = &rrc_instance_pP->uid_allocator;
uid_allocator_t *uia_p = &rrc_instance_pP->uid_allocator;
for (i=0; i < UID_LINEAR_ALLOCATOR_BITMAP_SIZE; i++) {
if (uia_p->bitmap[i] != UINT_MAX) {
......@@ -82,7 +82,7 @@ uid_linear_allocator_new(
//------------------------------------------------------------------------------
void
uid_linear_allocator_free(
eNB_RRC_INST* rrc_instance_pP,
eNB_RRC_INST *rrc_instance_pP,
uid_t uidP
)
//------------------------------------------------------------------------------
......@@ -99,7 +99,7 @@ uid_linear_allocator_free(
//------------------------------------------------------------------------------
int rrc_eNB_compare_ue_rnti_id(
struct rrc_eNB_ue_context_s* c1_pP, struct rrc_eNB_ue_context_s* c2_pP)
struct rrc_eNB_ue_context_s *c1_pP, struct rrc_eNB_ue_context_s *c2_pP)
//------------------------------------------------------------------------------
{
if (c1_pP->ue_id_rnti > c2_pP->ue_id_rnti) {
......@@ -120,14 +120,14 @@ RB_GENERATE(rrc_ue_tree_s, rrc_eNB_ue_context_s, entries,
//------------------------------------------------------------------------------
struct rrc_eNB_ue_context_s*
struct rrc_eNB_ue_context_s *
rrc_eNB_allocate_new_UE_context(
eNB_RRC_INST* rrc_instance_pP
eNB_RRC_INST *rrc_instance_pP
)
//------------------------------------------------------------------------------
{
struct rrc_eNB_ue_context_s* new_p;
new_p = (struct rrc_eNB_ue_context_s* )malloc(sizeof(struct rrc_eNB_ue_context_s));
struct rrc_eNB_ue_context_s *new_p;
new_p = (struct rrc_eNB_ue_context_s * )malloc(sizeof(struct rrc_eNB_ue_context_s));
if (new_p == NULL) {
LOG_E(RRC, "Cannot allocate new ue context\n");
......@@ -136,18 +136,20 @@ rrc_eNB_allocate_new_UE_context(
memset(new_p, 0, sizeof(struct rrc_eNB_ue_context_s));
new_p->local_uid = uid_linear_allocator_new(rrc_instance_pP);
for(int i = 0; i < NB_RB_MAX; i++) {
new_p->ue_context.e_rab[i].xid = -1;
new_p->ue_context.modify_e_rab[i].xid = -1;
}
return new_p;
}
//------------------------------------------------------------------------------
struct rrc_eNB_ue_context_s*
struct rrc_eNB_ue_context_s *
rrc_eNB_get_ue_context(
eNB_RRC_INST* rrc_instance_pP,
eNB_RRC_INST *rrc_instance_pP,
rnti_t rntiP)
//------------------------------------------------------------------------------
{
......@@ -157,6 +159,7 @@ rrc_eNB_get_ue_context(
temp.ue_id_rnti = rntiP;
struct rrc_eNB_ue_context_s *ue_context_p = NULL;
ue_context_p = RB_FIND(rrc_ue_tree_s, &rrc_instance_pP->rrc_ue_head, &temp);
if ( ue_context_p != NULL) {
return ue_context_p;
} else {
......@@ -172,9 +175,9 @@ rrc_eNB_get_ue_context(
//------------------------------------------------------------------------------
void rrc_eNB_remove_ue_context(
const protocol_ctxt_t* const ctxt_pP,
eNB_RRC_INST* rrc_instance_pP,
struct rrc_eNB_ue_context_s* ue_context_pP)
const protocol_ctxt_t *const ctxt_pP,
eNB_RRC_INST *rrc_instance_pP,
struct rrc_eNB_ue_context_s *ue_context_pP)
//------------------------------------------------------------------------------
{
if (rrc_instance_pP == NULL) {
......@@ -190,12 +193,10 @@ void rrc_eNB_remove_ue_context(
}
RB_REMOVE(rrc_ue_tree_s, &rrc_instance_pP->rrc_ue_head, ue_context_pP);
MSC_LOG_EVENT(
MSC_RRC_ENB,
"0 Removed UE %"PRIx16" ",
ue_context_pP->ue_context.rnti);
rrc_eNB_free_mem_UE_context(ctxt_pP, ue_context_pP);
uid_linear_allocator_free(rrc_instance_pP, ue_context_pP->local_uid);
free(ue_context_pP);
......
......@@ -46,8 +46,7 @@ int rrc_enb_ral_delete_all_thresholds_type(unsigned int mod_idP, ral_link_param_
rrc_ral_threshold_key_t *keys = NULL;
unsigned int num_keys = 0;
int return_code = 0;
rc = obj_hashtable_get_keys(eNB_rrc_inst[mod_idP].ral_meas_thresholds, (void*)&keys, &num_keys);
rc = obj_hashtable_get_keys(eNB_rrc_inst[mod_idP].ral_meas_thresholds, (void *)&keys, &num_keys);
if (rc == HASH_TABLE_OK) {
key = keys;
......@@ -82,10 +81,9 @@ int rrc_enb_ral_delete_threshold(unsigned int mod_idP, ral_link_param_type_t *pa
{
hashtable_rc_t rc;
rrc_ral_threshold_key_t ref_key;
memcpy(&ref_key.link_param_type, param_type_pP, sizeof(ral_link_param_type_t));
memcpy(&ref_key.threshold, threshold_pP, sizeof(ral_threshold_t));
rc = obj_hashtable_remove (eNB_rrc_inst[mod_idP].ral_meas_thresholds, (void*)&ref_key, sizeof(rrc_ral_threshold_key_t));
rc = obj_hashtable_remove (eNB_rrc_inst[mod_idP].ral_meas_thresholds, (void *)&ref_key, sizeof(rrc_ral_threshold_key_t));
if (rc == HASH_TABLE_OK) {
return 0;
......@@ -106,12 +104,9 @@ int rrc_enb_ral_handle_configure_threshold_request(unsigned int mod_idP, Message
MessageDef *message_p = NULL;
unsigned int ix_param = 0;
unsigned int ix_thresholds = 0;
DevAssert(msg_pP != NULL);
LOG_I(RRC, "[eNB %d] Received %s\n", mod_idP, ITTI_MSG_NAME (msg_pP));
configure_threshold_req_p = &RRC_RAL_CONFIGURE_THRESHOLD_REQ(msg_pP);
transaction_id = configure_threshold_req_p->transaction_id;
for (ix_param = 0; ix_param < configure_threshold_req_p->num_link_cfg_params; ix_param++) {
......@@ -121,7 +116,6 @@ int rrc_enb_ral_handle_configure_threshold_request(unsigned int mod_idP, Message
case RAL_TH_ACTION_SET_NORMAL_THRESHOLD:
case RAL_TH_ACTION_SET_ONE_SHOT_THRESHOLD:
switch (link_cfg_param_p->link_param_type.choice) {
case RAL_LINK_PARAM_TYPE_CHOICE_GEN:
switch (link_cfg_param_p->link_param_type._union.link_param_gen) {
case RAL_LINK_PARAM_GEN_DATA_RATE:
......
......@@ -44,18 +44,18 @@
*/
#ifndef RRC_RRM_FIFOS_XFACE
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/socket.h>
#include <sys/un.h>
#else
#include<rtai_fifos.h>
#include<rtai_fifos.h>
#endif
......@@ -78,12 +78,11 @@
\return The return value is a socket handle
*/
int open_socket(
sock_rrm_t *s , ///< socket descriptor
sock_rrm_t *s, ///< socket descriptor
char *path_local, ///< local socket path if unix socket
char *path_dest , ///< host Socket path if unix socket
char *path_dest, ///< host Socket path if unix socket
int rrm_inst ///< instance of the rrm entity
)
{
) {
/* Unix socket */
int socket_fd ;
int len ;
......@@ -109,8 +108,6 @@ int open_socket(
s->un_dest_addr.sun_family = AF_UNIX;
sprintf(s->un_dest_addr.sun_path,"%s%d", path_dest, rrm_inst );
msg("Dest %s\n",s->un_dest_addr.sun_path);
s->s = socket_fd ;
return socket_fd ;
}
......@@ -121,8 +118,7 @@ int open_socket(
*/
void close_socket(
sock_rrm_t *sock ///< the socket handle
)
{
) {
shutdown(sock->s, SHUT_RDWR);
close(sock->s);
}
......@@ -134,10 +130,9 @@ void close_socket(
*/
char BUFF[2048];
int send_msg_sock(
sock_rrm_t *s ,///< socket descriptor
sock_rrm_t *s, ///< socket descriptor
msg_t *smsg ///< the message to send
)
{
) {
/* Unix socket */
int ret = 0 ;
// char *buf = NULL;
......@@ -156,13 +151,10 @@ int send_msg_sock(
//buf = RRM_MALLOC(char, taille);
//if (buf ==NULL)
//return -1 ;
memcpy( BUFF , &(smsg->head) , sizeof(msg_head_t) ) ;
memcpy( BUFF, &(smsg->head), sizeof(msg_head_t) ) ;
memcpy( BUFF+sizeof(msg_head_t), smsg->data, smsg->head.size ) ;
iov.iov_base = (void *)BUFF;
iov.iov_len = taille ;
msghd.msg_name = (void *)&(s->un_dest_addr);
msghd.msg_namelen = sizeof(s->un_dest_addr);
msghd.msg_iov = &iov;
......@@ -179,7 +171,6 @@ int send_msg_sock(
//RRM_FREE(buf) ;
//RRM_FREE(msg->data) ;
//RRM_FREE(msg) ;
return ret ;
}
......@@ -191,8 +182,7 @@ int send_msg_sock(
*/
char *recv_msg(
sock_rrm_t *s ///< socket descriptor
)
{
) {
/* Unix socket */
char *buf = NULL;
char *smsg = NULL;
......@@ -201,9 +191,7 @@ char *recv_msg(
int size_msg ;
msg_head_t *head ;
int ret ;
int taille = SIZE_MAX_PAYLOAD ;
buf = RRM_CALLOC( char,taille);
if ( buf == NULL ) {
......@@ -218,8 +206,7 @@ char *recv_msg(
msghd.msg_iovlen = 1;
msghd.msg_control = NULL ;
msghd.msg_controllen= 0 ;
ret = recvmsg(s->s, &msghd , 0 ) ;
ret = recvmsg(s->s, &msghd, 0 ) ;
if ( ret <= 0 ) {
// non-blocking socket
......@@ -236,22 +223,19 @@ char *recv_msg(
head = (msg_head_t *) buf ;
size_msg = sizeof(msg_head_t) + head->size ;
smsg = RRM_CALLOC(char , size_msg ) ;
smsg = RRM_CALLOC(char, size_msg ) ;
if ( smsg != NULL ) {
memcpy( smsg , buf , size_msg ) ;
memcpy( smsg, buf, size_msg ) ;
}
RRM_FREE( buf ) ;
return smsg ;
}
#else //XFACE
int send_msg_fifo(int *s, msg_t *fmsg)
{
int send_msg_fifo(int *s, msg_t *fmsg) {
int ret = 0, ret1;
int taille = sizeof(msg_head_t) ;
msg("write on fifos %d, msg %p\n",*s,fmsg);
......@@ -261,9 +245,7 @@ int send_msg_fifo(int *s, msg_t *fmsg)
}
// envoi le header
ret1 = rtf_put (*s,(char*) &(fmsg->head) , taille);
ret1 = rtf_put (*s,(char *) &(fmsg->head), taille);
if(ret1 <0) {
msg("rtf_put H ERR %d\n",ret1);
......@@ -275,7 +257,7 @@ int send_msg_fifo(int *s, msg_t *fmsg)
// envoi les datas si elles sont definis
if ( fmsg->data != NULL ) {
ret1 += rtf_put (*s,(char*) fmsg->data, fmsg->head.size);
ret1 += rtf_put (*s,(char *) fmsg->data, fmsg->head.size);
if(ret1 <0) {
msg("rtf_put D ERR %d\n",ret1);
......@@ -290,7 +272,6 @@ int send_msg_fifo(int *s, msg_t *fmsg)
#endif //XFACE
int send_msg(void *s, msg_t *smsg)
{
int send_msg(void *s, msg_t *smsg) {
send_msg_sock((sock_rrm_t *)s, smsg);
}
......@@ -51,26 +51,22 @@
//#include "openair_rrc_utils.h"
//#include "openair_rrc_main.h"
#ifdef PHY_EMUL
#include "SIMULATION/simulation_defs.h"
extern EMULATION_VARS *Emul_vars;
extern CH_MAC_INST *CH_mac_inst;
extern UE_MAC_INST *UE_mac_inst;
#include "SIMULATION/simulation_defs.h"
extern EMULATION_VARS *Emul_vars;
extern CH_MAC_INST *CH_mac_inst;
extern UE_MAC_INST *UE_mac_inst;
#endif
/******************************************************************************/
void fn_rrc (void)
{
void fn_rrc (void) {
/******************************************************************************/
msg_head_t *Header ;
char *Data;
L2_ID Mac_id;
while(1) {
Header = (msg_head_t *) recv_msg(&S_rrc) ;
if(Header==NULL) {
......@@ -103,7 +99,7 @@ void fn_rrc (void)
case RRM_RB_ESTABLISH_REQ: {
send_msg((void *)&S_rrc,msg_rrc_rb_establish_resp(Header->inst,Header->Trans_id));
msg( "[RRM]>[RRC][Inst %d]:RRM_RB_ESTABLISH_REQ, size %d\n",Header->inst,sizeof(rrm_rb_establish_req_t));
rrc_config_req(Header->inst,(void*)Data,Header->msg_type,Header->Trans_id);
rrc_config_req(Header->inst,(void *)Data,Header->msg_type,Header->Trans_id);
break ;
}
......@@ -139,9 +135,7 @@ void fn_rrc (void)
if(p->L3_info_t == IPv4_ADDR) {
memcpy(&UE_rrc_inst[Header->inst-NB_CH_INST].Srb2[CH_index].Srb_info.IP_addr,p->L3_info,4);
}
else {
} else {
memcpy(&UE_rrc_inst[Header->inst-NB_CH_INST].Srb2[CH_index].Srb_info.IP_addr,p->L3_info,16);
}
}
......@@ -155,20 +149,17 @@ void fn_rrc (void)
}
break ;
case RRM_SENSING_MEAS_RESP: {
msg( "[RRM]>[RRC][Inst %d]:RRM_SENSING_MEAS_RESP\n",Header->inst);
//rrm_rrc_meas_resp(header->inst,header->Trans_id);
}
break ;
case RRM_SCAN_ORD:
msg( "[RRM]>[RRC][Inst %d]:RRM_SCAN_ORD\n",Header->inst);
//memcpy(&CH_rrc_inst[0].Rrm_init_scan_req,(rrm_init_scan_req_t *) Data,sizeof(rrm_init_scan_req_t));
//CH_rrc_inst[0].Last_scan_req=Rrc_xface->Frame_index;
///send over air
break;
case RRM_INIT_SCAN_REQ:
......@@ -176,28 +167,22 @@ void fn_rrc (void)
memcpy(&CH_rrc_inst[0].Rrm_init_scan_req,(rrm_init_scan_req_t *) Data,sizeof(rrm_init_scan_req_t));
CH_rrc_inst[0].Last_scan_req=Rrc_xface->Frame_index;
///send over air
break;
case RRM_END_SCAN_REQ:
msg( "[RRM]>[RRC][Inst %d]:RRM_END_SCAN_REQ\n",Header->inst);
memcpy(&Mac_id.L2_id[0],Data,sizeof(L2_ID));
unsigned char UE_index=Mac_id.L2_id[0]-NB_CH_MAX+1;
UE_rrc_inst[0].Srb2[UE_index].Srb_info.Tx_buffer.Payload[0]=100;
msg("SRB_ID %d\n",CH_rrc_inst[0].Srb2[UE_index].Srb_info.Srb_id);
Mac_rlc_xface->rrc_rlc_data_req(0,CH_rrc_inst[0].Srb2[UE_index].Srb_info.Srb_id,0,0,1,CH_rrc_inst[0].Srb2[UE_index].Srb_info.Tx_buffer.Payload);
//CH_rrc_inst[0].Last_scan_req=Rrc_xface->Frame_index;
///send over air
break;
default :
msg("[L3_xface]WARNING: msg unknown %d\n",Header->msg_type) ;
}
}
}
......
......@@ -34,8 +34,7 @@ ________________________________________________________________*/
//------------------------------------------------------------------------------------------------------------------//
uint16_t find_free_dtch_position(uint8_t Mod_id, uint16_t UE_CH_index)
{
uint16_t find_free_dtch_position(uint8_t Mod_id, uint16_t UE_CH_index) {
uint16_t i,j;
if(UE_CH_index==0) {
......@@ -45,22 +44,18 @@ uint16_t find_free_dtch_position(uint8_t Mod_id, uint16_t UE_CH_index)
}
for(i=j; i<NB_RAB_MAX; i++) { //first RAB IS BROADCAST DTCH
if(CH_rrc_inst[Mod_id].Rab[i][UE_CH_index].Active==0) {
return( i);
}
}
msg("NO FREE DTCH LCHAN, exit... \n");
Mac_rlc_xface->macphy_exit("NO FREE DTCH LCHAN, exit");
return 0;
}
//-------------------------------------------------------------------------------------------//
uint8_t rrc_find_free_ue_index(uint8_t Mod_id)
{
uint8_t rrc_find_free_ue_index(uint8_t Mod_id) {
//-------------------------------------------------------------------------------------------//
uint16_t i;
......@@ -78,8 +73,7 @@ uint8_t rrc_find_free_ue_index(uint8_t Mod_id)
//-------------------------------------------------------------------------------------------//
unsigned short rrc_find_ue_index(unsigned char Mod_id, L2_ID Mac_id)
{
unsigned short rrc_find_ue_index(unsigned char Mod_id, L2_ID Mac_id) {
//-------------------------------------------------------------------------------------------//
unsigned char i;
/*
......@@ -90,8 +84,7 @@ unsigned short rrc_find_ue_index(unsigned char Mod_id, L2_ID Mac_id)
*/
}
//-------------------------------------------------------------------------------------------//
uint8_t rrc_is_node_isolated(uint8_t Mod_id)
{
uint8_t rrc_is_node_isolated(uint8_t Mod_id) {
//-------------------------------------------------------------------------------------------//
/*uint8_t i;
for(i=0;i<NB_CNX_UE;i++)
......@@ -102,8 +95,7 @@ uint8_t rrc_is_node_isolated(uint8_t Mod_id)
}
//-------------------------------------------------------------------------------------------//
uint8_t find_rrc_info_index(uint8_t Mod_id,uint8_t CH_id)
{
uint8_t find_rrc_info_index(uint8_t Mod_id,uint8_t CH_id) {
//-------------------------------------------------------------------------------------------//
/*uint8_t i;
......@@ -170,8 +162,7 @@ RB_INFO* rrc_find_rb_info(uint8_t Mod_id,uint16_t Rb_id){
*/
/*------------------------------------------------------------------------------*/
unsigned char rrc_is_mobile_already_associated(uint8_t Mod_id, L2_ID Mac_id)
{
unsigned char rrc_is_mobile_already_associated(uint8_t Mod_id, L2_ID Mac_id) {
/*------------------------------------------------------------------------------*/
/*
unsigned char i;
......@@ -184,8 +175,7 @@ unsigned char rrc_is_mobile_already_associated(uint8_t Mod_id, L2_ID Mac_id)
//-------------------------------------------------------------------------------------------//
void rrc_reset_buffer(RRC_BUFFER *Rrc_buffer)
{
void rrc_reset_buffer(RRC_BUFFER *Rrc_buffer) {
//-------------------------------------------------------------------------------------------//
// Rrc_buffer->Header->Rv_tb_idx=0;
// Rrc_buffer->W_idx=0;
......
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