From cb4395ca8e2ac7857a06623d1b81033cc6db68a4 Mon Sep 17 00:00:00 2001 From: thomasl <thomasl@eurecom.fr> Date: Thu, 20 Nov 2014 14:31:59 +0000 Subject: [PATCH] alloc_netdev changed in kernel 3.17 git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6048 818b1a75-f10b-46b9-bf7c-635c3b92a50f --- openair2/NETWORK_DRIVER/UE_IP/device.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openair2/NETWORK_DRIVER/UE_IP/device.c b/openair2/NETWORK_DRIVER/UE_IP/device.c index ba89b9fd5..a28306188 100755 --- a/openair2/NETWORK_DRIVER/UE_IP/device.c +++ b/openair2/NETWORK_DRIVER/UE_IP/device.c @@ -48,6 +48,7 @@ #include "proto_extern.h" #include <linux/kernel.h> +#include <linux/version.h> #include <linux/init.h> #include <linux/spinlock.h> #include <linux/moduleparam.h> @@ -348,7 +349,11 @@ int init_module (void) { for (inst=0;inst<UE_IP_NB_INSTANCES_MAX;inst++) { printk("[UE_IP_DRV][%s] begin init instance %d\n", __FUNCTION__,inst); sprintf(devicename,"oip%d",inst); +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) ue_ip_dev[inst] = alloc_netdev(sizeof(ue_ip_priv_t),devicename, ue_ip_init); +#else + ue_ip_dev[inst] = alloc_netdev(sizeof(ue_ip_priv_t),devicename, NET_NAME_PREDICTABLE,ue_ip_init); +#endif //netif_stop_queue(ue_ip_dev[inst]); if (ue_ip_dev[inst] == NULL) { printk("[UE_IP_DRV][%s][INST %02d] alloc_netdev FAILED\n", __FUNCTION__,inst); -- GitLab