]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
cfg80211: self-contained wext handling where possible
authorJohannes Berg <johannes@sipsolutions.net>
Mon, 27 Jul 2009 10:01:53 +0000 (12:01 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 29 Jul 2009 19:46:20 +0000 (15:46 -0400)
Finally! This is what you've all been waiting for!

This patch makes cfg80211 take care of wext emulation
_completely_ by itself, drivers that don't need things
cfg80211 doesn't do yet don't even need to be aware of
wireless extensions.
This means we can also clean up mac80211's and iwm's
Kconfig and make it possible to build them w/o wext
now!

RIP wext.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 files changed:
drivers/net/wireless/iwmc3200wifi/Kconfig
drivers/net/wireless/iwmc3200wifi/Makefile
drivers/net/wireless/iwmc3200wifi/iwm.h
drivers/net/wireless/iwmc3200wifi/netdev.c
drivers/net/wireless/iwmc3200wifi/wext.c [deleted file]
net/mac80211/Kconfig
net/mac80211/Makefile
net/mac80211/ieee80211_i.h
net/mac80211/iface.c
net/mac80211/scan.c
net/mac80211/wext.c [deleted file]
net/wireless/core.c
net/wireless/mlme.c
net/wireless/scan.c
net/wireless/sme.c
net/wireless/wext-compat.c
net/wireless/wext-compat.h

index 030401d367d30aa7b82a894464fc2d973556fcef..c62da435285a26e2a29525200a799aa8e47f65e8 100644 (file)
@@ -2,7 +2,6 @@ config IWM
        tristate "Intel Wireless Multicomm 3200 WiFi driver"
        depends on MMC && WLAN_80211 && EXPERIMENTAL
        depends on CFG80211
-       select WIRELESS_EXT
        select FW_LOADER
        help
          The Intel Wireless Multicomm 3200 hardware is a combo
index 927f022545c126bee71c35262a5b9d7852c0179b..d34291b652d31e38c1c426839ae144435fc18867 100644 (file)
@@ -1,5 +1,5 @@
 obj-$(CONFIG_IWM) := iwmc3200wifi.o
 iwmc3200wifi-objs += main.o netdev.o rx.o tx.o sdio.o hal.o fw.o
-iwmc3200wifi-objs += commands.o wext.o cfg80211.o eeprom.o
+iwmc3200wifi-objs += commands.o cfg80211.o eeprom.o
 
 iwmc3200wifi-$(CONFIG_IWM_DEBUG) += debugfs.o
index 2175a481d2f4bd2885d843ec90351a3ef1b46584..7a51bc340fdaa57e93f468c60ae90b34a19a39ce 100644 (file)
@@ -306,8 +306,6 @@ static inline void *iwm_private(struct iwm_priv *iwm)
 #define skb_to_rx_info(s) ((struct iwm_rx_info *)(s->cb))
 #define skb_to_tx_info(s) ((struct iwm_tx_info *)s->cb)
 
-extern const struct iw_handler_def iwm_iw_handler_def;
-
 void *iwm_if_alloc(int sizeof_bus, struct device *dev,
                   struct iwm_if_ops *if_ops);
 void iwm_if_free(struct iwm_priv *iwm);
index 092d28ae56a070c0c0f14fa6cc5f87d109bd622c..30116d1b44894772ffdf08dafd0d62a1842d1eb4 100644 (file)
@@ -123,7 +123,6 @@ void *iwm_if_alloc(int sizeof_bus, struct device *dev,
        }
 
        ndev->netdev_ops = &iwm_netdev_ops;
-       ndev->wireless_handlers = &iwm_iw_handler_def;
        ndev->ieee80211_ptr = wdev;
        SET_NETDEV_DEV(ndev, wiphy_dev(wdev->wiphy));
        wdev->netdev = ndev;
diff --git a/drivers/net/wireless/iwmc3200wifi/wext.c b/drivers/net/wireless/iwmc3200wifi/wext.c
deleted file mode 100644 (file)
index 9196024..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Intel Wireless Multicomm 3200 WiFi driver
- *
- * Copyright (C) 2009 Intel Corporation <ilw@linux.intel.com>
- * Samuel Ortiz <samuel.ortiz@intel.com>
- * Zhu Yi <yi.zhu@intel.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License version
- * 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- *
- */
-
-#include <linux/wireless.h>
-#include <net/cfg80211.h>
-
-#include "iwm.h"
-#include "commands.h"
-
-static const iw_handler iwm_handlers[] =
-{
-       (iw_handler) NULL,                              /* SIOCSIWCOMMIT */
-       (iw_handler) cfg80211_wext_giwname,             /* SIOCGIWNAME */
-       (iw_handler) NULL,                              /* SIOCSIWNWID */
-       (iw_handler) NULL,                              /* SIOCGIWNWID */
-       (iw_handler) cfg80211_wext_siwfreq,             /* SIOCSIWFREQ */
-       (iw_handler) cfg80211_wext_giwfreq,             /* SIOCGIWFREQ */
-       (iw_handler) cfg80211_wext_siwmode,             /* SIOCSIWMODE */
-       (iw_handler) cfg80211_wext_giwmode,             /* SIOCGIWMODE */
-       (iw_handler) NULL,                              /* SIOCSIWSENS */
-       (iw_handler) NULL,                              /* SIOCGIWSENS */
-       (iw_handler) NULL /* not used */,               /* SIOCSIWRANGE */
-       (iw_handler) cfg80211_wext_giwrange,            /* SIOCGIWRANGE */
-       (iw_handler) NULL /* not used */,               /* SIOCSIWPRIV */
-       (iw_handler) NULL /* kernel code */,            /* SIOCGIWPRIV */
-       (iw_handler) NULL /* not used */,               /* SIOCSIWSTATS */
-       (iw_handler) NULL /* kernel code */,            /* SIOCGIWSTATS */
-       (iw_handler) NULL,                              /* SIOCSIWSPY */
-       (iw_handler) NULL,                              /* SIOCGIWSPY */
-       (iw_handler) NULL,                              /* SIOCSIWTHRSPY */
-       (iw_handler) NULL,                              /* SIOCGIWTHRSPY */
-       (iw_handler) cfg80211_wext_siwap,               /* SIOCSIWAP */
-       (iw_handler) cfg80211_wext_giwap,               /* SIOCGIWAP */
-       (iw_handler) NULL,                              /* SIOCSIWMLME */
-       (iw_handler) NULL,                              /* SIOCGIWAPLIST */
-       (iw_handler) cfg80211_wext_siwscan,             /* SIOCSIWSCAN */
-       (iw_handler) cfg80211_wext_giwscan,             /* SIOCGIWSCAN */
-       (iw_handler) cfg80211_wext_siwessid,            /* SIOCSIWESSID */
-       (iw_handler) cfg80211_wext_giwessid,            /* SIOCGIWESSID */
-       (iw_handler) NULL,                              /* SIOCSIWNICKN */
-       (iw_handler) NULL,                              /* SIOCGIWNICKN */
-       (iw_handler) NULL,                              /* -- hole -- */
-       (iw_handler) NULL,                              /* -- hole -- */
-       (iw_handler) NULL,                              /* SIOCSIWRATE */
-       (iw_handler) cfg80211_wext_giwrate,             /* SIOCGIWRATE */
-       (iw_handler) cfg80211_wext_siwrts,              /* SIOCSIWRTS */
-       (iw_handler) cfg80211_wext_giwrts,              /* SIOCGIWRTS */
-       (iw_handler) cfg80211_wext_siwfrag,             /* SIOCSIWFRAG */
-       (iw_handler) cfg80211_wext_giwfrag,             /* SIOCGIWFRAG */
-       (iw_handler) cfg80211_wext_siwtxpower,          /* SIOCSIWTXPOW */
-       (iw_handler) cfg80211_wext_giwtxpower,          /* SIOCGIWTXPOW */
-       (iw_handler) NULL,                              /* SIOCSIWRETRY */
-       (iw_handler) NULL,                              /* SIOCGIWRETRY */
-       (iw_handler) cfg80211_wext_siwencode,           /* SIOCSIWENCODE */
-       (iw_handler) cfg80211_wext_giwencode,           /* SIOCGIWENCODE */
-       (iw_handler) cfg80211_wext_siwpower,            /* SIOCSIWPOWER */
-       (iw_handler) cfg80211_wext_giwpower,            /* SIOCGIWPOWER */
-       (iw_handler) NULL,                              /* -- hole -- */
-       (iw_handler) NULL,                              /* -- hole -- */
-       (iw_handler) cfg80211_wext_siwgenie,            /* SIOCSIWGENIE */
-       (iw_handler) NULL,                              /* SIOCGIWGENIE */
-       (iw_handler) cfg80211_wext_siwauth,             /* SIOCSIWAUTH */
-       (iw_handler) cfg80211_wext_giwauth,             /* SIOCGIWAUTH */
-       (iw_handler) cfg80211_wext_siwencodeext,        /* SIOCSIWENCODEEXT */
-       (iw_handler) NULL,                              /* SIOCGIWENCODEEXT */
-       (iw_handler) NULL,                              /* SIOCSIWPMKSA */
-       (iw_handler) NULL,                              /* -- hole -- */
-};
-
-const struct iw_handler_def iwm_iw_handler_def = {
-       .num_standard   = ARRAY_SIZE(iwm_handlers),
-       .standard       = (iw_handler *) iwm_handlers,
-       .get_wireless_stats = cfg80211_wireless_stats,
-};
-
index 19a4c66e143e1198d8e603871e4c5d5e04a3d306..7dd77b6d4c9a4338b4d3b3aa1c8b1ca111060831 100644 (file)
@@ -6,7 +6,6 @@ config MAC80211
        select CRYPTO_ARC4
        select CRYPTO_AES
        select CRC32
-       select WIRELESS_EXT
        ---help---
          This option enables the hardware independent IEEE 802.11
          networking stack.
index 91284a74ff91ecbb2f60c280a4c9fd86ac2d87b5..9f3cf71293249610f0dba5f53c673ac7659a578c 100644 (file)
@@ -3,7 +3,6 @@ obj-$(CONFIG_MAC80211) += mac80211.o
 # mac80211 objects
 mac80211-y := \
        main.o \
-       wext.o \
        sta_info.o \
        wep.o \
        wpa.o \
index c6b25cb7328436dba0bdfa835d320f29e13307c6..aec6853cb435b272d07d35587e1da7a46a11cf24 100644 (file)
@@ -24,7 +24,6 @@
 #include <linux/spinlock.h>
 #include <linux/etherdevice.h>
 #include <net/cfg80211.h>
-#include <net/iw_handler.h>
 #include <net/mac80211.h>
 #include "key.h"
 #include "sta_info.h"
@@ -951,9 +950,6 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
 void ieee80211_configure_filter(struct ieee80211_local *local);
 u32 ieee80211_reset_erp_info(struct ieee80211_sub_if_data *sdata);
 
-/* wireless extensions */
-extern const struct iw_handler_def ieee80211_iw_handler_def;
-
 /* STA code */
 void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata);
 int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,
