Commit 1dba7fbd authored by wujing's avatar wujing Committed by Haruki NAOI

Fix RRCConnectionReconfiguration encode buffer size and change ul-info period from 10s to 1s

(cherry picked from commit 1ea6d25f9c6ab60c0508df7326a769b322ba2f82)

# Conflicts:
#	openair2/LAYER2/MAC/eNB_scheduler.c
parent 34b4c19c
......@@ -609,7 +609,7 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
NULL,
(void *)bcch_message,
buffer,
100);
RRC_BUF_SIZE);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
LOG_D(RRC,"[eNB] SystemInformationBlockType1_MBMS Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
......@@ -1301,7 +1301,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
NULL,
(void *)bcch_message,
buffer,
100);
RRC_BUF_SIZE);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
LOG_D(RRC,"[eNB] SystemInformationBlockType1 Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
......@@ -2442,7 +2442,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
NULL,
(void *)bcch_message,
buffer,
900);
RRC_BUF_SIZE);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
......@@ -3150,7 +3150,7 @@ do_RRCConnectionSetup(
NULL,
(void *)&dl_ccch_msg,
buffer,
100);
RRC_BUF_SIZE);
if(enc_rval.encoded == -1) {
LOG_I(RRC, "[eNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n",
......@@ -3574,7 +3574,7 @@ uint8_t do_RRCConnectionSetup_BR(
NULL,
(void*)&dl_ccch_msg,
buffer,
100);
RRC_BUF_SIZE);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
......@@ -3648,7 +3648,7 @@ uint8_t do_SecurityModeCommand(
NULL,
(void *)&dl_dcch_msg,
buffer,
100);
RRC_BUF_SIZE);
if(enc_rval.encoded == -1) {
LOG_I(RRC, "[eNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n",
......@@ -3702,7 +3702,7 @@ uint8_t do_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
NULL,
(void *)&dl_dcch_msg,
buffer,
100);
RRC_BUF_SIZE);
if(enc_rval.encoded == -1) {
LOG_I(RRC, "[eNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n",
......@@ -4236,7 +4236,7 @@ do_RRCConnectionReestablishment(
NULL,
(void *)&dl_ccch_msg,
buffer,
100);
RRC_BUF_SIZE);
if(enc_rval.encoded == -1) {
LOG_E(RRC, "[eNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n",
......@@ -4272,7 +4272,7 @@ uint8_t do_RRCConnectionReestablishmentReject(uint8_t Mod_id,
NULL,
(void *)&dl_ccch_msg,
buffer,
100);
RRC_BUF_SIZE);
if(enc_rval.encoded == -1) {
LOG_E(RRC, "[eNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n",
......@@ -4311,7 +4311,7 @@ uint8_t do_RRCConnectionReject(uint8_t Mod_id,
NULL,
(void *)&dl_ccch_msg,
buffer,
100);
RRC_BUF_SIZE);
if(enc_rval.encoded == -1) {
LOG_E(RRC, "[eNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n",
......
......@@ -147,7 +147,7 @@ typedef struct UE_RRC_INFO_NB_IoT_s {
//Measurement Report not supported in NB-IoT
#define PAYLOAD_SIZE_MAX 1024
#define RRC_BUF_SIZE 255
#define RRC_BUF_SIZE 1024
#define UNDEF_SECURITY_MODE 0xff
#define NO_SECURITY_MODE 0x20
......
......@@ -394,7 +394,7 @@ typedef enum SL_TRIGGER_e {
#define MAX_MEAS_ID 6
#define PAYLOAD_SIZE_MAX 1024
#define RRC_BUF_SIZE 255
#define RRC_BUF_SIZE 1024
#define UNDEF_SECURITY_MODE 0xff
#define NO_SECURITY_MODE 0x20
......
......@@ -167,7 +167,7 @@ if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == TRUE
#endif
,0);
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_MBMS = 0;
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_MBMS = (uint8_t *) malloc16(32);
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_MBMS = (uint8_t *) malloc16(RRC_BUF_SIZE);
AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_MBMS!=NULL,PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for SIB1_MBMS allocated\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_MBMS = do_SIB1_MBMS(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],ctxt_pP->module_id,CC_id
......@@ -252,7 +252,7 @@ if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == TRUE
carrier->MIB = (uint8_t*) malloc16(4);
carrier->sizeof_SIB1 = 0;
carrier->sizeof_SIB23 = 0;
carrier->SIB1 = (uint8_t*) malloc16(32);
carrier->SIB1 = (uint8_t*) malloc16(RRC_BUF_SIZE);
AssertFatal(carrier->SIB1!=NULL,PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for SIB1 allocated\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
......@@ -312,7 +312,7 @@ if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == TRUE
}
if (!NODE_IS_DU(rrc->node_type)) {
carrier->SIB23 = (uint8_t*) malloc16(64);
carrier->SIB23 = (uint8_t*) malloc16(RRC_BUF_SIZE);
AssertFatal(carrier->SIB23!=NULL,"cannot allocate memory for SIB");
carrier->sizeof_SIB23 = do_SIB23(ctxt_pP->module_id,
CC_id
......@@ -1317,8 +1317,9 @@ rrc_eNB_generate_SecurityModeCommand(
)
//-----------------------------------------------------------------------------
{
uint8_t buffer[100];
uint8_t buffer[RRC_BUF_SIZE];
uint8_t size;
memset(buffer, 0, RRC_BUF_SIZE);
T(T_ENB_RRC_SECURITY_MODE_COMMAND, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
size = do_SecurityModeCommand(
......@@ -1370,8 +1371,9 @@ rrc_eNB_generate_UECapabilityEnquiry(
)
//-----------------------------------------------------------------------------
{
uint8_t buffer[100];
uint8_t buffer[RRC_BUF_SIZE];
uint8_t size;
memset(buffer, 0, RRC_BUF_SIZE);
T(T_ENB_RRC_UE_CAPABILITY_ENQUIRY, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
size = do_UECapabilityEnquiry(
......@@ -4473,7 +4475,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_SCell(
//-----------------------------------------------------------------------------
{
uint8_t size;
uint8_t buffer[100];
uint8_t buffer[RRC_BUF_SIZE];
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
uint8_t sCellIndexToAdd = 0; //one SCell so far
......@@ -6300,7 +6302,7 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_measurement_reports;
memset(buffer, 0, RRC_BUF_SIZE);
char rrc_buf[1000 /* arbitrary, should be big enough, has to be less than size of return buf by a few bits/bytes */];
char rrc_buf[RRC_BUF_SIZE /* arbitrary, should be big enough, has to be less than size of return buf by a few bits/bytes */];
int rrc_size;
rrc_size = do_RRCConnectionReconfiguration(ctxt_pP,
(unsigned char *)rrc_buf,
......
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