From 434b6bb6a08fd9d32be00a82453e9051d3aa3f07 Mon Sep 17 00:00:00 2001 From: Lionel Gauthier <lionel.gauthier@eurecom.fr> Date: Tue, 3 Feb 2015 15:31:37 +0000 Subject: [PATCH] git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6460 818b1a75-f10b-46b9-bf7c-635c3b92a50f --- openair2/NETWORK_DRIVER/UE_IP/common.c | 5 ++--- openair2/NETWORK_DRIVER/UE_IP/constant.h | 14 +++++++------- openair2/NETWORK_DRIVER/UE_IP/netlink.c | 4 ++-- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/openair2/NETWORK_DRIVER/UE_IP/common.c b/openair2/NETWORK_DRIVER/UE_IP/common.c index 372c8355fd..dcf491f0e6 100755 --- a/openair2/NETWORK_DRIVER/UE_IP/common.c +++ b/openair2/NETWORK_DRIVER/UE_IP/common.c @@ -105,7 +105,6 @@ ue_ip_common_class_wireless2ip( hard_header_len = ue_ip_dev[instP]->hard_header_len; skb_set_mac_header(skb_p, 0); - //skb_p->mac_header = skb_p->data; //printk("[NAC_COMMIN_RECEIVE]: Packet Type %d (%d,%d)",skb_p->pkt_type,PACKET_HOST,PACKET_BROADCAST); skb_p->pkt_type = PACKET_HOST; @@ -129,7 +128,7 @@ ue_ip_common_class_wireless2ip( skb_p->ip_summed = CHECKSUM_UNNECESSARY; - ipv_p = (struct ipversion *)&(skb_p->data[hard_header_len]); + ipv_p = (ipversion_t *)((void*)&(skb_p->data[hard_header_len])); switch (ipv_p->version) { case 6: @@ -165,7 +164,7 @@ ue_ip_common_class_wireless2ip( printk("[UE_IP_DRV][%s] protocol %d\n",__FUNCTION__, ((struct iphdr *)&skb_p->data[hard_header_len])->protocol); #endif - skb_p->network_header = &skb_p->data[hard_header_len]; + skb_set_network_header(skb_p, hard_header_len); //network_header_p = (struct iphdr *)skb_network_header(skb_p); network_header_p = (struct iphdr *)skb_network_header(skb_p); protocol = network_header_p->protocol; diff --git a/openair2/NETWORK_DRIVER/UE_IP/constant.h b/openair2/NETWORK_DRIVER/UE_IP/constant.h index 2b8681c240..2dfc810080 100755 --- a/openair2/NETWORK_DRIVER/UE_IP/constant.h +++ b/openair2/NETWORK_DRIVER/UE_IP/constant.h @@ -44,18 +44,18 @@ #define UE_IP_RESET_RX_FLAGS 0 -#define UE_IP_RETRY_LIMIT_DEFAULT 5 +#define UE_IP_RETRY_LIMIT_DEFAULT (int)5 -#define UE_IP_MESSAGE_MAXLEN 5004 +#define UE_IP_MESSAGE_MAXLEN (int)5004 -#define UE_IP_TIMER_ESTABLISHMENT_DEFAULT 12 -#define UE_IP_TIMER_RELEASE_DEFAULT 2 +#define UE_IP_TIMER_ESTABLISHMENT_DEFAULT (int)12 +#define UE_IP_TIMER_RELEASE_DEFAULT (int)2 #define UE_IP_TIMER_IDLE UINT_MAX #define UE_IP_TIMER_TICK HZ -#define UE_IP_PDCPH_SIZE sizeof(struct pdcp_data_req_header_s) -#define UE_IP_IPV4_SIZE 20 -#define UE_IP_IPV6_SIZE 40 +#define UE_IP_PDCPH_SIZE (int)sizeof(struct pdcp_data_req_header_s) +#define UE_IP_IPV4_SIZE (int)20 +#define UE_IP_IPV6_SIZE (int)40 diff --git a/openair2/NETWORK_DRIVER/UE_IP/netlink.c b/openair2/NETWORK_DRIVER/UE_IP/netlink.c index c3222eb086..809b9d9033 100755 --- a/openair2/NETWORK_DRIVER/UE_IP/netlink.c +++ b/openair2/NETWORK_DRIVER/UE_IP/netlink.c @@ -61,7 +61,7 @@ int ue_ip_netlink_init(void); static struct sock *nas_nl_sk = NULL; static int exit_netlink_thread=0; -#ifdef LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) struct netlink_kernel_cfg cfg = { .input = nas_nl_data_ready, }; @@ -107,7 +107,7 @@ int ue_ip_netlink_init(void) nas_nl_sk = netlink_kernel_create( &init_net, -#ifdef LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) NAS_NETLINK_ID, &cfg #else -- GitLab