alloc_netdev changed in kernel 3.17
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6049 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -50,6 +50,7 @@
|
|||||||
|
|
||||||
//#include <linux/module.h>
|
//#include <linux/module.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/version.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/spinlock.h>
|
#include <linux/spinlock.h>
|
||||||
#include <linux/moduleparam.h>
|
#include <linux/moduleparam.h>
|
||||||
@@ -530,7 +531,11 @@ int init_module (void) {
|
|||||||
|
|
||||||
sprintf(devicename,"oai%d",inst);
|
sprintf(devicename,"oai%d",inst);
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
|
||||||
oai_nw_drv_dev[inst] = alloc_netdev(sizeof(struct oai_nw_drv_priv),devicename, oai_nw_drv_init);
|
oai_nw_drv_dev[inst] = alloc_netdev(sizeof(struct oai_nw_drv_priv),devicename, oai_nw_drv_init);
|
||||||
|
#else
|
||||||
|
oai_nw_drv_dev[inst] = alloc_netdev(sizeof(struct oai_nw_drv_priv),devicename, NET_NAME_PREDICTABLE, nas_init);
|
||||||
|
#endif
|
||||||
//netif_stop_queue(oai_nw_drv_dev[inst]);
|
//netif_stop_queue(oai_nw_drv_dev[inst]);
|
||||||
|
|
||||||
if (oai_nw_drv_dev[inst] == NULL) {
|
if (oai_nw_drv_dev[inst] == NULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user