index d79a211050424bb51b86089270da4086c8f41506..6c655b6547fb7ec5eb71a7cb933eca5a545bab93 100644 (file)
@@ -684,7 +684,6 @@ static void ieee80211_if_setup(struct net_device *dev)
 {
        ether_setup(dev);
        dev->netdev_ops = &ieee80211_dataif_ops;
-       dev->wireless_handlers = &ieee80211_iw_handler_def;
        dev->destructor = free_netdev;
 }
 
index 147772a2977cf1b23434e3865ab260fc4331f8af..45731000eb8d3b9646c9ba4cf878dda30cd858a8 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/if_arp.h>
 #include <linux/rtnetlink.h>
 #include <net/mac80211.h>
-#include <net/iw_handler.h>
 
 #include "ieee80211_i.h"
 #include "driver-ops.h"
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
deleted file mode 100644 (file)
index aa250c3..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright 2002-2005, Instant802 Networks, Inc.
- * Copyright 2005-2006, Devicescape Software, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/netdevice.h>
-#include <linux/types.h>
-#include <linux/slab.h>
-#include <linux/skbuff.h>
-#include <linux/etherdevice.h>
-#include <linux/if_arp.h>
-#include <linux/wireless.h>
-#include <net/iw_handler.h>
-#include <asm/uaccess.h>
-
-#include <net/mac80211.h>
-#include "ieee80211_i.h"
-#include "led.h"
-#include "rate.h"
-#include "wpa.h"
-#include "aes_ccm.h"
-
-
-
-/* Structures to export the Wireless Handlers */
-
-static const iw_handler ieee80211_handler[] =
-{
-       (iw_handler) NULL,                              /* SIOCSIWCOMMIT */
-       (iw_handler) cfg80211_wext_giwname,             /* SIOCGIWNAME */
-       (iw_handler) NULL,                              /* SIOCSIWNWID */
-       (iw_handler) NULL,                              /* SIOCGIWNWID */
-       (iw_handler) cfg80211_wext_siwfreq,             /* SIOCSIWFREQ */
-       (iw_handler) cfg80211_wext_giwfreq,             /* SIOCGIWFREQ */
-       (iw_handler) cfg80211_wext_siwmode,             /* SIOCSIWMODE */
-       (iw_handler) cfg80211_wext_giwmode,             /* SIOCGIWMODE */
-       (iw_handler) NULL,                              /* SIOCSIWSENS */
-       (iw_handler) NULL,                              /* SIOCGIWSENS */
-       (iw_handler) NULL /* not used */,               /* SIOCSIWRANGE */
-       (iw_handler) cfg80211_wext_giwrange,            /* SIOCGIWRANGE */
-       (iw_handler) NULL /* not used */,               /* SIOCSIWPRIV */
-       (iw_handler) NULL /* kernel code */,            /* SIOCGIWPRIV */
-       (iw_handler) NULL /* not used */,               /* SIOCSIWSTATS */
-       (iw_handler) NULL /* kernel code */,            /* SIOCGIWSTATS */
-       (iw_handler) NULL,                              /* SIOCSIWSPY */
-       (iw_handler) NULL,                              /* SIOCGIWSPY */
-       (iw_handler) NULL,                              /* SIOCSIWTHRSPY */
-       (iw_handler) NULL,                              /* SIOCGIWTHRSPY */
-       (iw_handler) cfg80211_wext_siwap,               /* SIOCSIWAP */
-       (iw_handler) cfg80211_wext_giwap,               /* SIOCGIWAP */
-       (iw_handler) cfg80211_wext_siwmlme,             /* SIOCSIWMLME */
-       (iw_handler) NULL,                              /* SIOCGIWAPLIST */
-       (iw_handler) cfg80211_wext_siwscan,             /* SIOCSIWSCAN */
-       (iw_handler) cfg80211_wext_giwscan,             /* SIOCGIWSCAN */
-       (iw_handler) cfg80211_wext_siwessid,            /* SIOCSIWESSID */
-       (iw_handler) cfg80211_wext_giwessid,            /* SIOCGIWESSID */
-       (iw_handler) NULL,                              /* SIOCSIWNICKN */
-       (iw_handler) NULL,                              /* SIOCGIWNICKN */
-       (iw_handler) NULL,                              /* -- hole -- */
-       (iw_handler) NULL,                              /* -- hole -- */
-       (iw_handler) cfg80211_wext_siwrate,             /* SIOCSIWRATE */
-       (iw_handler) cfg80211_wext_giwrate,             /* SIOCGIWRATE */
-       (iw_handler) cfg80211_wext_siwrts,              /* SIOCSIWRTS */
-       (iw_handler) cfg80211_wext_giwrts,              /* SIOCGIWRTS */
-       (iw_handler) cfg80211_wext_siwfrag,             /* SIOCSIWFRAG */
-       (iw_handler) cfg80211_wext_giwfrag,             /* SIOCGIWFRAG */
-       (iw_handler) cfg80211_wext_siwtxpower,          /* SIOCSIWTXPOW */
-       (iw_handler) cfg80211_wext_giwtxpower,          /* SIOCGIWTXPOW */
-       (iw_handler) cfg80211_wext_siwretry,            /* SIOCSIWRETRY */
-       (iw_handler) cfg80211_wext_giwretry,            /* SIOCGIWRETRY */
-       (iw_handler) cfg80211_wext_siwencode,           /* SIOCSIWENCODE */
-       (iw_handler) cfg80211_wext_giwencode,           /* SIOCGIWENCODE */
-       (iw_handler) cfg80211_wext_siwpower,            /* SIOCSIWPOWER */
-       (iw_handler) cfg80211_wext_giwpower,            /* SIOCGIWPOWER */
-       (iw_handler) NULL,                              /* -- hole -- */
-       (iw_handler) NULL,                              /* -- hole -- */
-       (iw_handler) cfg80211_wext_siwgenie,            /* SIOCSIWGENIE */
-       (iw_handler) NULL,                              /* SIOCGIWGENIE */
-       (iw_handler) cfg80211_wext_siwauth,             /* SIOCSIWAUTH */
-       (iw_handler) cfg80211_wext_giwauth,             /* SIOCGIWAUTH */
-       (iw_handler) cfg80211_wext_siwencodeext,        /* SIOCSIWENCODEEXT */
-       (iw_handler) NULL,                              /* SIOCGIWENCODEEXT */
-       (iw_handler) NULL,                              /* SIOCSIWPMKSA */
-       (iw_handler) NULL,                              /* -- hole -- */
-};
-
-const struct iw_handler_def ieee80211_iw_handler_def =
-{
-       .num_standard   = ARRAY_SIZE(ieee80211_handler),
-       .standard       = (iw_handler *) ieee80211_handler,
-       .get_wireless_stats = cfg80211_wireless_stats,
-};
index 442c9f38979942da0a6b399a117c1e30250f3938..f9fee65dc06a12a55114179ff3e067d04e730725 100644 (file)
@@ -19,6 +19,7 @@
 #include "core.h"
 #include "sysfs.h"
 #include "debugfs.h"
