mac80211/cfg80211: add station events
[safe/jmp/linux-2.6] / net / wireless / wext-compat.c
index 5d01763..4198243 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/etherdevice.h>
 #include <net/iw_handler.h>
 #include <net/cfg80211.h>
+#include "wext-compat.h"
 #include "core.h"
 
 int cfg80211_wext_giwname(struct net_device *dev,
@@ -69,18 +70,8 @@ int cfg80211_wext_siwmode(struct net_device *dev, struct iw_request_info *info,
        enum nl80211_iftype type;
        int ret;
 
-       if (!wdev)
-               return -EOPNOTSUPP;
-
        rdev = wiphy_to_dev(wdev->wiphy);
 
-       if (!rdev->ops->change_virtual_intf)
-               return -EOPNOTSUPP;
-
-       /* don't support changing VLANs, you just re-create them */
-       if (wdev->iftype == NL80211_IFTYPE_AP_VLAN)
-               return -EOPNOTSUPP;
-
        switch (*mode) {
        case IW_MODE_INFRA:
                type = NL80211_IFTYPE_STATION;
@@ -103,9 +94,9 @@ int cfg80211_wext_siwmode(struct net_device *dev, struct iw_request_info *info,
 
        memset(&vifparams, 0, sizeof(vifparams));
 
-       ret = rdev->ops->change_virtual_intf(wdev->wiphy, dev, type,
-                                            NULL, &vifparams);
-       WARN_ON(!ret && wdev->iftype != type);
+       cfg80211_lock_rdev(rdev);
+       ret = cfg80211_change_iface(rdev, dev, type, NULL, &vifparams);
+       cfg80211_unlock_rdev(rdev);
 
        return ret;
 }
@@ -266,41 +257,27 @@ EXPORT_SYMBOL_GPL(cfg80211_wext_giwrange);
  * @wiphy: the wiphy
  * @freq: the wext freq encoding
  *
- * Returns a channel, %NULL for auto, or an ERR_PTR for errors!
+ * Returns a frequency, or a negative error code, or 0 for auto.
  */
-struct ieee80211_channel *cfg80211_wext_freq(struct wiphy *wiphy,
-                                            struct iw_freq *freq)
+int cfg80211_wext_freq(struct wiphy *wiphy, struct iw_freq *freq)
 {
-       struct ieee80211_channel *chan;
-       int f;
-
        /*
-        * Parse frequency - return NULL for auto and
+        * Parse frequency - return 0 for auto and
         * -EINVAL for impossible things.
         */
        if (freq->e == 0) {
                if (freq->m < 0)
-                       return NULL;
-               f = ieee80211_channel_to_frequency(freq->m);
+                       return 0;
+               return ieee80211_channel_to_frequency(freq->m);
        } else {
                int i, div = 1000000;
                for (i = 0; i < freq->e; i++)
                        div /= 10;
                if (div <= 0)
-                       return ERR_PTR(-EINVAL);
-               f = freq->m / div;
+                       return -EINVAL;
+               return freq->m / div;
        }
-
-       /*
-        * Look up channel struct and return -EINVAL when
-        * it cannot be found.
-        */
-       chan = ieee80211_get_channel(wiphy, f);
-       if (!chan)
-               return ERR_PTR(-EINVAL);
-       return chan;
 }
-EXPORT_SYMBOL_GPL(cfg80211_wext_freq);
 
 int cfg80211_wext_siwrts(struct net_device *dev,
                         struct iw_request_info *info,
@@ -460,6 +437,7 @@ static int __cfg80211_set_encryption(struct cfg80211_registered_device *rdev,
 {
        struct wireless_dev *wdev = dev->ieee80211_ptr;
        int err, i;
+       bool rejoin = false;
 
        if (!wdev->wext.keys) {
                wdev->wext.keys = kzalloc(sizeof(*wdev->wext.keys),
@@ -489,8 +467,25 @@ static int __cfg80211_set_encryption(struct cfg80211_registered_device *rdev,
 
        if (remove) {
                err = 0;
-               if (wdev->current_bss)
+               if (wdev->current_bss) {
+                       /*
+                        * If removing the current TX key, we will need to
+                        * join a new IBSS without the privacy bit clear.
+                        */
+                       if (idx == wdev->wext.default_key &&
+                           wdev->iftype == NL80211_IFTYPE_ADHOC) {
+                               __cfg80211_leave_ibss(rdev, wdev->netdev, true);
+                               rejoin = true;
+                       }
                        err = rdev->ops->del_key(&rdev->wiphy, dev, idx, addr);
+               }
+               wdev->wext.connect.privacy = false;
+               /*
+                * Applications using wireless extensions expect to be
+                * able to delete keys that don't exist, so allow that.
+                */
+               if (err == -ENOENT)
+                       err = 0;
                if (!err) {
                        if (!addr) {
                                wdev->wext.keys->params[idx].key_len = 0;
@@ -501,12 +496,9 @@ static int __cfg80211_set_encryption(struct cfg80211_registered_device *rdev,
                        else if (idx == wdev->wext.default_mgmt_key)
                                wdev->wext.default_mgmt_key = -1;
                }
-               /*
-                * Applications using wireless extensions expect to be
-                * able to delete keys that don't exist, so allow that.
-                */
-               if (err == -ENOENT)
-                       return 0;
+
+               if (!err && rejoin)
+                       err = cfg80211_ibss_wext_join(rdev, wdev);
 
                return err;
        }
@@ -531,13 +523,28 @@ static int __cfg80211_set_encryption(struct cfg80211_registered_device *rdev,
                        wdev->wext.keys->data[idx];
        }
 
-       if (params->cipher != WLAN_CIPHER_SUITE_AES_CMAC &&
+       if ((params->cipher == WLAN_CIPHER_SUITE_WEP40 ||
+            params->cipher == WLAN_CIPHER_SUITE_WEP104) &&
            (tx_key || (!addr && wdev->wext.default_key == -1))) {
-               if (wdev->current_bss)
+               if (wdev->current_bss) {
+                       /*
+                        * If we are getting a new TX key from not having
+                        * had one before we need to join a new IBSS with
+                        * the privacy bit set.
+                        */
+                       if (wdev->iftype == NL80211_IFTYPE_ADHOC &&
+                           wdev->wext.default_key == -1) {
+                               __cfg80211_leave_ibss(rdev, wdev->netdev, true);
+                               rejoin = true;
+                       }
                        err = rdev->ops->set_default_key(&rdev->wiphy,
                                                         dev, idx);
-               if (!err)
+               }
+               if (!err) {
                        wdev->wext.default_key = idx;
+                       if (rejoin)
+                               err = cfg80211_ibss_wext_join(rdev, wdev);
+               }
                return err;
        }
 
@@ -561,10 +568,13 @@ static int cfg80211_set_encryption(struct cfg80211_registered_device *rdev,
 {
        int err;
 
+       /* devlist mutex needed for possible IBSS re-join */
+       mutex_lock(&rdev->devlist_mtx);
        wdev_lock(dev->ieee80211_ptr);
        err = __cfg80211_set_encryption(rdev, dev, addr, remove,
                                        tx_key, idx, params);
        wdev_unlock(dev->ieee80211_ptr);
+       mutex_unlock(&rdev->devlist_mtx);
 
        return err;
 }
@@ -758,6 +768,55 @@ int cfg80211_wext_giwencode(struct net_device *dev,
 }
 EXPORT_SYMBOL_GPL(cfg80211_wext_giwencode);
 
+int cfg80211_wext_siwfreq(struct net_device *dev,
+                         struct iw_request_info *info,
+                         struct iw_freq *wextfreq, char *extra)
+{
+       struct wireless_dev *wdev = dev->ieee80211_ptr;
+       struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy);
+       int freq, err;
+
+       switch (wdev->iftype) {
+       case NL80211_IFTYPE_STATION:
+               return cfg80211_mgd_wext_siwfreq(dev, info, wextfreq, extra);
+       case NL80211_IFTYPE_ADHOC:
+               return cfg80211_ibss_wext_siwfreq(dev, info, wextfreq, extra);
+       default:
+               freq = cfg80211_wext_freq(wdev->wiphy, wextfreq);
+               if (freq < 0)
+                       return freq;
+               if (freq == 0)
+                       return -EINVAL;
+               mutex_lock(&rdev->devlist_mtx);
+               err = rdev_set_freq(rdev, NULL, freq, NL80211_CHAN_NO_HT);
+               mutex_unlock(&rdev->devlist_mtx);
+               return err;
+       }
+}
+EXPORT_SYMBOL_GPL(cfg80211_wext_siwfreq);
+
+int cfg80211_wext_giwfreq(struct net_device *dev,
+                         struct iw_request_info *info,
+                         struct iw_freq *freq, char *extra)
+{
+       struct wireless_dev *wdev = dev->ieee80211_ptr;
+       struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy);
+
+       switch (wdev->iftype) {
+       case NL80211_IFTYPE_STATION:
+               return cfg80211_mgd_wext_giwfreq(dev, info, freq, extra);
+       case NL80211_IFTYPE_ADHOC:
+               return cfg80211_ibss_wext_giwfreq(dev, info, freq, extra);
+       default:
+               if (!rdev->channel)
+                       return -EINVAL;
+               freq->m = rdev->channel->center_freq;
+               freq->e = 6;
+               return 0;
+       }
+}
+EXPORT_SYMBOL_GPL(cfg80211_wext_giwfreq);
+
 int cfg80211_wext_siwtxpower(struct net_device *dev,
                             struct iw_request_info *info,
                             union iwreq_data *data, char *extra)
@@ -807,7 +866,7 @@ int cfg80211_wext_siwtxpower(struct net_device *dev,
                return 0;
        }
 
-       return rdev->ops->set_tx_power(wdev->wiphy, type, dbm);;
+       return rdev->ops->set_tx_power(wdev->wiphy, type, dbm);
 }
 EXPORT_SYMBOL_GPL(cfg80211_wext_siwtxpower);
 
@@ -877,12 +936,20 @@ static int cfg80211_set_auth_alg(struct wireless_dev *wdev,
 
 static int cfg80211_set_wpa_version(struct wireless_dev *wdev, u32 wpa_versions)
 {
-       wdev->wext.connect.crypto.wpa_versions = 0;
-
        if (wpa_versions & ~(IW_AUTH_WPA_VERSION_WPA |
-                            IW_AUTH_WPA_VERSION_WPA2))
+                            IW_AUTH_WPA_VERSION_WPA2|
+                            IW_AUTH_WPA_VERSION_DISABLED))
                return -EINVAL;
 
+       if ((wpa_versions & IW_AUTH_WPA_VERSION_DISABLED) &&
+           (wpa_versions & (IW_AUTH_WPA_VERSION_WPA|
+                            IW_AUTH_WPA_VERSION_WPA2)))
+               return -EINVAL;
+
+       if (wpa_versions & IW_AUTH_WPA_VERSION_DISABLED)
+               wdev->wext.connect.crypto.wpa_versions &=
+                       ~(NL80211_WPA_VERSION_1|NL80211_WPA_VERSION_2);
+
        if (wpa_versions & IW_AUTH_WPA_VERSION_WPA)
                wdev->wext.connect.crypto.wpa_versions |=
                        NL80211_WPA_VERSION_1;
@@ -896,8 +963,6 @@ static int cfg80211_set_wpa_version(struct wireless_dev *wdev, u32 wpa_versions)
 
 static int cfg80211_set_cipher_group(struct wireless_dev *wdev, u32 cipher)
 {
-       wdev->wext.connect.crypto.cipher_group = 0;
-
        if (cipher & IW_AUTH_CIPHER_WEP40)
                wdev->wext.connect.crypto.cipher_group =
                        WLAN_CIPHER_SUITE_WEP40;
@@ -913,6 +978,8 @@ static int cfg80211_set_cipher_group(struct wireless_dev *wdev, u32 cipher)
        else if (cipher & IW_AUTH_CIPHER_AES_CMAC)
                wdev->wext.connect.crypto.cipher_group =
                        WLAN_CIPHER_SUITE_AES_CMAC;
+       else if (cipher & IW_AUTH_CIPHER_NONE)
+               wdev->wext.connect.crypto.cipher_group = 0;
        else
                return -EINVAL;
 
@@ -1086,9 +1153,9 @@ int cfg80211_wext_giwpower(struct net_device *dev,
 }
 EXPORT_SYMBOL_GPL(cfg80211_wext_giwpower);
 
-int cfg80211_wds_wext_siwap(struct net_device *dev,
-                           struct iw_request_info *info,
-                           struct sockaddr *addr, char *extra)
+static int cfg80211_wds_wext_siwap(struct net_device *dev,
+                                  struct iw_request_info *info,
+                                  struct sockaddr *addr, char *extra)
 {
        struct wireless_dev *wdev = dev->ieee80211_ptr;
        struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy);
@@ -1114,11 +1181,10 @@ int cfg80211_wds_wext_siwap(struct net_device *dev,
 
        return 0;
 }
-EXPORT_SYMBOL_GPL(cfg80211_wds_wext_siwap);
 
-int cfg80211_wds_wext_giwap(struct net_device *dev,
-                           struct iw_request_info *info,
-                           struct sockaddr *addr, char *extra)
+static int cfg80211_wds_wext_giwap(struct net_device *dev,
+                                  struct iw_request_info *info,
+                                  struct sockaddr *addr, char *extra)
 {
        struct wireless_dev *wdev = dev->ieee80211_ptr;
 
@@ -1130,7 +1196,6 @@ int cfg80211_wds_wext_giwap(struct net_device *dev,
 
        return 0;
 }
-EXPORT_SYMBOL_GPL(cfg80211_wds_wext_giwap);
 
 int cfg80211_wext_siwrate(struct net_device *dev,
                          struct iw_request_info *info,
@@ -1192,10 +1257,7 @@ int cfg80211_wext_giwrate(struct net_device *dev,
        if (!(sinfo.filled & STATION_INFO_TX_BITRATE))
                return -EOPNOTSUPP;
 
-       rate->value = 0;
-
-       if (!(sinfo.txrate.flags & RATE_INFO_FLAGS_MCS))
-               rate->value = 100000 * sinfo.txrate.legacy;
+       rate->value = 100000 * cfg80211_calculate_bitrate(&sinfo.txrate);
 
        return 0;
 }
@@ -1209,7 +1271,7 @@ struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev)
        /* we are under RTNL - globally locked - so can use static structs */
        static struct iw_statistics wstats;
        static struct station_info sinfo;
-       u8 *addr;
+       u8 bssid[ETH_ALEN];
 
        if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_STATION)
                return NULL;
@@ -1217,11 +1279,16 @@ struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev)
        if (!rdev->ops->get_station)
                return NULL;
 
-       addr = wdev->wext.connect.bssid;
-       if (!addr)
+       /* Grab BSSID of current BSS, if any */
+       wdev_lock(wdev);
+       if (!wdev->current_bss) {
+               wdev_unlock(wdev);
                return NULL;
+       }
+       memcpy(bssid, wdev->current_bss->pub.bssid, ETH_ALEN);
+       wdev_unlock(wdev);
 
-       if (rdev->ops->get_station(&rdev->wiphy, dev, addr, &sinfo))
+       if (rdev->ops->get_station(&rdev->wiphy, dev, bssid, &sinfo))
                return NULL;
 
        memset(&wstats, 0, sizeof(wstats));
@@ -1259,3 +1326,157 @@ struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev)
        return &wstats;
 }
 EXPORT_SYMBOL_GPL(cfg80211_wireless_stats);
+
+int cfg80211_wext_siwap(struct net_device *dev,
+                       struct iw_request_info *info,
+                       struct sockaddr *ap_addr, char *extra)
+{
+       struct wireless_dev *wdev = dev->ieee80211_ptr;
+
+       switch (wdev->iftype) {
+       case NL80211_IFTYPE_ADHOC:
+               return cfg80211_ibss_wext_siwap(dev, info, ap_addr, extra);
+       case NL80211_IFTYPE_STATION:
+               return cfg80211_mgd_wext_siwap(dev, info, ap_addr, extra);
+       case NL80211_IFTYPE_WDS:
+               return cfg80211_wds_wext_siwap(dev, info, ap_addr, extra);
+       default:
+               return -EOPNOTSUPP;
+       }
+}
+EXPORT_SYMBOL_GPL(cfg80211_wext_siwap);
+
+int cfg80211_wext_giwap(struct net_device *dev,
+                       struct iw_request_info *info,
+                       struct sockaddr *ap_addr, char *extra)
+{
+       struct wireless_dev *wdev = dev->ieee80211_ptr;
+
+       switch (wdev->iftype) {
+       case NL80211_IFTYPE_ADHOC:
+               return cfg80211_ibss_wext_giwap(dev, info, ap_addr, extra);
+       case NL80211_IFTYPE_STATION:
+               return cfg80211_mgd_wext_giwap(dev, info, ap_addr, extra);
+       case NL80211_IFTYPE_WDS:
+               return cfg80211_wds_wext_giwap(dev, info, ap_addr, extra);
+       default:
+               return -EOPNOTSUPP;
+       }
+}
+EXPORT_SYMBOL_GPL(cfg80211_wext_giwap);
+
+int cfg80211_wext_siwessid(struct net_device *dev,
+                          struct iw_request_info *info,
+                          struct iw_point *data, char *ssid)
+{
+       struct wireless_dev *wdev = dev->ieee80211_ptr;
+
+       switch (wdev->iftype) {
+       case NL80211_IFTYPE_ADHOC:
+               return cfg80211_ibss_wext_siwessid(dev, info, data, ssid);
+       case NL80211_IFTYPE_STATION:
+               return cfg80211_mgd_wext_siwessid(dev, info, data, ssid);
+       default:
+               return -EOPNOTSUPP;
+       }
+}
+EXPORT_SYMBOL_GPL(cfg80211_wext_siwessid);
+
+int cfg80211_wext_giwessid(struct net_device *dev,
+                          struct iw_request_info *info,
+                          struct iw_point *data, char *ssid)
+{
+       struct wireless_dev *wdev = dev->ieee80211_ptr;
+
+       switch (wdev->iftype) {
+       case NL80211_IFTYPE_ADHOC:
+               return cfg80211_ibss_wext_giwessid(dev, info, data, ssid);
+       case NL80211_IFTYPE_STATION:
+               return cfg80211_mgd_wext_giwessid(dev, info, data, ssid);
+       default:
+               return -EOPNOTSUPP;
+       }
+}
+EXPORT_SYMBOL_GPL(cfg80211_wext_giwessid);
+
+int cfg80211_wext_siwpmksa(struct net_device *dev,
+                          struct iw_request_info *info,
+                          struct iw_point *data, char *extra)
+{
+       struct wireless_dev *wdev = dev->ieee80211_ptr;
+       struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy);
+       struct cfg80211_pmksa cfg_pmksa;
+       struct iw_pmksa *pmksa = (struct iw_pmksa *)extra;
+
+       memset(&cfg_pmksa, 0, sizeof(struct cfg80211_pmksa));
+
+       if (wdev->iftype != NL80211_IFTYPE_STATION)
+               return -EINVAL;
+
+       cfg_pmksa.bssid = pmksa->bssid.sa_data;
+       cfg_pmksa.pmkid = pmksa->pmkid;
+
+       switch (pmksa->cmd) {
+       case IW_PMKSA_ADD:
+               if (!rdev->ops->set_pmksa)
+                       return -EOPNOTSUPP;
+
+               return rdev->ops->set_pmksa(&rdev->wiphy, dev, &cfg_pmksa);
+
+       case IW_PMKSA_REMOVE:
+               if (!rdev->ops->del_pmksa)
+                       return -EOPNOTSUPP;
+
+               return rdev->ops->del_pmksa(&rdev->wiphy, dev, &cfg_pmksa);
+
+       case IW_PMKSA_FLUSH:
+               if (!rdev->ops->flush_pmksa)
+                       return -EOPNOTSUPP;
+
+               return rdev->ops->flush_pmksa(&rdev->wiphy, dev);
+
+       default:
+               return -EOPNOTSUPP;
+       }
+}
+
+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,
+       [IW_IOCTL_IDX(SIOCSIWPMKSA)]    = (iw_handler) cfg80211_wext_siwpmksa,
+};
+
+const struct iw_handler_def cfg80211_wext_handler = {
+       .num_standard           = ARRAY_SIZE(cfg80211_handlers),
+       .standard               = cfg80211_handlers,
+       .get_wireless_stats = cfg80211_wireless_stats,
+};