Use Linux 3.17 4-argument alloc_netdev(), provide compatibility code
[madwifi/.git] / ath / if_ath_ahb.c
index 12cfcfc5406f497dc775b9327c342b0bf4ab41d4..59c6579671baff4aad836c57cbff7db932e1abae 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/cache.h>
 #include <linux/platform_device.h>
 #include <linux/ethtool.h>
+#include <linux/delay.h>
 
 #include <asm/io.h>
 #include <asm/uaccess.h>
@@ -33,8 +34,8 @@
 #include "if_ath_ahb.h"
 #include "ah_soc.h"
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
-#error "Kernel versions older than 2.6.19 are not supported!"
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
+#error "Kernel versions older than 2.6.15 are not supported!"
 #endif
 
 /*
@@ -187,7 +188,8 @@ init_ath_wmac(u_int16_t devid, u_int16_t wlanNum, struct ar531x_config *config)
 
        ahb_enable_wmac(devid, wlanNum);
 
-       dev = alloc_netdev(sizeof(struct ath_softc), "wifi%d", ether_setup);
+       dev = alloc_netdev(sizeof(struct ath_softc), "wifi%d", NET_NAME_UNKNOWN,
+                          ether_setup);
        if (dev == NULL) {
                printk(KERN_ERR "%s: no memory for device state\n", dev_info);
                goto bad2;