+#include "wext-compat.h"
 
 /* name for sysfs, %d is appended */
 #define PHY_NAME "phy"
@@ -665,6 +666,8 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
                wdev->sme_state = CFG80211_SME_IDLE;
                mutex_unlock(&rdev->devlist_mtx);
 #ifdef CONFIG_WIRELESS_EXT
+               if (!dev->wireless_handlers)
+                       dev->wireless_handlers = &cfg80211_wext_handler;
                wdev->wext.default_key = -1;
                wdev->wext.default_mgmt_key = -1;
                wdev->wext.connect.auth_type = NL80211_AUTHTYPE_AUTOMATIC;
index 30058a80d7af89d1e4e170c4c385d17dc553b559..097a87d7bae14d222d2d36e76bd32d821de912c4 100644 (file)
@@ -8,7 +8,9 @@
 #include <linux/module.h>
 #include <linux/netdevice.h>
 #include <linux/nl80211.h>
+#include <linux/wireless.h>
 #include <net/cfg80211.h>
+#include <net/iw_handler.h>
 #include "core.h"
 #include "nl80211.h"
 
index 2a2683f6c04a31de48be959cc58070a8999a7646..67714d7ed5b4a263253b69d903ea7401ee990126 100644 (file)
@@ -14,6 +14,7 @@
 #include <net/iw_handler.h>
 #include "core.h"
 #include "nl80211.h"
