Merge remote-tracking branch 'origin/develop' into enhancement-ltem
Conflicts: openair1/PHY/INIT/lte_init.c openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c openair1/PHY/LTE_TRANSPORT/dci.c openair1/PHY/LTE_TRANSPORT/dci_tools.c openair1/PHY/LTE_TRANSPORT/dlsch_coding.c openair1/PHY/LTE_TRANSPORT/edci.c openair1/PHY/LTE_TRANSPORT/if4_tools.c openair1/PHY/LTE_TRANSPORT/prach.c openair1/PHY/LTE_TRANSPORT/print_stats.c openair1/PHY/LTE_TRANSPORT/pucch.c openair1/PHY/LTE_TRANSPORT/transport_eNB.h openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h openair1/PHY/impl_defs_lte.h openair1/SCHED/fapi_l1.c openair1/SCHED/phy_procedures_lte_eNb.c openair2/COMMON/rrc_messages_types.h openair2/ENB_APP/enb_config.c openair2/ENB_APP/enb_paramdef.h openair2/LAYER2/MAC/config.c openair2/LAYER2/MAC/defs.h openair2/LAYER2/MAC/eNB_scheduler.c openair2/LAYER2/MAC/eNB_scheduler_RA.c openair2/LAYER2/MAC/eNB_scheduler_bch.c openair2/LAYER2/MAC/eNB_scheduler_dlsch.c openair2/LAYER2/MAC/eNB_scheduler_primitives.c openair2/LAYER2/MAC/eNB_scheduler_ulsch.c openair2/LAYER2/MAC/pre_processor.c openair2/LAYER2/MAC/rar_tools.c openair2/LAYER2/MAC/ue_procedures.c openair2/PHY_INTERFACE/IF_Module.c openair2/RRC/LITE/rrc_common.c openair2/RRC/LTE/L2_interface_ue.c openair2/RRC/LTE/MESSAGES/asn1_msg.c openair2/RRC/LTE/rrc_eNB.c targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp targets/RT/USER/lte-enb.c targets/RT/USER/lte-ru.c
This commit is contained in:
@@ -1,49 +0,0 @@
|
||||
# UE IP Driver makefile
|
||||
#
|
||||
NAS_UPDIR := $(shell /bin/pwd)
|
||||
|
||||
KERNEL_ARCH=$(shell echo `uname -m`)
|
||||
SET_X64=$(shell if [ $(KERNEL_ARCH) = 'x86_64' ]; then echo true ; fi)
|
||||
|
||||
####################################################
|
||||
# EXTRA COMPILER FLAGS
|
||||
####################################################
|
||||
EXTRA_CFLAGS = -I$(OPENAIR2_DIR)/COMMON -fno-common -fno-stack-protector -mpreferred-stack-boundary=4 $(if $(SET_X64),-DARCH_64,) $(if $(SET_X64),-mcmodel=kernel,) $(if $(SET_X64),-m64,)
|
||||
|
||||
|
||||
|
||||
ifdef OAI_NW_DRIVER_USE_NETLINK
|
||||
EXTRA_CFLAGS += -DOAI_NW_DRIVER_USE_NETLINK
|
||||
else
|
||||
EXTRA_CFLAGS += $(shell rtai-config --module-cflags) -DRTAI -D__IN_RTAI__ -Wall
|
||||
endif
|
||||
|
||||
|
||||
####################################################
|
||||
# LOADABLE MODULE GOALS
|
||||
####################################################
|
||||
obj-m += ue_ip.o
|
||||
ue_ip-objs += device.o
|
||||
ue_ip-objs += common.o
|
||||
ifdef OAI_NW_DRIVER_USE_NETLINK
|
||||
ue_ip-objs += netlink.o
|
||||
endif
|
||||
|
||||
####################################################
|
||||
# REVOIR LE CLEAN
|
||||
####################################################
|
||||
|
||||
|
||||
print:
|
||||
@echo SET_X64 : $(SET_X64)
|
||||
|
||||
clean:
|
||||
rm -f *.ko
|
||||
rm -f .*.ko.cmd
|
||||
rm -f .*.o.cmd
|
||||
rm -f *.o
|
||||
rm -f *.mod.c
|
||||
find . -name *.ko -delete
|
||||
find . -name .*.o -delete
|
||||
find . -name *.o -delete
|
||||
find . -name *.mod.c -delete
|
||||
@@ -222,7 +222,7 @@ skb_p->mark = rb_idP;
|
||||
|
||||
printk("\n");
|
||||
#endif //OAI_DRV_DEBUG_RECEIVE
|
||||
netif_rx(skb_p);
|
||||
netif_rx_ni(skb_p);
|
||||
#ifdef OAI_DRV_DEBUG_RECEIVE
|
||||
printk("[UE_IP_DRV][%s] end\n",__FUNCTION__);
|
||||
#endif
|
||||
@@ -248,6 +248,13 @@ ue_ip_common_ip2wireless(
|
||||
//---------------------------------------------------------------------------
|
||||
struct pdcp_data_req_header_s pdcph;
|
||||
ue_ip_priv_t *priv_p=netdev_priv(ue_ip_dev[instP]);
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
ipversion_t *ipv_p = NULL;
|
||||
unsigned int hard_header_len = 0;
|
||||
unsigned char *src_addr = 0;
|
||||
unsigned char *dst_addr = 0;
|
||||
#endif
|
||||
|
||||
#ifdef LOOPBACK_TEST
|
||||
int i;
|
||||
#endif
|
||||
@@ -278,6 +285,37 @@ ue_ip_common_ip2wireless(
|
||||
|
||||
pdcph.inst = instP;
|
||||
|
||||
//pass source/destination IP addresses to PDCP header
|
||||
hard_header_len = ue_ip_dev[instP]->hard_header_len;
|
||||
ipv_p = (ipversion_t *)((void *)&(skb_pP->data[hard_header_len]));
|
||||
|
||||
switch (ipv_p->version) {
|
||||
case 6:
|
||||
printk("[UE_IP_DRV][%s] receive IPv6 message\n",__FUNCTION__);
|
||||
//TODO
|
||||
break;
|
||||
|
||||
case 4:
|
||||
src_addr = (unsigned char *)&((struct iphdr *)&skb_pP->data[hard_header_len])->saddr;
|
||||
if (src_addr) {
|
||||
printk("[UE_IP_DRV][%s] Source %d.%d.%d.%d\n",__FUNCTION__, src_addr[0],src_addr[1],src_addr[2],src_addr[3]);
|
||||
}
|
||||
dst_addr = (unsigned char *)&((struct iphdr *)&skb_pP->data[hard_header_len])->daddr;
|
||||
if (dst_addr) {
|
||||
printk("[UE_IP_DRV][%s] Dest %d.%d.%d.%d\n",__FUNCTION__, dst_addr[0],dst_addr[1],dst_addr[2],dst_addr[3]);
|
||||
}
|
||||
|
||||
//get Ipv4 address and pass to PCDP header
|
||||
printk("[UE_IP_DRV] source Id: 0x%08x\n",pdcph.sourceL2Id );
|
||||
printk("[UE_IP_DRV] destinationL2Id Id: 0x%08x\n",pdcph.destinationL2Id );
|
||||
pdcph.sourceL2Id = ntohl( ((struct iphdr *)&skb_pP->data[hard_header_len])->saddr) & 0x00FFFFFF;
|
||||
pdcph.destinationL2Id = ntohl( ((struct iphdr *)&skb_pP->data[hard_header_len])->daddr) & 0x00FFFFFF;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
bytes_wrote = ue_ip_netlink_send((char *)&pdcph,UE_IP_PDCPH_SIZE);
|
||||
#ifdef OAI_DRV_DEBUG_SEND
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
|
||||
|
||||
#define UE_IP_NB_INSTANCES_MAX NUMBER_OF_UE_MAX
|
||||
#define UE_IP_NB_INSTANCES_MAX NUMBER_OF_UE_MAX /*MAX_MOBILES_PER_ENB*/
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,13 +28,6 @@
|
||||
*/
|
||||
/*******************************************************************************/
|
||||
|
||||
#ifndef OAI_NW_DRIVER_USE_NETLINK
|
||||
#ifdef RTAI
|
||||
#include "rtai_posix.h"
|
||||
#define RTAI_IRQ 30 //try to get this irq with RTAI
|
||||
#endif // RTAI
|
||||
#endif // OAI_NW_DRIVER_USE_NETLINK
|
||||
|
||||
#include "constant.h"
|
||||
#include "local.h"
|
||||
#include "proto_extern.h"
|
||||
@@ -106,15 +99,29 @@ void *ue_ip_interrupt(void)
|
||||
}
|
||||
#endif //NETLINK
|
||||
//---------------------------------------------------------------------------
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
|
||||
void ue_ip_timer(struct timer_list *t)
|
||||
#else
|
||||
void ue_ip_timer(unsigned long dataP)
|
||||
#endif
|
||||
{
|
||||
//---------------------------------------------------------------------------
|
||||
ue_ip_priv_t *priv_p=(ue_ip_priv_t *)dataP;
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
|
||||
ue_ip_priv_t *priv_p = from_timer(priv_p, t, timer);
|
||||
#else
|
||||
ue_ip_priv_t *priv_p = (ue_ip_priv_t *)dataP;
|
||||
#endif
|
||||
|
||||
spin_lock(&priv_p->lock);
|
||||
(priv_p->timer).function=ue_ip_timer;
|
||||
(priv_p->timer).expires=jiffies+UE_IP_TIMER_TICK;
|
||||
(priv_p->timer).data=dataP;
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
|
||||
mod_timer(&priv_p->timer, jiffies + UE_IP_TIMER_TICK);
|
||||
#else
|
||||
(priv_p->timer).function = ue_ip_timer;
|
||||
(priv_p->timer).expires = jiffies + UE_IP_TIMER_TICK;
|
||||
(priv_p->timer).data = dataP;
|
||||
add_timer(&priv_p->timer);
|
||||
#endif
|
||||
|
||||
spin_unlock(&priv_p->lock);
|
||||
return;
|
||||
// add_timer(&gpriv->timer);
|
||||
@@ -144,10 +151,15 @@ int ue_ip_open(struct net_device *dev_pP)
|
||||
netif_wake_queue(dev_pP);
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
|
||||
timer_setup(&(priv_p->timer), ue_ip_timer, 0);
|
||||
(priv_p->timer).expires = jiffies+UE_IP_TIMER_TICK;
|
||||
#else
|
||||
init_timer(&priv_p->timer);
|
||||
(priv_p->timer).expires = jiffies+UE_IP_TIMER_TICK;
|
||||
(priv_p->timer).data = (unsigned long)priv_p;
|
||||
(priv_p->timer).function = ue_ip_timer;
|
||||
#endif
|
||||
//add_timer(&priv_p->timer);
|
||||
|
||||
printk("[UE_IP_DRV][%s] name = %s\n", __FUNCTION__, dev_pP->name);
|
||||
@@ -243,7 +255,7 @@ int ue_ip_hard_start_xmit(struct sk_buff *skb_pP, struct net_device *dev_pP)
|
||||
|
||||
// End debug information
|
||||
netif_stop_queue(dev_pP);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) || (defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= 1796)
|
||||
netif_trans_update(dev_pP);
|
||||
#else
|
||||
dev_pP->trans_start = jiffies;
|
||||
@@ -319,7 +331,7 @@ void ue_ip_tx_timeout(struct net_device *dev_pP)
|
||||
printk("[UE_IP_DRV][%s] begin\n", __FUNCTION__);
|
||||
// (ue_ip_priv_t *)(dev_pP->priv_p)->stats.tx_errors++;
|
||||
(priv_p->stats).tx_errors++;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) || (defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= 1796)
|
||||
netif_trans_update(dev_pP);
|
||||
#else
|
||||
dev_pP->trans_start = jiffies;
|
||||
@@ -337,7 +349,11 @@ static const struct net_device_ops ue_ip_netdev_ops = {
|
||||
.ndo_set_mac_address = ue_ip_set_mac_address,
|
||||
.ndo_set_config = ue_ip_set_config,
|
||||
.ndo_do_ioctl = NULL,
|
||||
.ndo_change_mtu = ue_ip_change_mtu,
|
||||
#if RHEL_RELEASE_CODE>=1797
|
||||
.extended.ndo_change_mtu = ue_ip_change_mtu,
|
||||
#else
|
||||
.ndo_change_mtu = ue_ip_change_mtu,
|
||||
#endif
|
||||
.ndo_tx_timeout = ue_ip_tx_timeout,
|
||||
.ndo_change_rx_flags = ue_ip_change_rx_flags,
|
||||
};
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
#include "platform_types.h"
|
||||
#include "sap.h"
|
||||
|
||||
#define MAKE_VERSION(a,b,c) ((a)*256+(b)*16+(c))
|
||||
|
||||
typedef struct ue_ip_priv_s {
|
||||
int irq;
|
||||
@@ -89,6 +90,10 @@ typedef struct pdcp_data_req_header_s {
|
||||
sdu_size_t data_size;
|
||||
signed int inst;
|
||||
ip_traffic_type_t traffic_type;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint32_t sourceL2Id;
|
||||
uint32_t destinationL2Id;
|
||||
#endif
|
||||
} pdcp_data_req_header_t;
|
||||
|
||||
typedef struct pdcp_data_ind_header_s {
|
||||
@@ -96,6 +101,10 @@ typedef struct pdcp_data_ind_header_s {
|
||||
sdu_size_t data_size;
|
||||
signed int inst;
|
||||
ip_traffic_type_t dummy_traffic_type;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint32_t sourceL2Id;
|
||||
uint32_t destinationL2Id;
|
||||
#endif
|
||||
} pdcp_data_ind_header_t;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user