aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-09-24 04:05:52 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-09-24 04:05:52 -0400
commite2e965072564e7aad8df963107677a6d22c41767 (patch)
tree92667c7ec98f96308f4eefd4ec3c1bdfbb5acd93
parent596ff2e7c8db39c700e277f0bc267244be253f5b (diff)
Remove WIRELESS_EXT ifdefs from several wireless drivers.
-rw-r--r--drivers/net/wireless/airo.c17
-rw-r--r--drivers/net/wireless/netwave_cs.c185
-rw-r--r--drivers/net/wireless/prism54/isl_ioctl.c10
-rw-r--r--drivers/net/wireless/prism54/islpci_dev.c4
-rw-r--r--drivers/net/wireless/prism54/islpci_dev.h2
-rw-r--r--drivers/net/wireless/wavelan.c8
-rw-r--r--drivers/net/wireless/wavelan.p.h4
-rw-r--r--drivers/net/wireless/wavelan_cs.c8
-rw-r--r--drivers/net/wireless/wavelan_cs.p.h4
9 files changed, 1 insertions, 241 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 06998c2240d9..a6194955df2c 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -1046,7 +1046,6 @@ static WifiCtlHdr wifictlhdr8023 = {
1046 } 1046 }
1047}; 1047};
1048 1048
1049#ifdef WIRELESS_EXT
1050// Frequency list (map channels to frequencies) 1049// Frequency list (map channels to frequencies)
1051static const long frequency_list[] = { 2412, 2417, 2422, 2427, 2432, 2437, 2442, 1050static const long frequency_list[] = { 2412, 2417, 2422, 2427, 2432, 2437, 2442,
1052 2447, 2452, 2457, 2462, 2467, 2472, 2484 }; 1051 2447, 2452, 2457, 2462, 2467, 2472, 2484 };
@@ -1067,7 +1066,6 @@ typedef struct wep_key_t {
1067 1066
1068/* List of Wireless Handlers (new API) */ 1067/* List of Wireless Handlers (new API) */
1069static const struct iw_handler_def airo_handler_def; 1068static const struct iw_handler_def airo_handler_def;
1070#endif /* WIRELESS_EXT */
1071 1069
1072static const char version[] = "airo.c 0.6 (Ben Reed & Javier Achirica)"; 1070static const char version[] = "airo.c 0.6 (Ben Reed & Javier Achirica)";
1073 1071
@@ -1110,10 +1108,8 @@ static irqreturn_t airo_interrupt( int irq, void* dev_id, struct pt_regs
1110static int airo_thread(void *data); 1108static int airo_thread(void *data);
1111static void timer_func( struct net_device *dev ); 1109static void timer_func( struct net_device *dev );
1112static int airo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); 1110static int airo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
1113#ifdef WIRELESS_EXT
1114static struct iw_statistics *airo_get_wireless_stats (struct net_device *dev); 1111static struct iw_statistics *airo_get_wireless_stats (struct net_device *dev);
1115static void airo_read_wireless_stats (struct airo_info *local); 1112static void airo_read_wireless_stats (struct airo_info *local);
1116#endif /* WIRELESS_EXT */
1117#ifdef CISCO_EXT 1113#ifdef CISCO_EXT
1118static int readrids(struct net_device *dev, aironet_ioctl *comp); 1114static int readrids(struct net_device *dev, aironet_ioctl *comp);
1119static int writerids(struct net_device *dev, aironet_ioctl *comp); 1115static int writerids(struct net_device *dev, aironet_ioctl *comp);
@@ -1187,12 +1183,10 @@ struct airo_info {
1187 int fid; 1183 int fid;
1188 } xmit, xmit11; 1184 } xmit, xmit11;
1189 struct net_device *wifidev; 1185 struct net_device *wifidev;
1190#ifdef WIRELESS_EXT
1191 struct iw_statistics wstats; // wireless stats 1186 struct iw_statistics wstats; // wireless stats
1192 unsigned long scan_timestamp; /* Time started to scan */ 1187 unsigned long scan_timestamp; /* Time started to scan */
1193 struct iw_spy_data spy_data; 1188 struct iw_spy_data spy_data;
1194 struct iw_public_data wireless_data; 1189 struct iw_public_data wireless_data;
1195#endif /* WIRELESS_EXT */
1196#ifdef MICSUPPORT 1190#ifdef MICSUPPORT
1197 /* MIC stuff */ 1191 /* MIC stuff */
1198 struct crypto_tfm *tfm; 1192 struct crypto_tfm *tfm;
@@ -2647,9 +2641,7 @@ static void wifi_setup(struct net_device *dev)
2647 dev->get_stats = &airo_get_stats; 2641 dev->get_stats = &airo_get_stats;
2648 dev->set_mac_address = &airo_set_mac_address; 2642 dev->set_mac_address = &airo_set_mac_address;
2649 dev->do_ioctl = &airo_ioctl; 2643 dev->do_ioctl = &airo_ioctl;
2650#ifdef WIRELESS_EXT
2651 dev->wireless_handlers = &airo_handler_def; 2644 dev->wireless_handlers = &airo_handler_def;
2652#endif /* WIRELESS_EXT */
2653 dev->change_mtu = &airo_change_mtu; 2645 dev->change_mtu = &airo_change_mtu;
2654 dev->open = &airo_open; 2646 dev->open = &airo_open;
2655 dev->stop = &airo_close; 2647 dev->stop = &airo_close;
@@ -2675,9 +2667,7 @@ static struct net_device *init_wifidev(struct airo_info *ai,
2675 dev->priv = ethdev->priv; 2667 dev->priv = ethdev->priv;
2676 dev->irq = ethdev->irq; 2668 dev->irq = ethdev->irq;
2677 dev->base_addr = ethdev->base_addr; 2669 dev->base_addr = ethdev->base_addr;
2678#ifdef WIRELESS_EXT
2679 dev->wireless_data = ethdev->wireless_data; 2670 dev->wireless_data = ethdev->wireless_data;
2680#endif /* WIRELESS_EXT */
2681 memcpy(dev->dev_addr, ethdev->dev_addr, dev->addr_len); 2671 memcpy(dev->dev_addr, ethdev->dev_addr, dev->addr_len);
2682 err = register_netdev(dev); 2672 err = register_netdev(dev);
2683 if (err<0) { 2673 if (err<0) {
@@ -2755,11 +2745,9 @@ static struct net_device *_init_airo_card( unsigned short irq, int port,
2755 dev->set_multicast_list = &airo_set_multicast_list; 2745 dev->set_multicast_list = &airo_set_multicast_list;
2756 dev->set_mac_address = &airo_set_mac_address; 2746 dev->set_mac_address = &airo_set_mac_address;
2757 dev->do_ioctl = &airo_ioctl; 2747 dev->do_ioctl = &airo_ioctl;
2758#ifdef WIRELESS_EXT
2759 dev->wireless_handlers = &airo_handler_def; 2748 dev->wireless_handlers = &airo_handler_def;
2760 ai->wireless_data.spy_data = &ai->spy_data; 2749 ai->wireless_data.spy_data = &ai->spy_data;
2761 dev->wireless_data = &ai->wireless_data; 2750 dev->wireless_data = &ai->wireless_data;
2762#endif /* WIRELESS_EXT */
2763 dev->change_mtu = &airo_change_mtu; 2751 dev->change_mtu = &airo_change_mtu;
2764 dev->open = &airo_open; 2752 dev->open = &airo_open;
2765 dev->stop = &airo_close; 2753 dev->stop = &airo_close;
@@ -5598,7 +5586,6 @@ static void __exit airo_cleanup_module( void )
5598 remove_proc_entry("aironet", proc_root_driver); 5586 remove_proc_entry("aironet", proc_root_driver);
5599} 5587}
5600 5588
5601#ifdef WIRELESS_EXT
5602/* 5589/*
5603 * Initial Wireless Extension code for Aironet driver by : 5590 * Initial Wireless Extension code for Aironet driver by :
5604 * Jean Tourrilhes <jt@hpl.hp.com> - HPL - 17 November 00 5591 * Jean Tourrilhes <jt@hpl.hp.com> - HPL - 17 November 00
@@ -7107,8 +7094,6 @@ static const struct iw_handler_def airo_handler_def =
7107 .get_wireless_stats = airo_get_wireless_stats, 7094 .get_wireless_stats = airo_get_wireless_stats,
7108}; 7095};
7109 7096
7110#endif /* WIRELESS_EXT */
7111
7112/* 7097/*
7113 * This defines the configuration part of the Wireless Extensions 7098 * This defines the configuration part of the Wireless Extensions
7114 * Note : irq and spinlock protection will occur in the subroutines 7099 * Note : irq and spinlock protection will occur in the subroutines
@@ -7187,7 +7172,6 @@ static int airo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
7187 return rc; 7172 return rc;
7188} 7173}
7189 7174
7190#ifdef WIRELESS_EXT
7191/* 7175/*
7192 * Get the Wireless stats out of the driver 7176 * Get the Wireless stats out of the driver
7193 * Note : irq and spinlock protection will occur in the subroutines 7177 * Note : irq and spinlock protection will occur in the subroutines
@@ -7260,7 +7244,6 @@ static struct iw_statistics *airo_get_wireless_stats(struct net_device *dev)
7260 7244
7261 return &local->wstats; 7245 return &local->wstats;
7262} 7246}
7263#endif /* WIRELESS_EXT */
7264 7247
7265#ifdef CISCO_EXT 7248#ifdef CISCO_EXT
7266/* 7249/*
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c
index ca6c03c89926..92793b958e32 100644
--- a/drivers/net/wireless/netwave_cs.c
+++ b/drivers/net/wireless/netwave_cs.c
@@ -57,9 +57,7 @@
57#include <linux/bitops.h> 57#include <linux/bitops.h>
58#ifdef CONFIG_NET_RADIO 58#ifdef CONFIG_NET_RADIO
59#include <linux/wireless.h> 59#include <linux/wireless.h>
60#if WIRELESS_EXT > 12
61#include <net/iw_handler.h> 60#include <net/iw_handler.h>
62#endif /* WIRELESS_EXT > 12 */
63#endif 61#endif
64 62
65#include <pcmcia/cs_types.h> 63#include <pcmcia/cs_types.h>
@@ -225,10 +223,7 @@ static void update_stats(struct net_device *dev);
225static struct net_device_stats *netwave_get_stats(struct net_device *dev); 223static struct net_device_stats *netwave_get_stats(struct net_device *dev);
226 224
227/* Wireless extensions */ 225/* Wireless extensions */
228#ifdef WIRELESS_EXT
229static struct iw_statistics* netwave_get_wireless_stats(struct net_device *dev); 226static struct iw_statistics* netwave_get_wireless_stats(struct net_device *dev);
230#endif
231static int netwave_ioctl(struct net_device *, struct ifreq *, int);
232 227
233static void set_multicast_list(struct net_device *dev); 228static void set_multicast_list(struct net_device *dev);
234 229
@@ -260,26 +255,7 @@ static dev_link_t *dev_list;
260 because they generally can't be allocated dynamically. 255 because they generally can't be allocated dynamically.
261*/ 256*/
262 257
263#if WIRELESS_EXT <= 12
264/* Wireless extensions backward compatibility */
265
266/* Part of iw_handler prototype we need */
267struct iw_request_info
268{
269 __u16 cmd; /* Wireless Extension command */
270 __u16 flags; /* More to come ;-) */
271};
272
273/* Wireless Extension Backward compatibility - Jean II
274 * If the new wireless device private ioctl range is not defined,
275 * default to standard device private ioctl range */
276#ifndef SIOCIWFIRSTPRIV
277#define SIOCIWFIRSTPRIV SIOCDEVPRIVATE
278#endif /* SIOCIWFIRSTPRIV */
279
280#else /* WIRELESS_EXT <= 12 */
281static const struct iw_handler_def netwave_handler_def; 258static const struct iw_handler_def netwave_handler_def;
282#endif /* WIRELESS_EXT <= 12 */
283 259
284#define SIOCGIPSNAP SIOCIWFIRSTPRIV + 1 /* Site Survey Snapshot */ 260#define SIOCGIPSNAP SIOCIWFIRSTPRIV + 1 /* Site Survey Snapshot */
285 261
@@ -319,9 +295,7 @@ typedef struct netwave_private {
319 struct timer_list watchdog; /* To avoid blocking state */ 295 struct timer_list watchdog; /* To avoid blocking state */
320 struct site_survey nss; 296 struct site_survey nss;
321 struct net_device_stats stats; 297 struct net_device_stats stats;
322#ifdef WIRELESS_EXT
323 struct iw_statistics iw_stats; /* Wireless stats */ 298 struct iw_statistics iw_stats; /* Wireless stats */
324#endif
325} netwave_private; 299} netwave_private;
326 300
327#ifdef NETWAVE_STATS 301#ifdef NETWAVE_STATS
@@ -353,7 +327,6 @@ static inline void wait_WOC(unsigned int iobase)
353 while ((inb(iobase + NETWAVE_REG_ASR) & 0x8) != 0x8) ; 327 while ((inb(iobase + NETWAVE_REG_ASR) & 0x8) != 0x8) ;
354} 328}
355 329
356#ifdef WIRELESS_EXT
357static void netwave_snapshot(netwave_private *priv, u_char __iomem *ramBase, 330static void netwave_snapshot(netwave_private *priv, u_char __iomem *ramBase,
358 kio_addr_t iobase) { 331 kio_addr_t iobase) {
359 u_short resultBuffer; 332 u_short resultBuffer;
@@ -376,9 +349,7 @@ static void netwave_snapshot(netwave_private *priv, u_char __iomem *ramBase,
376 sizeof(struct site_survey)); 349 sizeof(struct site_survey));
377 } 350 }
378} 351}
379#endif
380 352
381#ifdef WIRELESS_EXT
382/* 353/*
383 * Function netwave_get_wireless_stats (dev) 354 * Function netwave_get_wireless_stats (dev)
384 * 355 *
@@ -411,7 +382,6 @@ static struct iw_statistics *netwave_get_wireless_stats(struct net_device *dev)
411 382
412 return &priv->iw_stats; 383 return &priv->iw_stats;
413} 384}
414#endif
415 385
416/* 386/*
417 * Function netwave_attach (void) 387 * Function netwave_attach (void)
@@ -471,13 +441,7 @@ static dev_link_t *netwave_attach(void)
471 dev->get_stats = &netwave_get_stats; 441 dev->get_stats = &netwave_get_stats;
472 dev->set_multicast_list = &set_multicast_list; 442 dev->set_multicast_list = &set_multicast_list;
473 /* wireless extensions */ 443 /* wireless extensions */
474#if WIRELESS_EXT <= 16
475 dev->get_wireless_stats = &netwave_get_wireless_stats;
476#endif /* WIRELESS_EXT <= 16 */
477#if WIRELESS_EXT > 12
478 dev->wireless_handlers = (struct iw_handler_def *)&netwave_handler_def; 444 dev->wireless_handlers = (struct iw_handler_def *)&netwave_handler_def;
479#endif /* WIRELESS_EXT > 12 */
480 dev->do_ioctl = &netwave_ioctl;
481 445
482 dev->tx_timeout = &netwave_watchdog; 446 dev->tx_timeout = &netwave_watchdog;
483 dev->watchdog_timeo = TX_TIMEOUT; 447 dev->watchdog_timeo = TX_TIMEOUT;
@@ -576,13 +540,8 @@ static int netwave_set_nwid(struct net_device *dev,
576 /* Disable interrupts & save flags */ 540 /* Disable interrupts & save flags */
577 spin_lock_irqsave(&priv->spinlock, flags); 541 spin_lock_irqsave(&priv->spinlock, flags);
578 542
579#if WIRELESS_EXT > 8
580 if(!wrqu->nwid.disabled) { 543 if(!wrqu->nwid.disabled) {
581 domain = wrqu->nwid.value; 544 domain = wrqu->nwid.value;
582#else /* WIRELESS_EXT > 8 */
583 if(wrqu->nwid.on) {
584 domain = wrqu->nwid.nwid;
585#endif /* WIRELESS_EXT > 8 */
586 printk( KERN_DEBUG "Setting domain to 0x%x%02x\n", 545 printk( KERN_DEBUG "Setting domain to 0x%x%02x\n",
587 (domain >> 8) & 0x01, domain & 0xff); 546 (domain >> 8) & 0x01, domain & 0xff);
588 wait_WOC(iobase); 547 wait_WOC(iobase);
@@ -606,15 +565,9 @@ static int netwave_get_nwid(struct net_device *dev,
606 union iwreq_data *wrqu, 565 union iwreq_data *wrqu,
607 char *extra) 566 char *extra)
608{ 567{
609#if WIRELESS_EXT > 8
610 wrqu->nwid.value = domain; 568 wrqu->nwid.value = domain;
611 wrqu->nwid.disabled = 0; 569 wrqu->nwid.disabled = 0;
612 wrqu->nwid.fixed = 1; 570 wrqu->nwid.fixed = 1;
613#else /* WIRELESS_EXT > 8 */
614 wrqu->nwid.nwid = domain;
615 wrqu->nwid.on = 1;
616#endif /* WIRELESS_EXT > 8 */
617
618 return 0; 571 return 0;
619} 572}
620 573
@@ -657,17 +610,11 @@ static int netwave_get_scramble(struct net_device *dev,
657{ 610{
658 key[1] = scramble_key & 0xff; 611 key[1] = scramble_key & 0xff;
659 key[0] = (scramble_key>>8) & 0xff; 612 key[0] = (scramble_key>>8) & 0xff;
660#if WIRELESS_EXT > 8
661 wrqu->encoding.flags = IW_ENCODE_ENABLED; 613 wrqu->encoding.flags = IW_ENCODE_ENABLED;
662 wrqu->encoding.length = 2; 614 wrqu->encoding.length = 2;
663#else /* WIRELESS_EXT > 8 */
664 wrqu->encoding.method = 1;
665#endif /* WIRELESS_EXT > 8 */
666
667 return 0; 615 return 0;
668} 616}
669 617
670#if WIRELESS_EXT > 8
671/* 618/*
672 * Wireless Handler : get mode 619 * Wireless Handler : get mode
673 */ 620 */
@@ -683,7 +630,6 @@ static int netwave_get_mode(struct net_device *dev,
683 630
684 return 0; 631 return 0;
685} 632}
686#endif /* WIRELESS_EXT > 8 */
687 633
688/* 634/*
689 * Wireless Handler : get range info 635 * Wireless Handler : get range info
@@ -702,11 +648,9 @@ static int netwave_get_range(struct net_device *dev,
702 /* Set all the info we don't care or don't know about to zero */ 648 /* Set all the info we don't care or don't know about to zero */
703 memset(range, 0, sizeof(struct iw_range)); 649 memset(range, 0, sizeof(struct iw_range));
704 650
705#if WIRELESS_EXT > 10
706 /* Set the Wireless Extension versions */ 651 /* Set the Wireless Extension versions */
707 range->we_version_compiled = WIRELESS_EXT; 652 range->we_version_compiled = WIRELESS_EXT;
708 range->we_version_source = 9; /* Nothing for us in v10 and v11 */ 653 range->we_version_source = 9; /* Nothing for us in v10 and v11 */
709#endif /* WIRELESS_EXT > 10 */
710 654
711 /* Set information in the range struct */ 655 /* Set information in the range struct */
712 range->throughput = 450 * 1000; /* don't argue on this ! */ 656 range->throughput = 450 * 1000; /* don't argue on this ! */
@@ -720,16 +664,12 @@ static int netwave_get_range(struct net_device *dev,
720 range->max_qual.level = 255; 664 range->max_qual.level = 255;
721 range->max_qual.noise = 0; 665 range->max_qual.noise = 0;
722 666
723#if WIRELESS_EXT > 7
724 range->num_bitrates = 1; 667 range->num_bitrates = 1;
725 range->bitrate[0] = 1000000; /* 1 Mb/s */ 668 range->bitrate[0] = 1000000; /* 1 Mb/s */
726#endif /* WIRELESS_EXT > 7 */
727 669
728#if WIRELESS_EXT > 8
729 range->encoding_size[0] = 2; /* 16 bits scrambling */ 670 range->encoding_size[0] = 2; /* 16 bits scrambling */
730 range->num_encoding_sizes = 1; 671 range->num_encoding_sizes = 1;
731 range->max_encoding_tokens = 1; /* Only one key possible */ 672 range->max_encoding_tokens = 1; /* Only one key possible */
732#endif /* WIRELESS_EXT > 8 */
733 673
734 return ret; 674 return ret;
735} 675}
@@ -775,8 +715,6 @@ static const struct iw_priv_args netwave_private_args[] = {
775 "getsitesurvey" }, 715 "getsitesurvey" },
776}; 716};
777 717
778#if WIRELESS_EXT > 12
779
780static const iw_handler netwave_handler[] = 718static const iw_handler netwave_handler[] =
781{ 719{
782 NULL, /* SIOCSIWNAME */ 720 NULL, /* SIOCSIWNAME */
@@ -839,131 +777,8 @@ static const struct iw_handler_def netwave_handler_def =
839 .standard = (iw_handler *) netwave_handler, 777 .standard = (iw_handler *) netwave_handler,
840 .private = (iw_handler *) netwave_private_handler, 778 .private = (iw_handler *) netwave_private_handler,
841 .private_args = (struct iw_priv_args *) netwave_private_args, 779 .private_args = (struct iw_priv_args *) netwave_private_args,
842#if WIRELESS_EXT > 16
843 .get_wireless_stats = netwave_get_wireless_stats, 780 .get_wireless_stats = netwave_get_wireless_stats,
844#endif /* WIRELESS_EXT > 16 */
845}; 781};
846#endif /* WIRELESS_EXT > 12 */
847
848/*
849 * Function netwave_ioctl (dev, rq, cmd)
850 *
851 * Perform ioctl : config & info stuff
852 * This is the stuff that are treated the wireless extensions (iwconfig)
853 *
854 */
855static int netwave_ioctl(struct net_device *dev, /* ioctl device */
856 struct ifreq *rq, /* Data passed */
857 int cmd) /* Ioctl number */
858{
859 int ret = 0;
860#ifdef WIRELESS_EXT
861#if WIRELESS_EXT <= 12
862 struct iwreq *wrq = (struct iwreq *) rq;
863#endif
864#endif
865
866 DEBUG(0, "%s: ->netwave_ioctl(cmd=0x%X)\n", dev->name, cmd);
867
868 /* Look what is the request */
869 switch(cmd) {
870 /* --------------- WIRELESS EXTENSIONS --------------- */
871#ifdef WIRELESS_EXT
872#if WIRELESS_EXT <= 12
873 case SIOCGIWNAME:
874 netwave_get_name(dev, NULL, &(wrq->u), NULL);
875 break;
876 case SIOCSIWNWID:
877 ret = netwave_set_nwid(dev, NULL, &(wrq->u), NULL);
878 break;
879 case SIOCGIWNWID:
880 ret = netwave_get_nwid(dev, NULL, &(wrq->u), NULL);
881 break;
882#if WIRELESS_EXT > 8 /* Note : The API did change... */
883 case SIOCGIWENCODE:
884 /* Get scramble key */
885 if(wrq->u.encoding.pointer != (caddr_t) 0)
886 {
887 char key[2];
888 ret = netwave_get_scramble(dev, NULL, &(wrq->u), key);
889 if(copy_to_user(wrq->u.encoding.pointer, key, 2))
890 ret = -EFAULT;
891 }
892 break;
893 case SIOCSIWENCODE:
894 /* Set scramble key */
895 if(wrq->u.encoding.pointer != (caddr_t) 0)
896 {
897 char key[2];
898 if(copy_from_user(key, wrq->u.encoding.pointer, 2))
899 {
900 ret = -EFAULT;
901 break;
902 }
903 ret = netwave_set_scramble(dev, NULL, &(wrq->u), key);
904 }
905 break;
906 case SIOCGIWMODE:
907 /* Mode of operation */
908 ret = netwave_get_mode(dev, NULL, &(wrq->u), NULL);
909 break;
910#else /* WIRELESS_EXT > 8 */
911 case SIOCGIWENCODE:
912 /* Get scramble key */
913 ret = netwave_get_scramble(dev, NULL, &(wrq->u),
914 (char *) &wrq->u.encoding.code);
915 break;
916 case SIOCSIWENCODE:
917 /* Set scramble key */
918 ret = netwave_set_scramble(dev, NULL, &(wrq->u),
919 (char *) &wrq->u.encoding.code);
920 break;
921#endif /* WIRELESS_EXT > 8 */
922 case SIOCGIWRANGE:
923 /* Basic checking... */
924 if(wrq->u.data.pointer != (caddr_t) 0) {
925 struct iw_range range;
926 ret = netwave_get_range(dev, NULL, &(wrq->u), (char *) &range);
927 if (copy_to_user(wrq->u.data.pointer, &range,
928 sizeof(struct iw_range)))
929 ret = -EFAULT;
930 }
931 break;
932 case SIOCGIWPRIV:
933 /* Basic checking... */
934 if(wrq->u.data.pointer != (caddr_t) 0) {
935 /* Set the number of ioctl available */
936 wrq->u.data.length = sizeof(netwave_private_args) / sizeof(netwave_private_args[0]);
937
938 /* Copy structure to the user buffer */
939 if(copy_to_user(wrq->u.data.pointer,
940 (u_char *) netwave_private_args,
941 sizeof(netwave_private_args)))
942 ret = -EFAULT;
943 }
944 break;
945 case SIOCGIPSNAP:
946 if(wrq->u.data.pointer != (caddr_t) 0) {
947 char buffer[sizeof( struct site_survey)];
948 ret = netwave_get_snap(dev, NULL, &(wrq->u), buffer);
949 /* Copy structure to the user buffer */
950 if(copy_to_user(wrq->u.data.pointer,
951 buffer,
952 sizeof( struct site_survey)))
953 {
954 printk(KERN_DEBUG "Bad buffer!\n");
955 break;
956 }
957 }
958 break;
959#endif /* WIRELESS_EXT <= 12 */
960#endif /* WIRELESS_EXT */
961 default:
962 ret = -EOPNOTSUPP;
963 }
964
965 return ret;
966}
967 782
968/* 783/*
969 * Function netwave_pcmcia_config (link) 784 * Function netwave_pcmcia_config (link)
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c
index 9a8790e3580c..5c1a1adf1ff8 100644
--- a/drivers/net/wireless/prism54/isl_ioctl.c
+++ b/drivers/net/wireless/prism54/isl_ioctl.c
@@ -462,14 +462,12 @@ prism54_get_range(struct net_device *ndev, struct iw_request_info *info,
462 /* txpower is supported in dBm's */ 462 /* txpower is supported in dBm's */
463 range->txpower_capa = IW_TXPOW_DBM; 463 range->txpower_capa = IW_TXPOW_DBM;
464 464
465#if WIRELESS_EXT > 16
466 /* Event capability (kernel + driver) */ 465 /* Event capability (kernel + driver) */
467 range->event_capa[0] = (IW_EVENT_CAPA_K_0 | 466 range->event_capa[0] = (IW_EVENT_CAPA_K_0 |
468 IW_EVENT_CAPA_MASK(SIOCGIWTHRSPY) | 467 IW_EVENT_CAPA_MASK(SIOCGIWTHRSPY) |
469 IW_EVENT_CAPA_MASK(SIOCGIWAP)); 468 IW_EVENT_CAPA_MASK(SIOCGIWAP));
470 range->event_capa[1] = IW_EVENT_CAPA_K_1; 469 range->event_capa[1] = IW_EVENT_CAPA_K_1;
471 range->event_capa[4] = IW_EVENT_CAPA_MASK(IWEVCUSTOM); 470 range->event_capa[4] = IW_EVENT_CAPA_MASK(IWEVCUSTOM);
472#endif /* WIRELESS_EXT > 16 */
473 471
474 if (islpci_get_state(priv) < PRV_STATE_INIT) 472 if (islpci_get_state(priv) < PRV_STATE_INIT)
475 return 0; 473 return 0;
@@ -693,14 +691,13 @@ prism54_get_scan(struct net_device *ndev, struct iw_request_info *info,
693 extra + dwrq->length, 691 extra + dwrq->length,
694 &(bsslist->bsslist[i]), 692 &(bsslist->bsslist[i]),
695 noise); 693 noise);
696#if WIRELESS_EXT > 16 694
697 /* Check if there is space for one more entry */ 695 /* Check if there is space for one more entry */
698 if((extra + dwrq->length - current_ev) <= IW_EV_ADDR_LEN) { 696 if((extra + dwrq->length - current_ev) <= IW_EV_ADDR_LEN) {
699 /* Ask user space to try again with a bigger buffer */ 697 /* Ask user space to try again with a bigger buffer */
700 rvalue = -E2BIG; 698 rvalue = -E2BIG;
701 break; 699 break;
702 } 700 }
703#endif /* WIRELESS_EXT > 16 */
704 } 701 }
705 702
706 kfree(bsslist); 703 kfree(bsslist);
@@ -2727,12 +2724,7 @@ const struct iw_handler_def prism54_handler_def = {
2727 .standard = (iw_handler *) prism54_handler, 2724 .standard = (iw_handler *) prism54_handler,
2728 .private = (iw_handler *) prism54_private_handler, 2725 .private = (iw_handler *) prism54_private_handler,
2729 .private_args = (struct iw_priv_args *) prism54_private_args, 2726 .private_args = (struct iw_priv_args *) prism54_private_args,
2730#if WIRELESS_EXT > 16
2731 .get_wireless_stats = prism54_get_wireless_stats, 2727 .get_wireless_stats = prism54_get_wireless_stats,
2732#endif /* WIRELESS_EXT > 16 */
2733#if WIRELESS_EXT == 16
2734 .spy_offset = offsetof(islpci_private, spy_data),
2735#endif /* WIRELESS_EXT == 16 */
2736}; 2728};
2737 2729
2738/* For wpa_supplicant */ 2730/* For wpa_supplicant */
diff --git a/drivers/net/wireless/prism54/islpci_dev.c b/drivers/net/wireless/prism54/islpci_dev.c
index 10cce514c15d..6c9584a9f284 100644
--- a/drivers/net/wireless/prism54/islpci_dev.c
+++ b/drivers/net/wireless/prism54/islpci_dev.c
@@ -837,13 +837,9 @@ islpci_setup(struct pci_dev *pdev)
837 priv->ndev->type = (priv->iw_mode == IW_MODE_MONITOR) ? 837 priv->ndev->type = (priv->iw_mode == IW_MODE_MONITOR) ?
838 priv->monitor_type : ARPHRD_ETHER; 838 priv->monitor_type : ARPHRD_ETHER;
839 839
840#if WIRELESS_EXT > 16
841 /* Add pointers to enable iwspy support. */ 840 /* Add pointers to enable iwspy support. */
842 priv->wireless_data.spy_data = &priv->spy_data; 841 priv->wireless_data.spy_data = &priv->spy_data;
843 ndev->wireless_data = &priv->wireless_data; 842 ndev->wireless_data = &priv->wireless_data;
844#else /* WIRELESS_EXT > 16 */
845 ndev->get_wireless_stats = &prism54_get_wireless_stats;
846#endif /* WIRELESS_EXT > 16 */
847 843
848 /* save the start and end address of the PCI memory area */ 844 /* save the start and end address of the PCI memory area */
849 ndev->mem_start = (unsigned long) priv->device_base; 845 ndev->mem_start = (unsigned long) priv->device_base;
diff --git a/drivers/net/wireless/prism54/islpci_dev.h b/drivers/net/wireless/prism54/islpci_dev.h
index 32a1019f1b36..efbed4397951 100644
--- a/drivers/net/wireless/prism54/islpci_dev.h
+++ b/drivers/net/wireless/prism54/islpci_dev.h
@@ -100,9 +100,7 @@ typedef struct {
100 100
101 struct iw_spy_data spy_data; /* iwspy support */ 101 struct iw_spy_data spy_data; /* iwspy support */
102 102
103#if WIRELESS_EXT > 16
104 struct iw_public_data wireless_data; 103 struct iw_public_data wireless_data;
105#endif /* WIRELESS_EXT > 16 */
106 104
107 int monitor_type; /* ARPHRD_IEEE80211 or ARPHRD_IEEE80211_PRISM */ 105 int monitor_type; /* ARPHRD_IEEE80211 or ARPHRD_IEEE80211_PRISM */
108 106
diff --git a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c
index 7a5e20a17890..b0d8b5b03152 100644
--- a/drivers/net/wireless/wavelan.c
+++ b/drivers/net/wireless/wavelan.c
@@ -430,7 +430,6 @@ static void fee_read(unsigned long ioaddr, /* I/O port of the card */
430 } 430 }
431} 431}
432 432
433#ifdef WIRELESS_EXT /* if the wireless extension exists in the kernel */
434 433
435/*------------------------------------------------------------------*/ 434/*------------------------------------------------------------------*/
436/* 435/*
@@ -514,7 +513,6 @@ static void fee_write(unsigned long ioaddr, /* I/O port of the card */
514 fee_wait(ioaddr, 10, 100); 513 fee_wait(ioaddr, 10, 100);
515#endif /* EEPROM_IS_PROTECTED */ 514#endif /* EEPROM_IS_PROTECTED */
516} 515}
517#endif /* WIRELESS_EXT */
518 516
519/************************ I82586 SUBROUTINES *************************/ 517/************************ I82586 SUBROUTINES *************************/
520/* 518/*
@@ -973,11 +971,9 @@ static void wv_mmc_show(struct net_device * dev)
973 mmc_read(ioaddr, 0, (u8 *) & m, sizeof(m)); 971 mmc_read(ioaddr, 0, (u8 *) & m, sizeof(m));
974 mmc_out(ioaddr, mmwoff(0, mmw_freeze), 0); 972 mmc_out(ioaddr, mmwoff(0, mmw_freeze), 0);
975 973
976#ifdef WIRELESS_EXT /* if wireless extension exists in the kernel */
977 /* Don't forget to update statistics */ 974 /* Don't forget to update statistics */
978 lp->wstats.discard.nwid += 975 lp->wstats.discard.nwid +=
979 (m.mmr_wrong_nwid_h << 8) | m.mmr_wrong_nwid_l; 976 (m.mmr_wrong_nwid_h << 8) | m.mmr_wrong_nwid_l;
980#endif /* WIRELESS_EXT */
981 977
982 printk(KERN_DEBUG "##### WaveLAN modem status registers: #####\n"); 978 printk(KERN_DEBUG "##### WaveLAN modem status registers: #####\n");
983#ifdef DEBUG_SHOW_UNUSED 979#ifdef DEBUG_SHOW_UNUSED
@@ -1499,7 +1495,6 @@ static int wavelan_set_mac_address(struct net_device * dev, void *addr)
1499} 1495}
1500#endif /* SET_MAC_ADDRESS */ 1496#endif /* SET_MAC_ADDRESS */
1501 1497
1502#ifdef WIRELESS_EXT /* if wireless extensions exist in the kernel */
1503 1498
1504/*------------------------------------------------------------------*/ 1499/*------------------------------------------------------------------*/
1505/* 1500/*
@@ -2473,7 +2468,6 @@ static iw_stats *wavelan_get_wireless_stats(struct net_device * dev)
2473#endif 2468#endif
2474 return &lp->wstats; 2469 return &lp->wstats;
2475} 2470}
2476#endif /* WIRELESS_EXT */
2477 2471
2478/************************* PACKET RECEPTION *************************/ 2472/************************* PACKET RECEPTION *************************/
2479/* 2473/*
@@ -4194,11 +4188,9 @@ static int __init wavelan_config(struct net_device *dev, unsigned short ioaddr)
4194 dev->set_mac_address = &wavelan_set_mac_address; 4188 dev->set_mac_address = &wavelan_set_mac_address;
4195#endif /* SET_MAC_ADDRESS */ 4189#endif /* SET_MAC_ADDRESS */
4196 4190
4197#ifdef WIRELESS_EXT /* if wireless extension exists in the kernel */
4198 dev->wireless_handlers = &wavelan_handler_def; 4191 dev->wireless_handlers = &wavelan_handler_def;
4199 lp->wireless_data.spy_data = &lp->spy_data; 4192 lp->wireless_data.spy_data = &lp->spy_data;
4200 dev->wireless_data = &lp->wireless_data; 4193 dev->wireless_data = &lp->wireless_data;
4201#endif
4202 4194
4203 dev->mtu = WAVELAN_MTU; 4195 dev->mtu = WAVELAN_MTU;
4204 4196
diff --git a/drivers/net/wireless/wavelan.p.h b/drivers/net/wireless/wavelan.p.h
index 509ff22a6caa..166e28b9a4f7 100644
--- a/drivers/net/wireless/wavelan.p.h
+++ b/drivers/net/wireless/wavelan.p.h
@@ -409,11 +409,9 @@
409#define MULTICAST_AVOID /* Avoid extra multicast (I'm sceptical). */ 409#define MULTICAST_AVOID /* Avoid extra multicast (I'm sceptical). */
410#undef SET_MAC_ADDRESS /* Experimental */ 410#undef SET_MAC_ADDRESS /* Experimental */
411 411
412#ifdef WIRELESS_EXT /* If wireless extensions exist in the kernel */
413/* Warning: this stuff will slow down the driver. */ 412/* Warning: this stuff will slow down the driver. */
414#define WIRELESS_SPY /* Enable spying addresses. */ 413#define WIRELESS_SPY /* Enable spying addresses. */
415#undef HISTOGRAM /* Enable histogram of signal level. */ 414#undef HISTOGRAM /* Enable histogram of signal level. */
416#endif
417 415
418/****************************** DEBUG ******************************/ 416/****************************** DEBUG ******************************/
419 417
@@ -506,12 +504,10 @@ struct net_local
506 u_short tx_first_free; 504 u_short tx_first_free;
507 u_short tx_first_in_use; 505 u_short tx_first_in_use;
508 506
509#ifdef WIRELESS_EXT
510 iw_stats wstats; /* Wireless-specific statistics */ 507 iw_stats wstats; /* Wireless-specific statistics */
511 508
512 struct iw_spy_data spy_data; 509 struct iw_spy_data spy_data;
513 struct iw_public_data wireless_data; 510 struct iw_public_data wireless_data;
514#endif
515 511
516#ifdef HISTOGRAM 512#ifdef HISTOGRAM
517 int his_number; /* number of intervals */ 513 int his_number; /* number of intervals */
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c
index 183c4732ef65..4b3c98f5c564 100644
--- a/drivers/net/wireless/wavelan_cs.c
+++ b/drivers/net/wireless/wavelan_cs.c
@@ -415,7 +415,6 @@ fee_read(u_long base, /* i/o port of the card */
415 } 415 }
416} 416}
417 417
418#ifdef WIRELESS_EXT /* If wireless extension exist in the kernel */
419 418
420/*------------------------------------------------------------------*/ 419/*------------------------------------------------------------------*/
421/* 420/*
@@ -500,7 +499,6 @@ fee_write(u_long base, /* i/o port of the card */
500 fee_wait(base, 10, 100); 499 fee_wait(base, 10, 100);
501#endif /* EEPROM_IS_PROTECTED */ 500#endif /* EEPROM_IS_PROTECTED */
502} 501}
503#endif /* WIRELESS_EXT */
504 502
505/******************* WaveLAN Roaming routines... ********************/ 503/******************* WaveLAN Roaming routines... ********************/
506 504
@@ -1161,10 +1159,8 @@ wv_mmc_show(struct net_device * dev)
1161 mmc_read(base, 0, (u_char *)&m, sizeof(m)); 1159 mmc_read(base, 0, (u_char *)&m, sizeof(m));
1162 mmc_out(base, mmwoff(0, mmw_freeze), 0); 1160 mmc_out(base, mmwoff(0, mmw_freeze), 0);
1163 1161
1164#ifdef WIRELESS_EXT /* If wireless extension exist in the kernel */
1165 /* Don't forget to update statistics */ 1162 /* Don't forget to update statistics */
1166 lp->wstats.discard.nwid += (m.mmr_wrong_nwid_h << 8) | m.mmr_wrong_nwid_l; 1163 lp->wstats.discard.nwid += (m.mmr_wrong_nwid_h << 8) | m.mmr_wrong_nwid_l;
1167#endif /* WIRELESS_EXT */
1168 1164
1169 spin_unlock_irqrestore(&lp->spinlock, flags); 1165 spin_unlock_irqrestore(&lp->spinlock, flags);
1170 1166
@@ -1550,7 +1546,6 @@ wavelan_set_mac_address(struct net_device * dev,
1550} 1546}
1551#endif /* SET_MAC_ADDRESS */ 1547#endif /* SET_MAC_ADDRESS */
1552 1548
1553#ifdef WIRELESS_EXT /* If wireless extension exist in the kernel */
1554 1549
1555/*------------------------------------------------------------------*/ 1550/*------------------------------------------------------------------*/
1556/* 1551/*
@@ -2793,7 +2788,6 @@ wavelan_get_wireless_stats(struct net_device * dev)
2793#endif 2788#endif
2794 return &lp->wstats; 2789 return &lp->wstats;
2795} 2790}
2796#endif /* WIRELESS_EXT */
2797 2791
2798/************************* PACKET RECEPTION *************************/ 2792/************************* PACKET RECEPTION *************************/
2799/* 2793/*
@@ -4679,11 +4673,9 @@ wavelan_attach(void)
4679 dev->watchdog_timeo = WATCHDOG_JIFFIES; 4673 dev->watchdog_timeo = WATCHDOG_JIFFIES;
4680 SET_ETHTOOL_OPS(dev, &ops); 4674 SET_ETHTOOL_OPS(dev, &ops);
4681 4675
4682#ifdef WIRELESS_EXT /* If wireless extension exist in the kernel */
4683 dev->wireless_handlers = &wavelan_handler_def; 4676 dev->wireless_handlers = &wavelan_handler_def;
4684 lp->wireless_data.spy_data = &lp->spy_data; 4677 lp->wireless_data.spy_data = &lp->spy_data;
4685 dev->wireless_data = &lp->wireless_data; 4678 dev->wireless_data = &lp->wireless_data;
4686#endif
4687 4679
4688 /* Other specific data */ 4680 /* Other specific data */
4689 dev->mtu = WAVELAN_MTU; 4681 dev->mtu = WAVELAN_MTU;
diff --git a/drivers/net/wireless/wavelan_cs.p.h b/drivers/net/wireless/wavelan_cs.p.h
index 01d882be8790..724a715089c9 100644
--- a/drivers/net/wireless/wavelan_cs.p.h
+++ b/drivers/net/wireless/wavelan_cs.p.h
@@ -472,11 +472,9 @@
472#define MULTICAST_AVOID /* Avoid extra multicast (I'm sceptical) */ 472#define MULTICAST_AVOID /* Avoid extra multicast (I'm sceptical) */
473#undef SET_MAC_ADDRESS /* Experimental */ 473#undef SET_MAC_ADDRESS /* Experimental */
474 474
475#ifdef WIRELESS_EXT /* If wireless extension exist in the kernel */
476/* Warning : these stuff will slow down the driver... */ 475/* Warning : these stuff will slow down the driver... */
477#define WIRELESS_SPY /* Enable spying addresses */ 476#define WIRELESS_SPY /* Enable spying addresses */
478#undef HISTOGRAM /* Enable histogram of sig level... */ 477#undef HISTOGRAM /* Enable histogram of sig level... */
479#endif
480 478
481/****************************** DEBUG ******************************/ 479/****************************** DEBUG ******************************/
482 480
@@ -624,12 +622,10 @@ struct net_local
624 int rfp; /* Last DMA machine receive pointer */ 622 int rfp; /* Last DMA machine receive pointer */
625 int overrunning; /* Receiver overrun flag */ 623 int overrunning; /* Receiver overrun flag */
626 624
627#ifdef WIRELESS_EXT
628 iw_stats wstats; /* Wireless specific stats */ 625 iw_stats wstats; /* Wireless specific stats */
629 626
630 struct iw_spy_data spy_data; 627 struct iw_spy_data spy_data;
631 struct iw_public_data wireless_data; 628 struct iw_public_data wireless_data;
632#endif
633 629
634#ifdef HISTOGRAM 630#ifdef HISTOGRAM
635 int his_number; /* Number of intervals */ 631 int his_number; /* Number of intervals */