+#include "wext-compat.h"
 
 #define IEEE80211_SCAN_RESULT_EXPIRE   (15 * HZ)
 
index a19741097989dcb8c413b80187c511a7b55c8ea3..d2b5d4ce0a0085cd2770b8eb18170154b47cd2fe 100644 (file)
@@ -8,6 +8,8 @@
 #include <linux/etherdevice.h>
 #include <linux/if_arp.h>
 #include <linux/workqueue.h>
+#include <linux/wireless.h>
+#include <net/iw_handler.h>
 #include <net/cfg80211.h>
 #include <net/rtnetlink.h>
 #include "nl80211.h"
index 083e4c33d95d9ced3327b0679d41bc84a05c545a..e4e90e249bab12a1fc0d6317cf356518b9b1428a 100644 (file)
@@ -1397,3 +1397,43 @@ int cfg80211_wext_giwessid(struct net_device *dev,
        }
 }
 EXPORT_SYMBOL_GPL(cfg80211_wext_giwessid);
+
+static const iw_handler cfg80211_handlers[] = {
+       [IW_IOCTL_IDX(SIOCGIWNAME)]     = (iw_handler) cfg80211_wext_giwname,
+       [IW_IOCTL_IDX(SIOCSIWFREQ)]     = (iw_handler) cfg80211_wext_siwfreq,
+       [IW_IOCTL_IDX(SIOCGIWFREQ)]     = (iw_handler) cfg80211_wext_giwfreq,
+       [IW_IOCTL_IDX(SIOCSIWMODE)]     = (iw_handler) cfg80211_wext_siwmode,
+       [IW_IOCTL_IDX(SIOCGIWMODE)]     = (iw_handler) cfg80211_wext_giwmode,
+       [IW_IOCTL_IDX(SIOCGIWRANGE)]    = (iw_handler) cfg80211_wext_giwrange,
+       [IW_IOCTL_IDX(SIOCSIWAP)]       = (iw_handler) cfg80211_wext_siwap,
+       [IW_IOCTL_IDX(SIOCGIWAP)]       = (iw_handler) cfg80211_wext_giwap,
+       [IW_IOCTL_IDX(SIOCSIWMLME)]     = (iw_handler) cfg80211_wext_siwmlme,
+       [IW_IOCTL_IDX(SIOCSIWSCAN)]     = (iw_handler) cfg80211_wext_siwscan,
+       [IW_IOCTL_IDX(SIOCGIWSCAN)]     = (iw_handler) cfg80211_wext_giwscan,
+       [IW_IOCTL_IDX(SIOCSIWESSID)]    = (iw_handler) cfg80211_wext_siwessid,
+       [IW_IOCTL_IDX(SIOCGIWESSID)]    = (iw_handler) cfg80211_wext_giwessid,
+       [IW_IOCTL_IDX(SIOCSIWRATE)]     = (iw_handler) cfg80211_wext_siwrate,
+       [IW_IOCTL_IDX(SIOCGIWRATE)]     = (iw_handler) cfg80211_wext_giwrate,
+       [IW_IOCTL_IDX(SIOCSIWRTS)]      = (iw_handler) cfg80211_wext_siwrts,
+       [IW_IOCTL_IDX(SIOCGIWRTS)]      = (iw_handler) cfg80211_wext_giwrts,
+       [IW_IOCTL_IDX(SIOCSIWFRAG)]     = (iw_handler) cfg80211_wext_siwfrag,
+       [IW_IOCTL_IDX(SIOCGIWFRAG)]     = (iw_handler) cfg80211_wext_giwfrag,
+       [IW_IOCTL_IDX(SIOCSIWTXPOW)]    = (iw_handler) cfg80211_wext_siwtxpower,
+       [IW_IOCTL_IDX(SIOCGIWTXPOW)]    = (iw_handler) cfg80211_wext_giwtxpower,
+       [IW_IOCTL_IDX(SIOCSIWRETRY)]    = (iw_handler) cfg80211_wext_siwretry,
+       [IW_IOCTL_IDX(SIOCGIWRETRY)]    = (iw_handler) cfg80211_wext_giwretry,
+       [IW_IOCTL_IDX(SIOCSIWENCODE)]   = (iw_handler) cfg80211_wext_siwencode,
+       [IW_IOCTL_IDX(SIOCGIWENCODE)]   = (iw_handler) cfg80211_wext_giwencode,
+       [IW_IOCTL_IDX(SIOCSIWPOWER)]    = (iw_handler) cfg80211_wext_siwpower,
+       [IW_IOCTL_IDX(SIOCGIWPOWER)]    = (iw_handler) cfg80211_wext_giwpower,
+       [IW_IOCTL_IDX(SIOCSIWGENIE)]    = (iw_handler) cfg80211_wext_siwgenie,
+       [IW_IOCTL_IDX(SIOCSIWAUTH)]     = (iw_handler) cfg80211_wext_siwauth,
+       [IW_IOCTL_IDX(SIOCGIWAUTH)]     = (iw_handler) cfg80211_wext_giwauth,
+       [IW_IOCTL_IDX(SIOCSIWENCODEEXT)]= (iw_handler) cfg80211_wext_siwencodeext,
+};
+
+const struct iw_handler_def cfg80211_wext_handler = {
+       .num_standard           = ARRAY_SIZE(cfg80211_handlers),
+       .standard               = cfg80211_handlers,
+       .get_wireless_stats = cfg80211_wireless_stats,
+};
index c0310d93c2e5fcf908766d9e29df15dcce626da1..9a37747495890548621dcf0c5a851e4e4fe66eb3 100644 (file)
@@ -1,6 +1,9 @@
 #ifndef __WEXT_COMPAT
 #define __WEXT_COMPAT
 
+#include <net/iw_handler.h>
+#include <linux/wireless.h>
+
 int cfg80211_ibss_wext_siwfreq(struct net_device *dev,
                               struct iw_request_info *info,
                               struct iw_freq *freq, char *extra);
@@ -42,4 +45,6 @@ int cfg80211_mgd_wext_giwessid(struct net_device *dev,
 struct ieee80211_channel *cfg80211_wext_freq(struct wiphy *wiphy,
                                             struct iw_freq *freq);
 
+
+extern const struct iw_handler_def cfg80211_wext_handler;
 #endif /* __WEXT_COMPAT */