Merge remote-tracking branch 'origin/282-flags-cleanup' into develop_integration_2018_w04
Conflicts: openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c openair1/SCHED/defs.h openair2/LAYER2/PDCP_v10.1.0/pdcp.c openair2/RRC/LITE/rrc_eNB.c
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
include $(OPENAIR_DIR)/common/utils/Makefile.inc
|
||||
OPENAIR2_TOP = ../../..
|
||||
include $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc
|
||||
|
||||
|
||||
EXTRA_CFLAGS += -I$(OPENAIR1_DIR) -I/usr/realtime/include -D__need_Emath -D__NO_ASSERT_H__
|
||||
|
||||
ifdef RTAI
|
||||
# Get the RTAI variables
|
||||
CCC = $(shell rtai-config --cc)
|
||||
RTAI_SUBVERSION=$(shell rtai-config --version | sed -e 's/^..\(.\).*$$/\1/')
|
||||
IS_RTAI_SUBVERSION_LESS_THAN_FIVE=$(shell if [ $(RTAI_SUBVERSION) -lt 5 ] ; then echo true ; fi)
|
||||
|
||||
EXTRA_CFLAGS += -D__IN_RTAI__ $(shell rtai-config --module-cflags) -g -march=pentium4 -DNODE_RG -DBIGPHYSAREA -DRTAI -DRTAI_ENABLED -fno-stack-protector -DHW_PREFIX_REMOVAL -Wall -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -DWIDENS_DLC -I$(KERNEL_DIR)/build/include -I$(KERNEL_DIR)/build/include/asm/mach-default -include $(KERNEL_DIR)/build/include/linux/autoconf.h $(if $(IS_RTAI_SUBVERSION_LESS_THAN_FIVE),-DRTAI_ISNT_POSIX,)
|
||||
endif
|
||||
|
||||
|
||||
obj-m = asn1_msg_kern.o
|
||||
asn1_msg_kern-objs = $(ASN1_CONVERTER_OBJS) $(ASN1_MODULE_OBJS) bsearch.o rtai_mem.o
|
||||
|
||||
clean:
|
||||
rm -rf $(asn1_msg_kern-objs) $(obj-m)
|
||||
|
||||
test:
|
||||
echo $(asn1_msg_kern-objs) $(obj-m)
|
||||
|
||||
regen: regenerate-from-asn1-source
|
||||
|
||||
regenerate-from-asn1-source:
|
||||
asn1c -gen-PER -fcompound-names -fnative-types -fskeletons-copy asn1c/ASN1_files/EUTRA-RRC-Definitions.asn
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
* \email: raymond.knopp@eurecom.fr and navid.nikaein@eurecom.fr
|
||||
*/
|
||||
|
||||
#ifdef USER_MODE
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h> /* for atoi(3) */
|
||||
@@ -36,14 +35,7 @@
|
||||
#include <string.h> /* for strerror(3) */
|
||||
#include <sysexits.h> /* for EX_* exit codes */
|
||||
#include <errno.h> /* for errno */
|
||||
#else
|
||||
#include <linux/module.h> /* Needed by all modules */
|
||||
#endif
|
||||
#ifdef USER_MODE
|
||||
//#include "RRC/LITE/defs.h"
|
||||
//#include "COMMON/mac_rrc_primitives.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#endif
|
||||
#include <asn_application.h>
|
||||
#include <asn_internal.h> /* for _ASN_DEFAULT_STACK_MAX */
|
||||
#include <per_encoder.h>
|
||||
@@ -93,16 +85,8 @@
|
||||
#include "common/ran_context.h"
|
||||
#include "secu_defs.h"
|
||||
|
||||
//#include "PHY/defs.h"
|
||||
#ifndef USER_MODE
|
||||
#define msg printk
|
||||
#ifndef errno
|
||||
int errno;
|
||||
#endif
|
||||
#else
|
||||
# if !defined (msg)
|
||||
# define msg printf
|
||||
# endif
|
||||
#if !defined (msg)
|
||||
#define msg printf
|
||||
#endif
|
||||
|
||||
//#define XER_PRINT
|
||||
@@ -486,9 +470,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef USER_MODE
|
||||
LOG_D(RRC,"[eNB] SystemInformationBlockType1 Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||
#endif
|
||||
|
||||
if (enc_rval.encoded==-1) {
|
||||
return(-1);
|
||||
@@ -1016,9 +998,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef USER_MODE
|
||||
LOG_D(RRC,"[eNB] SystemInformation Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||
#endif
|
||||
|
||||
if (enc_rval.encoded==-1) {
|
||||
msg("[RRC] ASN1 : SI encoding failed for SIB23\n");
|
||||
@@ -1105,9 +1085,7 @@ uint8_t do_RRCConnectionRequest(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef USER_MODE
|
||||
LOG_D(RRC,"[UE] RRCConnectionRequest Encoded %zd bits (%zd bytes), ecause %d\n",enc_rval.encoded,(enc_rval.encoded+7)/8,ecause);
|
||||
#endif
|
||||
|
||||
return((enc_rval.encoded+7)/8);
|
||||
|
||||
@@ -1188,9 +1166,7 @@ uint8_t do_RRCConnectionSetupComplete(uint8_t Mod_id, uint8_t *buffer, const uin
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef USER_MODE
|
||||
LOG_D(RRC,"RRCConnectionSetupComplete Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||
#endif
|
||||
|
||||
return((enc_rval.encoded+7)/8);
|
||||
|
||||
@@ -1250,9 +1226,7 @@ do_RRCConnectionReconfigurationComplete(
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef USER_MODE
|
||||
LOG_D(RRC,"RRCConnectionReconfigurationComplete Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||
#endif
|
||||
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
@@ -1639,10 +1613,8 @@ do_RRCConnectionSetup(
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef USER_MODE
|
||||
LOG_D(RRC,"RRCConnectionSetup Encoded %zd bits (%zd bytes), ecause %d\n",
|
||||
enc_rval.encoded,(enc_rval.encoded+7)/8,ecause);
|
||||
#endif
|
||||
|
||||
// FREEMEM(SRB_list);
|
||||
// free(SRB1_config);
|
||||
@@ -1712,13 +1684,11 @@ do_SecurityModeCommand(
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef USER_MODE
|
||||
LOG_D(RRC,"[eNB %d] securityModeCommand for UE %x Encoded %zd bits (%zd bytes)\n",
|
||||
ctxt_pP->module_id,
|
||||
ctxt_pP->rnti,
|
||||
enc_rval.encoded,
|
||||
(enc_rval.encoded+7)/8);
|
||||
#endif
|
||||
|
||||
if (enc_rval.encoded==-1) {
|
||||
LOG_E(RRC,"[eNB %d] ASN1 : securityModeCommand encoding failed for UE %x\n",
|
||||
@@ -1790,13 +1760,11 @@ do_UECapabilityEnquiry(
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef USER_MODE
|
||||
LOG_D(RRC,"[eNB %d] UECapabilityRequest for UE %x Encoded %zd bits (%zd bytes)\n",
|
||||
ctxt_pP->module_id,
|
||||
ctxt_pP->rnti,
|
||||
enc_rval.encoded,
|
||||
(enc_rval.encoded+7)/8);
|
||||
#endif
|
||||
|
||||
if (enc_rval.encoded==-1) {
|
||||
LOG_E(RRC,"[eNB %d] ASN1 : UECapabilityRequest encoding failed for UE %x\n",
|
||||
@@ -1956,13 +1924,11 @@ do_RRCConnectionReconfiguration(
|
||||
# endif
|
||||
#endif
|
||||
|
||||
//#ifdef USER_MODE
|
||||
LOG_I(RRC,"RRCConnectionReconfiguration Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||
// for (i=0;i<30;i++)
|
||||
// msg("%x.",buffer[i]);
|
||||
// msg("\n");
|
||||
|
||||
//#endif
|
||||
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
@@ -2225,10 +2191,8 @@ do_RRCConnectionReestablishmentReject(
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef USER_MODE
|
||||
LOG_D(RRC,"RRCConnectionReestablishmentReject Encoded %zd bits (%zd bytes)\n",
|
||||
enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||
#endif
|
||||
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
@@ -2286,10 +2250,8 @@ do_RRCConnectionReject(
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef USER_MODE
|
||||
LOG_D(RRC,"RRCConnectionReject Encoded %zd bits (%zd bytes)\n",
|
||||
enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||
#endif
|
||||
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
@@ -2477,9 +2439,7 @@ uint8_t do_MBSFNAreaConfig(uint8_t Mod_id,
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef USER_MODE
|
||||
LOG_D(RRC,"[eNB] MCCH Message Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||
#endif
|
||||
|
||||
if (enc_rval.encoded==-1) {
|
||||
msg("[RRC] ASN1 : MCCH encoding failed for MBSFNAreaConfiguration\n");
|
||||
@@ -2611,9 +2571,7 @@ uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef USER_MODE
|
||||
printf("Measurement Report Encoded %zu bits (%zu bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||
#endif
|
||||
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
* \email: raymond.knopp@eurecom.fr and navid.nikaein@eurecom.fr
|
||||
*/
|
||||
|
||||
#ifdef USER_MODE
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h> /* for atoi(3) */
|
||||
@@ -36,9 +35,6 @@
|
||||
#include <string.h> /* for strerror(3) */
|
||||
#include <sysexits.h> /* for EX_* exit codes */
|
||||
#include <errno.h> /* for errno */
|
||||
#else
|
||||
#include <linux/module.h> /* Needed by all modules */
|
||||
#endif
|
||||
|
||||
#include <asn_application.h>
|
||||
#include <asn_internal.h> /* for _ASN_DEFAULT_STACK_MAX */
|
||||
|
||||
@@ -1,146 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file rtai_mem.c
|
||||
* \brief a wrapper for Unified RTAI real-time memory management.
|
||||
* \author Florian Kaltenberger
|
||||
* \date 2011-04-06
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: florian.kaltenberger@eurecom.fr
|
||||
* \note
|
||||
* \bug
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/bitops.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/segment.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/delay.h>
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/mman.h>
|
||||
|
||||
#include <linux/slab.h>
|
||||
//#include <linux/config.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/fs.h>
|
||||
|
||||
#include <linux/errno.h>
|
||||
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include <asm/rtai.h>
|
||||
#include <rtai.h>
|
||||
#include <rtai_shm.h>
|
||||
#include <rtai_malloc.h>
|
||||
|
||||
/*
|
||||
void* rt_alloc_wrapper(int size) {
|
||||
|
||||
unsigned long* tmp_ptr;
|
||||
static unsigned long name = 0;
|
||||
|
||||
rt_shm_free(name);
|
||||
tmp_ptr = (unsigned long*) rt_shm_alloc(name,size+sizeof(unsigned long),GFP_KERNEL);
|
||||
|
||||
if (!tmp_ptr) {
|
||||
printk("rt_mem.c: failed to allocate %d bytes for name %ld at %p\n",size,name,tmp_ptr);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
printk("rt_mem.c: allocated %d bytes for name %ld at %p\n",size,name,tmp_ptr+1);
|
||||
|
||||
tmp_ptr[0] = name;
|
||||
name++;
|
||||
|
||||
return (void*) (tmp_ptr+1);
|
||||
|
||||
}
|
||||
|
||||
int rt_free_wrapper(void* ptr) {
|
||||
|
||||
unsigned long name;
|
||||
|
||||
printk("rt_mem.c: freeing memory at %p, ",ptr);
|
||||
|
||||
name = *(((unsigned long*) ptr)-1);
|
||||
|
||||
printk("name %ld\n",name);
|
||||
|
||||
return rt_shm_free(name);
|
||||
|
||||
}
|
||||
|
||||
void* rt_realloc_wrapper(void* oldptr, int size) {
|
||||
|
||||
void* newptr;
|
||||
|
||||
printk("rt_mem.c: reallocating %p with %d bytes\n",oldptr,size);
|
||||
|
||||
if (oldptr==NULL)
|
||||
newptr = rt_alloc_wrapper(size);
|
||||
else {
|
||||
newptr = rt_alloc_wrapper(size);
|
||||
memcpy(newptr,oldptr,size);
|
||||
rt_free_wrapper(oldptr);
|
||||
}
|
||||
|
||||
return newptr;
|
||||
}
|
||||
*/
|
||||
|
||||
void* rt_realloc(void* oldptr, int size)
|
||||
{
|
||||
|
||||
void* newptr;
|
||||
|
||||
printk("rt_mem.c: reallocating %p with %d bytes\n",oldptr,size);
|
||||
|
||||
if (oldptr==NULL) {
|
||||
newptr = rt_malloc(size);
|
||||
} else {
|
||||
newptr = rt_malloc(size);
|
||||
memcpy(newptr,oldptr,size);
|
||||
rt_free(oldptr);
|
||||
}
|
||||
|
||||
return newptr;
|
||||
}
|
||||
|
||||
void* rt_calloc(int nmemb, int size)
|
||||
{
|
||||
|
||||
void* newptr;
|
||||
|
||||
printk("rt_mem.c: allocating %d elements with %d bytes\n",nmemb,size);
|
||||
|
||||
newptr = rt_malloc(nmemb*size);
|
||||
memset(newptr,0,nmemb*size);
|
||||
|
||||
return newptr;
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file rtai_mem.h
|
||||
* \brief a wrapper for Unified RTAI real-time memory management.
|
||||
* \author Florian Kaltenberger
|
||||
* \date 2011-04-06
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: florian.kaltenberger@eurecom.fr
|
||||
* \note
|
||||
* \bug
|
||||
* \warning
|
||||
*/
|
||||
|
||||
/*
|
||||
void* rt_alloc_wrapper(int size);
|
||||
|
||||
int rt_free_wrapper(void* ptr);
|
||||
|
||||
void* rt_realloc_wrapper(void* oldptr, int size);
|
||||
*/
|
||||
|
||||
void* rt_realloc(void* oldptr, int size);
|
||||
|
||||
void* rt_calloc(int nmemb, int size);
|
||||
@@ -31,11 +31,9 @@
|
||||
#ifndef __OPENAIR_RRC_DEFS_H__
|
||||
#define __OPENAIR_RRC_DEFS_H__
|
||||
|
||||
#ifdef USER_MODE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "collection/tree.h"
|
||||
#include "rrc_types.h"
|
||||
@@ -47,11 +45,6 @@
|
||||
|
||||
#include "LAYER2/MAC/defs.h"
|
||||
|
||||
//#include "COMMON/openair_defs.h"
|
||||
#ifndef USER_MODE
|
||||
#include <rtai.h>
|
||||
#endif
|
||||
|
||||
#include "SystemInformationBlockType1.h"
|
||||
#include "SystemInformation.h"
|
||||
#include "RRCConnectionReconfiguration.h"
|
||||
|
||||
@@ -1,146 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*________________________openair_rrc_top.c________________________
|
||||
|
||||
Authors : Hicham Anouar
|
||||
Company : EURECOM
|
||||
Emails : anouar@eurecom.fr
|
||||
________________________________________________________________*/
|
||||
|
||||
|
||||
#ifndef USER_MODE
|
||||
#define __NO_VERSION__
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/bitops.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/segment.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/delay.h>
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/mman.h>
|
||||
|
||||
#include <linux/slab.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/fs.h>
|
||||
|
||||
#include <linux/errno.h>
|
||||
#ifdef KERNEL2_6
|
||||
#include <linux/slab.h>
|
||||
#endif
|
||||
|
||||
#ifdef KERNEL2_4
|
||||
#include <linux/malloc.h>
|
||||
#include <linux/wrapper.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#include "defs.h"
|
||||
#include "vars.h"
|
||||
|
||||
extern MAC_RLC_XFACE* mac_rrc_register(RRC_XFACE*);
|
||||
extern int mac_rrc_unregister(RRC_XFACE *);
|
||||
|
||||
extern void *bigphys_malloc(int);
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef USER_MODE
|
||||
|
||||
/*------------------------------------------------*/
|
||||
/* Prototypes */
|
||||
/*------------------------------------------------*/
|
||||
#ifdef KERNEL2_4
|
||||
static int init_module( void );
|
||||
static void cleanup_module(void);
|
||||
#else
|
||||
static int openair_rrc_init_module( void );
|
||||
static void openair_rrc_cleanup_module(void);
|
||||
#endif
|
||||
|
||||
#ifdef KERNEL2_6
|
||||
static int __init openair_rrc_init_module( void )
|
||||
#else
|
||||
int init_module( void )
|
||||
#endif //KERNEL2_6
|
||||
{
|
||||
printk("[OPENAIR][RRC][INIT] inserting module\n");
|
||||
|
||||
|
||||
Rrc_xface = (RRC_XFACE*)malloc16(sizeof(RRC_XFACE));
|
||||
|
||||
if(Rrc_xface == NULL) {
|
||||
printk("[RRC] FATAL EROOR: Could not allocate memory for Rrc_xface !!!\n");
|
||||
return (-1);
|
||||
}
|
||||
|
||||
Mac_rlc_xface=mac_rrc_register(Rrc_xface);
|
||||
|
||||
if( Mac_rlc_xface == NULL ) {
|
||||
printk("[OPENAIR][RRC][INIT] Could not get RRC descriptor\n");
|
||||
return -1;
|
||||
} else {
|
||||
printk("[OPENAIR][RRC][INIT] Got RRC descriptor , Rcc_xface %p,Mac_rlc_xface=%p \n",Rrc_xface,Mac_rlc_xface);
|
||||
}
|
||||
|
||||
if(rrc_init_global_param()==-1) {
|
||||
printk("[OPENAIR][RRC][INIT] FATAL ERROR: INIT_GLOBAL_PARAM_NOK\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef KERNEL2_6
|
||||
static void __exit openair_rrc_cleanup_module(void)
|
||||
#else
|
||||
void cleanup_module(void)
|
||||
#endif //KERNEL2_6
|
||||
{
|
||||
#ifndef NO_RRM
|
||||
rtf_destroy(RRC2RRM_FIFO);
|
||||
rtf_destroy(RRM2RRC_FIFO);
|
||||
#endif //NO_RRM
|
||||
printk("[OPENAIR][RRC][CLEANUP] cleanup module\n");
|
||||
mac_rrc_unregister(Rrc_xface);
|
||||
|
||||
}
|
||||
|
||||
MODULE_AUTHOR
|
||||
("Lionel GAUTHIER <lionel.gauthier@eurecom.fr>, Raymond KNOPP <raymond.knopp@eurecom.fr>, Aawatif MENOUNI <aawatif.menouni@eurecom.fr>,Dominique NUSSBAUM <dominique.nussbaum@eurecom.fr>, Michelle WETTERWALD <michelle.wetterwald@eurecom.fr>, Maxime GUILLAUD <maxime.guillaud@eurecom.fr, Hicham ANOUAR <hicham.anouar@eurecom.fr>");
|
||||
MODULE_DESCRIPTION ("openair RRC layer module");
|
||||
MODULE_LICENSE ("GPL");
|
||||
module_init (openair_rrc_init_module);
|
||||
module_exit (openair_rrc_cleanup_module);
|
||||
|
||||
#endif //USER_MODE
|
||||
|
||||
|
||||
@@ -62,14 +62,8 @@
|
||||
#include "TDD-Config.h"
|
||||
#include "UECapabilityEnquiry.h"
|
||||
#include "UE-CapabilityRequest.h"
|
||||
#ifdef PHY_ABSTRACTION
|
||||
#include "OCG.h"
|
||||
#include "OCG_extern.h"
|
||||
#endif
|
||||
#ifdef USER_MODE
|
||||
#include "RRC/NAS/nas_config.h"
|
||||
#include "RRC/NAS/rb_config.h"
|
||||
#endif
|
||||
#if ENABLE_RAL
|
||||
#include "rrc_UE_ral.h"
|
||||
#endif
|
||||
@@ -730,13 +724,8 @@ rrc_ue_establish_drb(
|
||||
*/
|
||||
#ifdef PDCP_USE_NETLINK
|
||||
# if !defined(OAI_NW_DRIVER_TYPE_ETHERNET) && !defined(EXMIMO) && !defined(OAI_USRP) && !defined(OAI_BLADERF) && !defined(ETHERNET) && !defined(LINK_ENB_PDCP_TO_GTPV1U)
|
||||
# ifdef OAI_EMU
|
||||
ip_addr_offset3 = oai_emulation.info.nb_enb_local;
|
||||
ip_addr_offset4 = NB_eNB_INST;
|
||||
# else
|
||||
ip_addr_offset3 = 0;
|
||||
ip_addr_offset4 = 8;
|
||||
# endif
|
||||
LOG_I(OIP,"[UE %d] trying to bring up the OAI interface oai%d, IP 10.0.%d.%d\n", ue_mod_idP, ip_addr_offset3+ue_mod_idP,
|
||||
ip_addr_offset3+ue_mod_idP+1,ip_addr_offset4+ue_mod_idP+1);
|
||||
oip_ifup=nas_config(ip_addr_offset3+ue_mod_idP, // interface_id
|
||||
@@ -744,9 +733,6 @@ rrc_ue_establish_drb(
|
||||
ip_addr_offset4+ue_mod_idP+1); // fourth_octet
|
||||
|
||||
if (oip_ifup == 0 ) { // interface is up --> send a config the DRB
|
||||
# ifdef OAI_EMU
|
||||
oai_emulation.info.oai_ifup[ue_mod_idP]=1;
|
||||
# endif
|
||||
LOG_I(OIP,"[UE %d] Config the oai%d to send/receive pkt on DRB %ld to/from the protocol stack\n",
|
||||
ue_mod_idP,
|
||||
ip_addr_offset3+ue_mod_idP,
|
||||
@@ -762,10 +748,6 @@ rrc_ue_establish_drb(
|
||||
LOG_D(RRC,"[UE %d] State = Attached (eNB %d)\n",ue_mod_idP,eNB_index);
|
||||
}
|
||||
|
||||
# else
|
||||
# ifdef OAI_EMU
|
||||
oai_emulation.info.oai_ifup[ue_mod_idP]=1;
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -1540,17 +1522,6 @@ rrc_ue_process_radioResourceConfigDedicated(
|
||||
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].State = RRC_CONNECTED;
|
||||
LOG_I(RRC,"[UE %d] State = RRC_CONNECTED (eNB %d)\n",ctxt_pP->module_id,eNB_index);
|
||||
#if !defined(ENABLE_USE_MME) && defined(OAI_EMU)
|
||||
# ifdef OAI_EMU
|
||||
rrc_eNB_emulation_notify_ue_module_id(
|
||||
ctxt_pP->module_id,
|
||||
ctxt_pP->rnti,
|
||||
UE_rrc_inst[ctxt_pP->module_id].sib1[eNB_index]->cellAccessRelatedInfo.cellIdentity.buf[0],
|
||||
UE_rrc_inst[ctxt_pP->module_id].sib1[eNB_index]->cellAccessRelatedInfo.cellIdentity.buf[1],
|
||||
UE_rrc_inst[ctxt_pP->module_id].sib1[eNB_index]->cellAccessRelatedInfo.cellIdentity.buf[2],
|
||||
UE_rrc_inst[ctxt_pP->module_id].sib1[eNB_index]->cellAccessRelatedInfo.cellIdentity.buf[3]);
|
||||
# endif /* OAI_EMU */
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -1730,9 +1701,7 @@ rrc_ue_process_securityModeCommand(
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef USER_MODE
|
||||
LOG_D(RRC, "securityModeComplete Encoded %zd bits (%zd bytes)\n", enc_rval.encoded, (enc_rval.encoded+7)/8);
|
||||
#endif
|
||||
|
||||
for (i = 0; i < (enc_rval.encoded + 7) / 8; i++) {
|
||||
LOG_T(RRC, "%02x.", buffer[i]);
|
||||
@@ -1835,9 +1804,7 @@ rrc_ue_process_ueCapabilityEnquiry(
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef USER_MODE
|
||||
LOG_D(RRC,"UECapabilityInformation Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||
#endif
|
||||
|
||||
for (i = 0; i < (enc_rval.encoded + 7) / 8; i++) {
|
||||
LOG_T(RRC, "%02x.", buffer[i]);
|
||||
@@ -4246,10 +4213,6 @@ static void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_i
|
||||
|
||||
#endif // rel10
|
||||
|
||||
#ifndef USER_MODE
|
||||
EXPORT_SYMBOL(Rlc_info_am_config);
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
//-----------------------------------------------------------------------------
|
||||
void *rrc_ue_task( void *args_p )
|
||||
|
||||
@@ -97,9 +97,7 @@ rrc_init_global_param(
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
|
||||
//#ifdef USER_MODE
|
||||
// Rrc_xface = (RRC_XFACE*)malloc16(sizeof(RRC_XFACE));
|
||||
//#endif //USRE_MODE
|
||||
|
||||
// Rrc_xface->openair_rrc_top_init = openair_rrc_top_init;
|
||||
// Rrc_xface->openair_rrc_eNB_init = openair_rrc_eNB_init;
|
||||
|
||||
@@ -63,12 +63,10 @@
|
||||
#include "MeasResults.h"
|
||||
//#endif
|
||||
|
||||
#ifdef USER_MODE
|
||||
# include "RRC/NAS/nas_config.h"
|
||||
# include "RRC/NAS/rb_config.h"
|
||||
# include "OCG.h"
|
||||
# include "OCG_extern.h"
|
||||
#endif
|
||||
#include "RRC/NAS/nas_config.h"
|
||||
#include "RRC/NAS/rb_config.h"
|
||||
#include "OCG.h"
|
||||
#include "OCG_extern.h"
|
||||
|
||||
#if defined(ENABLE_SECURITY)
|
||||
# include "UTIL/OSA/osa_defs.h"
|
||||
@@ -835,14 +833,6 @@ rrc_eNB_free_UE(const module_id_t enb_mod_idP,const struct rrc_eNB_ue_context_s*
|
||||
*/
|
||||
return;
|
||||
}
|
||||
#else
|
||||
#if defined(OAI_EMU)
|
||||
AssertFatal(ue_context_pP->local_uid < NUMBER_OF_UE_MAX, "local_uid invalid (%d<%d) for UE %x!", ue_context_pP->local_uid, NUMBER_OF_UE_MAX, rnti);
|
||||
ue_module_id = oai_emulation.info.eNB_ue_local_uid_to_ue_module_id[enb_mod_idP][ue_context_pP->local_uid];
|
||||
AssertFatal(ue_module_id < NUMBER_OF_UE_MAX, "ue_module_id invalid (%d<%d) for UE %x!", ue_module_id, NUMBER_OF_UE_MAX, rnti);
|
||||
oai_emulation.info.eNB_ue_local_uid_to_ue_module_id[enb_mod_idP][ue_context_pP->local_uid] = -1;
|
||||
oai_emulation.info.eNB_ue_module_id_to_rnti[enb_mod_idP][ue_module_id] = NOT_A_RNTI;
|
||||
#endif
|
||||
#endif
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
eNB_PHY = RC.eNB[enb_mod_idP][CC_id];
|
||||
@@ -4876,12 +4866,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
||||
ctxt_pP->module_id + 1); // fourth octet
|
||||
|
||||
if (oip_ifup == 0) { // interface is up --> send a config the DRB
|
||||
# ifdef OAI_EMU
|
||||
oai_emulation.info.oai_ifup[ctxt_pP->module_id] = 1;
|
||||
dest_ip_offset = NB_eNB_INST;
|
||||
# else
|
||||
dest_ip_offset = 8;
|
||||
# endif
|
||||
LOG_I(OIP,
|
||||
"[eNB %d] Config the oai%d to send/receive pkt on DRB %ld to/from the protocol stack\n",
|
||||
ctxt_pP->module_id, ctxt_pP->module_id,
|
||||
@@ -4898,10 +4883,6 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
||||
ctxt_pP->module_id, ue_context_pP->ue_context.rnti, ue_module_id);
|
||||
}
|
||||
|
||||
# else
|
||||
# ifdef OAI_EMU
|
||||
oai_emulation.info.oai_ifup[ctxt_pP->module_id] = 1;
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -292,10 +292,5 @@ int send_msg_fifo(int *s, msg_t *fmsg)
|
||||
|
||||
int send_msg(void *s, msg_t *smsg)
|
||||
{
|
||||
#ifdef USER_MODE
|
||||
send_msg_sock((sock_rrm_t *)s, smsg);
|
||||
#else
|
||||
send_msg_fifo((int *)s,smsg);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -101,8 +101,6 @@ extern "C" {
|
||||
#define START_MSG_PUSU 0xCC
|
||||
|
||||
|
||||
#ifdef USER_MODE
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
|
||||
@@ -128,16 +126,6 @@ char *recv_msg( sock_rrm_t *s ) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
#else //USER_MODE
|
||||
#include <rtai_fifos.h>
|
||||
|
||||
#define RRC2RRM_FIFO 14
|
||||
#define RRM2RRC_FIFO 15
|
||||
int send_msg_fifo(int *s ,msg_t *msg ) ;
|
||||
#endif //USER_MODE
|
||||
|
||||
int send_msg(void *, msg_t *);
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -65,17 +65,12 @@ void fn_rrc (void)
|
||||
/******************************************************************************/
|
||||
|
||||
msg_head_t *Header ;
|
||||
#ifdef USER_MODE
|
||||
char *Data;
|
||||
#else
|
||||
int bytes_read;
|
||||
#endif
|
||||
|
||||
L2_ID Mac_id;
|
||||
|
||||
while(1) {
|
||||
|
||||
#ifdef USER_MODE
|
||||
Header = (msg_head_t *) recv_msg(&S_rrc) ;
|
||||
|
||||
if(Header==NULL) {
|
||||
@@ -83,52 +78,9 @@ void fn_rrc (void)
|
||||
}
|
||||
|
||||
Data_to_read=Header->size;
|
||||
#else
|
||||
|
||||
if(Header_read_idx < Header_size) {
|
||||
bytes_read = rtf_get (RRM2RRC_FIFO,&Header_buf[Header_read_idx],Header_size-Header_read_idx);
|
||||
|
||||
if(bytes_read >0) {
|
||||
msg("RRC: GET FIFOS RETURNS %d bytes, header %d\n",bytes_read,Header_read_idx);
|
||||
}
|
||||
|
||||
Header_read_idx+=bytes_read;
|
||||
|
||||
if(Header_read_idx == Header_size) {
|
||||
Header = (msg_head_t *) Header_buf;
|
||||
Data_to_read=Header->size;
|
||||
msg("RRC: Header read completed, data size %d\n",Data_to_read);
|
||||
}
|
||||
//msg("[fn_rrc]TTI %d: rcv_msg return Null\n",Rrc_xface->Frame_index);
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (Data_to_read > 0 ) {
|
||||
#ifdef USER_MODE
|
||||
Data = (char *) (Header +1) ;
|
||||
#else
|
||||
bytes_read = rtf_get (RRM2RRC_FIFO,&Data[Data_read_idx],Data_to_read);
|
||||
|
||||
if(bytes_read >0) {
|
||||
msg("RRC: GET FIFOS RETURNS %d bytes, Data_to_read %d\n",bytes_read,Data_to_read);
|
||||
}
|
||||
|
||||
Data_to_read-=bytes_read;
|
||||
Data_read_idx+=bytes_read;
|
||||
|
||||
if(Data_to_read > 0 ) {
|
||||
break;
|
||||
}
|
||||
|
||||
msg("RRC: DATA read completed, data size %d\n",Data_to_read);
|
||||
Header_read_idx=0;
|
||||
Data_read_idx=0;
|
||||
Data_to_read=0;
|
||||
#endif
|
||||
}
|
||||
|
||||
msg("Got MSG of Type %d on Inst %d\n",Header->msg_type,Header->inst);
|
||||
|
||||
@@ -29,25 +29,8 @@ ________________________________________________________________*/
|
||||
|
||||
|
||||
|
||||
//#include "openair_types.h"
|
||||
#include "defs.h"
|
||||
#include "extern.h"
|
||||
//#include "openair_proto.h"
|
||||
|
||||
|
||||
#ifndef USER_MODE
|
||||
char bcmp(void *x, void *y,int Size )
|
||||
{
|
||||
unsigned char i;
|
||||
|
||||
for(i=0; i<Size; i++)
|
||||
if(*(char*)(x+i)!= *(char*)(y+i)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------//
|
||||
@@ -63,7 +46,6 @@ 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
|
||||
|
||||
//msg("i=%d\n",i);
|
||||
if(CH_rrc_inst[Mod_id].Rab[i][UE_CH_index].Active==0) {
|
||||
return( i);
|
||||
}
|
||||
@@ -130,11 +112,7 @@ uint8_t find_rrc_info_index(uint8_t Mod_id,uint8_t CH_id)
|
||||
if(Rrc_inst[Mod_id].Rrc_info[i].Info.UE_info.CH_id == CH_id) return i;
|
||||
}
|
||||
error_msg("[OPENAIR][RRC] RRC_INFO_INDEX: FATAL ERROR: Not yet Pre_Synchronized with CH ???%d\n",CH_id);
|
||||
#ifndef USER_MODE
|
||||
// mac_xface->macphy_exit();
|
||||
#else
|
||||
exit(-1);
|
||||
#endif
|
||||
*/
|
||||
}
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user