aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2003-06-06 03:07:01 (GMT)
committerJouni Malinen <j@w1.fi>2003-06-06 03:07:01 (GMT)
commit5ddb0939f9d2eb887bf3871cdad18bc9c63b7164 (patch)
tree195e45affa2c1133f92a33fce9d9bd63a3823672
parentbdbf560f2e1d75df602e7230e34be073564716f7 (diff)
downloadhostap-history-5ddb0939f9d2eb887bf3871cdad18bc9c63b7164.zip
hostap-history-5ddb0939f9d2eb887bf3871cdad18bc9c63b7164.tar.gz
hostap-history-5ddb0939f9d2eb887bf3871cdad18bc9c63b7164.tar.bz2
Fixed compilation when kernel is configured not to support Linux Wireless
Extensions (CONFIG_NET_RADIO).
-rw-r--r--driver/modules/hostap.c8
-rw-r--r--driver/modules/hostap_cs.c2
-rw-r--r--driver/modules/hostap_ioctl.c12
-rw-r--r--driver/modules/hostap_pci.c2
-rw-r--r--driver/modules/hostap_plx.c2
5 files changed, 15 insertions, 11 deletions
diff --git a/driver/modules/hostap.c b/driver/modules/hostap.c
index 72cfa5f..0904a99 100644
--- a/driver/modules/hostap.c
+++ b/driver/modules/hostap.c
@@ -31,10 +31,12 @@
#include <linux/workqueue.h>
#endif
#include <linux/kmod.h>
+#ifdef CONFIG_NET_RADIO
#include <linux/wireless.h>
#if WIRELESS_EXT > 12
#include <net/iw_handler.h>
#endif /* WIRELESS_EXT > 12 */
+#endif /* CONFIG_NET_RADIO */
#include <asm/uaccess.h>
@@ -847,6 +849,9 @@ void hostap_setup_dev(struct net_device *dev, local_info_t *local,
dev->wireless_handlers =
(struct iw_handler_def *) &hostap_iw_handler_def;
#endif /* WIRELESS_EXT > 12 */
+#ifdef HAVE_PRIVATE_IOCTL
+ dev->do_ioctl = main_dev ? hostap_ioctl : NULL;
+#endif
#endif /* WIRELESS_EXT */
dev->open = prism2_open;
dev->stop = prism2_close;
@@ -860,9 +865,6 @@ void hostap_setup_dev(struct net_device *dev, local_info_t *local,
#ifdef HAVE_MULTICAST
dev->set_multicast_list = hostap_set_multicast_list;
#endif
-#ifdef HAVE_PRIVATE_IOCTL
- dev->do_ioctl = main_dev ? hostap_ioctl : NULL;
-#endif
#ifdef HAVE_CHANGE_MTU
dev->change_mtu = prism2_change_mtu;
#endif
diff --git a/driver/modules/hostap_cs.c b/driver/modules/hostap_cs.c
index 6b13824..19dbf86 100644
--- a/driver/modules/hostap_cs.c
+++ b/driver/modules/hostap_cs.c
@@ -17,10 +17,12 @@
#else
#include <linux/workqueue.h>
#endif
+#ifdef CONFIG_NET_RADIO
#include <linux/wireless.h>
#if WIRELESS_EXT > 12
#include <net/iw_handler.h>
#endif /* WIRELESS_EXT > 12 */
+#endif /* CONFIG_NET_RADIO */
#include <pcmcia/version.h>
#include <pcmcia/cs_types.h>
diff --git a/driver/modules/hostap_ioctl.c b/driver/modules/hostap_ioctl.c
index 620b6ce..c356c74 100644
--- a/driver/modules/hostap_ioctl.c
+++ b/driver/modules/hostap_ioctl.c
@@ -1,12 +1,12 @@
/* ioctl() (mostly Linux Wireless Extensions) routines for Host AP driver */
+#ifdef WIRELESS_EXT
+
#ifdef in_atomic
/* Get kernel_locked() for in_atomic() */
#include <linux/smp_lock.h>
#endif
-#ifdef WIRELESS_EXT
-
/* Conversion to new driver API by Jean II */
#if WIRELESS_EXT <= 12
@@ -1993,7 +1993,6 @@ static int prism2_ioctl_giwpriv(struct net_device *dev, struct iw_point *data)
}
#endif /* WIRELESS_EXT <= 12 */
#endif /* WIRELESS_EXT > 8 */
-#endif /* WIRELESS_EXT */
static int prism2_ioctl_priv_inquire(struct net_device *dev, int *i)
@@ -3185,15 +3184,12 @@ static const struct iw_handler_def hostap_iw_handler_def =
int hostap_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
-#ifdef WIRELESS_EXT
struct iwreq *wrq = (struct iwreq *) ifr;
-#endif
local_info_t *local = (local_info_t *) dev->priv;
int ret = 0;
switch (cmd) {
-#ifdef WIRELESS_EXT
#if WIRELESS_EXT <= 12
case SIOCGIWNAME:
ret = prism2_get_name(dev, NULL, (char *) &wrq->u, NULL);
@@ -3593,8 +3589,6 @@ int hostap_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
#endif /* WIRELESS_EXT > 8 */
break;
-#endif /* WIRELESS_EXT */
-
default:
#if WIRELESS_EXT > 12
if (cmd >= SIOCSIWCOMMIT && cmd <= SIOCGIWPOWER) {
@@ -3612,3 +3606,5 @@ int hostap_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
return ret;
}
+
+#endif /* WIRELESS_EXT */
diff --git a/driver/modules/hostap_pci.c b/driver/modules/hostap_pci.c
index 40b6775..2a628ff 100644
--- a/driver/modules/hostap_pci.c
+++ b/driver/modules/hostap_pci.c
@@ -16,10 +16,12 @@
#else
#include <linux/workqueue.h>
#endif
+#ifdef CONFIG_NET_RADIO
#include <linux/wireless.h>
#if WIRELESS_EXT > 12
#include <net/iw_handler.h>
#endif /* WIRELESS_EXT > 12 */
+#endif /* CONFIG_NET_RADIO */
#include <linux/ioport.h>
#include <linux/pci.h>
diff --git a/driver/modules/hostap_plx.c b/driver/modules/hostap_plx.c
index dbb16c0..09cce8f 100644
--- a/driver/modules/hostap_plx.c
+++ b/driver/modules/hostap_plx.c
@@ -19,10 +19,12 @@
#else
#include <linux/workqueue.h>
#endif
+#ifdef CONFIG_NET_RADIO
#include <linux/wireless.h>
#if WIRELESS_EXT > 12
#include <net/iw_handler.h>
#endif /* WIRELESS_EXT > 12 */
+#endif /* CONFIG_NET_RADIO */
#include <linux/ioport.h>
#include <linux/pci.h>