Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2002-2005, Instant802 Networks, Inc. |
| 3 | * Copyright 2005-2006, Devicescape Software, Inc. |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License version 2 as |
| 7 | * published by the Free Software Foundation. |
| 8 | */ |
| 9 | |
| 10 | #include <linux/module.h> |
| 11 | #include <linux/init.h> |
| 12 | #include <linux/netdevice.h> |
| 13 | #include <linux/types.h> |
| 14 | #include <linux/slab.h> |
| 15 | #include <linux/skbuff.h> |
| 16 | #include <linux/etherdevice.h> |
| 17 | #include <linux/if_arp.h> |
| 18 | #include <linux/wireless.h> |
| 19 | #include <net/iw_handler.h> |
| 20 | #include <asm/uaccess.h> |
| 21 | |
| 22 | #include <net/mac80211.h> |
| 23 | #include "ieee80211_i.h" |
Johannes Berg | 2c8dccc | 2008-04-08 15:14:40 -0400 | [diff] [blame] | 24 | #include "led.h" |
| 25 | #include "rate.h" |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 26 | #include "wpa.h" |
| 27 | #include "aes_ccm.h" |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 28 | |
Johannes Berg | b708e61 | 2007-09-14 11:10:25 -0400 | [diff] [blame] | 29 | |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 30 | static int ieee80211_ioctl_siwfreq(struct net_device *dev, |
| 31 | struct iw_request_info *info, |
| 32 | struct iw_freq *freq, char *extra) |
| 33 | { |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 34 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
Johannes Berg | 7e9debe | 2009-06-15 13:42:25 +0200 | [diff] [blame] | 35 | struct ieee80211_local *local = sdata->local; |
| 36 | struct ieee80211_channel *chan; |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 37 | |
Johannes Berg | 4690029 | 2009-02-15 12:44:28 +0100 | [diff] [blame] | 38 | if (sdata->vif.type == NL80211_IFTYPE_ADHOC) |
Johannes Berg | af8cdcd | 2009-04-19 21:25:43 +0200 | [diff] [blame] | 39 | return cfg80211_ibss_wext_siwfreq(dev, info, freq, extra); |
Johannes Berg | 4690029 | 2009-02-15 12:44:28 +0100 | [diff] [blame] | 40 | else if (sdata->vif.type == NL80211_IFTYPE_STATION) |
Johannes Berg | f212935 | 2009-07-01 21:26:56 +0200 | [diff] [blame] | 41 | return cfg80211_mgd_wext_siwfreq(dev, info, freq, extra); |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 42 | |
| 43 | /* freq->e == 0: freq->m = channel; otherwise freq = m * 10^e */ |
| 44 | if (freq->e == 0) { |
Johannes Berg | f212935 | 2009-07-01 21:26:56 +0200 | [diff] [blame] | 45 | if (freq->m < 0) |
| 46 | return -EINVAL; |
| 47 | else |
Johannes Berg | 7e9debe | 2009-06-15 13:42:25 +0200 | [diff] [blame] | 48 | chan = ieee80211_get_channel(local->hw.wiphy, |
Johannes Berg | 8318d78 | 2008-01-24 19:38:38 +0100 | [diff] [blame] | 49 | ieee80211_channel_to_frequency(freq->m)); |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 50 | } else { |
| 51 | int i, div = 1000000; |
| 52 | for (i = 0; i < freq->e; i++) |
| 53 | div /= 10; |
Johannes Berg | 7e9debe | 2009-06-15 13:42:25 +0200 | [diff] [blame] | 54 | if (div <= 0) |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 55 | return -EINVAL; |
Johannes Berg | 7e9debe | 2009-06-15 13:42:25 +0200 | [diff] [blame] | 56 | chan = ieee80211_get_channel(local->hw.wiphy, freq->m / div); |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 57 | } |
Johannes Berg | 7e9debe | 2009-06-15 13:42:25 +0200 | [diff] [blame] | 58 | |
| 59 | if (!chan) |
| 60 | return -EINVAL; |
| 61 | |
| 62 | if (chan->flags & IEEE80211_CHAN_DISABLED) |
| 63 | return -EINVAL; |
| 64 | |
| 65 | /* |
| 66 | * no change except maybe auto -> fixed, ignore the HT |
| 67 | * setting so you can fix a channel you're on already |
| 68 | */ |
| 69 | if (local->oper_channel == chan) |
| 70 | return 0; |
| 71 | |
Johannes Berg | 7e9debe | 2009-06-15 13:42:25 +0200 | [diff] [blame] | 72 | local->oper_channel = chan; |
| 73 | local->oper_channel_type = NL80211_CHAN_NO_HT; |
| 74 | ieee80211_hw_config(local, 0); |
| 75 | |
| 76 | return 0; |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 77 | } |
| 78 | |
| 79 | |
| 80 | static int ieee80211_ioctl_giwfreq(struct net_device *dev, |
| 81 | struct iw_request_info *info, |
| 82 | struct iw_freq *freq, char *extra) |
| 83 | { |
| 84 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); |
Johannes Berg | af8cdcd | 2009-04-19 21:25:43 +0200 | [diff] [blame] | 85 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
| 86 | |
| 87 | if (sdata->vif.type == NL80211_IFTYPE_ADHOC) |
| 88 | return cfg80211_ibss_wext_giwfreq(dev, info, freq, extra); |
Johannes Berg | f212935 | 2009-07-01 21:26:56 +0200 | [diff] [blame] | 89 | else if (sdata->vif.type == NL80211_IFTYPE_STATION) |
| 90 | return cfg80211_mgd_wext_giwfreq(dev, info, freq, extra); |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 91 | |
Johannes Berg | 7738231 | 2009-05-04 17:52:10 +0200 | [diff] [blame] | 92 | freq->m = local->oper_channel->center_freq; |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 93 | freq->e = 6; |
| 94 | |
| 95 | return 0; |
| 96 | } |
| 97 | |
| 98 | |
| 99 | static int ieee80211_ioctl_siwessid(struct net_device *dev, |
| 100 | struct iw_request_info *info, |
| 101 | struct iw_point *data, char *ssid) |
| 102 | { |
Johannes Berg | af8cdcd | 2009-04-19 21:25:43 +0200 | [diff] [blame] | 103 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 104 | |
Johannes Berg | af8cdcd | 2009-04-19 21:25:43 +0200 | [diff] [blame] | 105 | if (sdata->vif.type == NL80211_IFTYPE_ADHOC) |
| 106 | return cfg80211_ibss_wext_siwessid(dev, info, data, ssid); |
Johannes Berg | f212935 | 2009-07-01 21:26:56 +0200 | [diff] [blame] | 107 | else if (sdata->vif.type == NL80211_IFTYPE_STATION) |
| 108 | return cfg80211_mgd_wext_siwessid(dev, info, data, ssid); |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 109 | |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 110 | return -EOPNOTSUPP; |
| 111 | } |
| 112 | |
| 113 | |
| 114 | static int ieee80211_ioctl_giwessid(struct net_device *dev, |
| 115 | struct iw_request_info *info, |
| 116 | struct iw_point *data, char *ssid) |
| 117 | { |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 118 | struct ieee80211_sub_if_data *sdata; |
Johannes Berg | af8cdcd | 2009-04-19 21:25:43 +0200 | [diff] [blame] | 119 | |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 120 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
Johannes Berg | af8cdcd | 2009-04-19 21:25:43 +0200 | [diff] [blame] | 121 | |
| 122 | if (sdata->vif.type == NL80211_IFTYPE_ADHOC) |
| 123 | return cfg80211_ibss_wext_giwessid(dev, info, data, ssid); |
Johannes Berg | f212935 | 2009-07-01 21:26:56 +0200 | [diff] [blame] | 124 | else if (sdata->vif.type == NL80211_IFTYPE_STATION) |
| 125 | return cfg80211_mgd_wext_giwessid(dev, info, data, ssid); |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 126 | |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 127 | return -EOPNOTSUPP; |
| 128 | } |
| 129 | |
| 130 | |
| 131 | static int ieee80211_ioctl_siwap(struct net_device *dev, |
| 132 | struct iw_request_info *info, |
| 133 | struct sockaddr *ap_addr, char *extra) |
| 134 | { |
Johannes Berg | af8cdcd | 2009-04-19 21:25:43 +0200 | [diff] [blame] | 135 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 136 | |
Johannes Berg | af8cdcd | 2009-04-19 21:25:43 +0200 | [diff] [blame] | 137 | if (sdata->vif.type == NL80211_IFTYPE_ADHOC) |
| 138 | return cfg80211_ibss_wext_siwap(dev, info, ap_addr, extra); |
| 139 | |
Johannes Berg | f212935 | 2009-07-01 21:26:56 +0200 | [diff] [blame] | 140 | if (sdata->vif.type == NL80211_IFTYPE_STATION) |
| 141 | return cfg80211_mgd_wext_siwap(dev, info, ap_addr, extra); |
Johannes Berg | 7986cf9 | 2009-03-21 17:08:43 +0100 | [diff] [blame] | 142 | |
Johannes Berg | ab737a4 | 2009-07-01 21:26:58 +0200 | [diff] [blame] | 143 | if (sdata->vif.type == NL80211_IFTYPE_WDS) |
| 144 | return cfg80211_wds_wext_siwap(dev, info, ap_addr, extra); |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 145 | return -EOPNOTSUPP; |
| 146 | } |
| 147 | |
| 148 | |
| 149 | static int ieee80211_ioctl_giwap(struct net_device *dev, |
| 150 | struct iw_request_info *info, |
| 151 | struct sockaddr *ap_addr, char *extra) |
| 152 | { |
Johannes Berg | af8cdcd | 2009-04-19 21:25:43 +0200 | [diff] [blame] | 153 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 154 | |
Johannes Berg | af8cdcd | 2009-04-19 21:25:43 +0200 | [diff] [blame] | 155 | if (sdata->vif.type == NL80211_IFTYPE_ADHOC) |
| 156 | return cfg80211_ibss_wext_giwap(dev, info, ap_addr, extra); |
| 157 | |
Johannes Berg | f212935 | 2009-07-01 21:26:56 +0200 | [diff] [blame] | 158 | if (sdata->vif.type == NL80211_IFTYPE_STATION) |
| 159 | return cfg80211_mgd_wext_giwap(dev, info, ap_addr, extra); |
| 160 | |
Johannes Berg | ab737a4 | 2009-07-01 21:26:58 +0200 | [diff] [blame] | 161 | if (sdata->vif.type == NL80211_IFTYPE_WDS) |
| 162 | return cfg80211_wds_wext_giwap(dev, info, ap_addr, extra); |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 163 | |
| 164 | return -EOPNOTSUPP; |
| 165 | } |
| 166 | |
| 167 | |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 168 | /* Get wireless statistics. Called by /proc/net/wireless and by SIOCGIWSTATS */ |
| 169 | static struct iw_statistics *ieee80211_get_wireless_stats(struct net_device *dev) |
| 170 | { |
| 171 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); |
| 172 | struct iw_statistics *wstats = &local->wstats; |
| 173 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
| 174 | struct sta_info *sta = NULL; |
| 175 | |
Johannes Berg | 98dd6a5 | 2008-04-10 15:36:09 +0200 | [diff] [blame] | 176 | rcu_read_lock(); |
| 177 | |
Johannes Berg | 4690029 | 2009-02-15 12:44:28 +0100 | [diff] [blame] | 178 | if (sdata->vif.type == NL80211_IFTYPE_STATION) |
| 179 | sta = sta_info_get(local, sdata->u.mgd.bssid); |
| 180 | |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 181 | if (!sta) { |
| 182 | wstats->discard.fragment = 0; |
| 183 | wstats->discard.misc = 0; |
| 184 | wstats->qual.qual = 0; |
| 185 | wstats->qual.level = 0; |
| 186 | wstats->qual.noise = 0; |
| 187 | wstats->qual.updated = IW_QUAL_ALL_INVALID; |
| 188 | } else { |
Johannes Berg | 24776cf | 2009-02-27 16:33:55 -0600 | [diff] [blame] | 189 | wstats->qual.updated = 0; |
| 190 | /* |
| 191 | * mirror what cfg80211 does for iwrange/scan results, |
| 192 | * otherwise userspace gets confused. |
| 193 | */ |
| 194 | if (local->hw.flags & (IEEE80211_HW_SIGNAL_UNSPEC | |
| 195 | IEEE80211_HW_SIGNAL_DBM)) { |
| 196 | wstats->qual.updated |= IW_QUAL_LEVEL_UPDATED; |
| 197 | wstats->qual.updated |= IW_QUAL_QUAL_UPDATED; |
| 198 | } else { |
| 199 | wstats->qual.updated |= IW_QUAL_LEVEL_INVALID; |
| 200 | wstats->qual.updated |= IW_QUAL_QUAL_INVALID; |
| 201 | } |
| 202 | |
| 203 | if (local->hw.flags & IEEE80211_HW_SIGNAL_UNSPEC) { |
| 204 | wstats->qual.level = sta->last_signal; |
| 205 | wstats->qual.qual = sta->last_signal; |
| 206 | } else if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM) { |
| 207 | int sig = sta->last_signal; |
| 208 | |
| 209 | wstats->qual.updated |= IW_QUAL_DBM; |
| 210 | wstats->qual.level = sig; |
| 211 | if (sig < -110) |
| 212 | sig = -110; |
| 213 | else if (sig > -40) |
| 214 | sig = -40; |
| 215 | wstats->qual.qual = sig + 110; |
| 216 | } |
| 217 | |
| 218 | if (local->hw.flags & IEEE80211_HW_NOISE_DBM) { |
| 219 | /* |
| 220 | * This assumes that if driver reports noise, it also |
| 221 | * reports signal in dBm. |
| 222 | */ |
| 223 | wstats->qual.noise = sta->last_noise; |
| 224 | wstats->qual.updated |= IW_QUAL_NOISE_UPDATED; |
| 225 | } else { |
| 226 | wstats->qual.updated |= IW_QUAL_NOISE_INVALID; |
| 227 | } |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 228 | } |
Johannes Berg | 98dd6a5 | 2008-04-10 15:36:09 +0200 | [diff] [blame] | 229 | |
| 230 | rcu_read_unlock(); |
| 231 | |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 232 | return wstats; |
| 233 | } |
| 234 | |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 235 | /* Structures to export the Wireless Handlers */ |
| 236 | |
| 237 | static const iw_handler ieee80211_handler[] = |
| 238 | { |
| 239 | (iw_handler) NULL, /* SIOCSIWCOMMIT */ |
Johannes Berg | fee5267 | 2008-11-26 22:36:31 +0100 | [diff] [blame] | 240 | (iw_handler) cfg80211_wext_giwname, /* SIOCGIWNAME */ |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 241 | (iw_handler) NULL, /* SIOCSIWNWID */ |
| 242 | (iw_handler) NULL, /* SIOCGIWNWID */ |
| 243 | (iw_handler) ieee80211_ioctl_siwfreq, /* SIOCSIWFREQ */ |
| 244 | (iw_handler) ieee80211_ioctl_giwfreq, /* SIOCGIWFREQ */ |
Johannes Berg | e60c774 | 2008-11-26 23:31:40 +0100 | [diff] [blame] | 245 | (iw_handler) cfg80211_wext_siwmode, /* SIOCSIWMODE */ |
| 246 | (iw_handler) cfg80211_wext_giwmode, /* SIOCGIWMODE */ |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 247 | (iw_handler) NULL, /* SIOCSIWSENS */ |
| 248 | (iw_handler) NULL, /* SIOCGIWSENS */ |
| 249 | (iw_handler) NULL /* not used */, /* SIOCSIWRANGE */ |
Johannes Berg | 4aa188e | 2009-02-18 19:32:08 +0100 | [diff] [blame] | 250 | (iw_handler) cfg80211_wext_giwrange, /* SIOCGIWRANGE */ |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 251 | (iw_handler) NULL /* not used */, /* SIOCSIWPRIV */ |
| 252 | (iw_handler) NULL /* kernel code */, /* SIOCGIWPRIV */ |
| 253 | (iw_handler) NULL /* not used */, /* SIOCSIWSTATS */ |
| 254 | (iw_handler) NULL /* kernel code */, /* SIOCGIWSTATS */ |
Johannes Berg | 5d4ecd9 | 2007-09-14 11:10:24 -0400 | [diff] [blame] | 255 | (iw_handler) NULL, /* SIOCSIWSPY */ |
| 256 | (iw_handler) NULL, /* SIOCGIWSPY */ |
| 257 | (iw_handler) NULL, /* SIOCSIWTHRSPY */ |
| 258 | (iw_handler) NULL, /* SIOCGIWTHRSPY */ |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 259 | (iw_handler) ieee80211_ioctl_siwap, /* SIOCSIWAP */ |
| 260 | (iw_handler) ieee80211_ioctl_giwap, /* SIOCGIWAP */ |
Johannes Berg | 691597c | 2009-04-19 19:57:45 +0200 | [diff] [blame] | 261 | (iw_handler) cfg80211_wext_siwmlme, /* SIOCSIWMLME */ |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 262 | (iw_handler) NULL, /* SIOCGIWAPLIST */ |
Johannes Berg | 2a51931 | 2009-02-10 21:25:55 +0100 | [diff] [blame] | 263 | (iw_handler) cfg80211_wext_siwscan, /* SIOCSIWSCAN */ |
| 264 | (iw_handler) cfg80211_wext_giwscan, /* SIOCGIWSCAN */ |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 265 | (iw_handler) ieee80211_ioctl_siwessid, /* SIOCSIWESSID */ |
| 266 | (iw_handler) ieee80211_ioctl_giwessid, /* SIOCGIWESSID */ |
| 267 | (iw_handler) NULL, /* SIOCSIWNICKN */ |
| 268 | (iw_handler) NULL, /* SIOCGIWNICKN */ |
| 269 | (iw_handler) NULL, /* -- hole -- */ |
| 270 | (iw_handler) NULL, /* -- hole -- */ |
Johannes Berg | 9930380 | 2009-07-01 21:26:59 +0200 | [diff] [blame^] | 271 | (iw_handler) cfg80211_wext_siwrate, /* SIOCSIWRATE */ |
| 272 | (iw_handler) cfg80211_wext_giwrate, /* SIOCGIWRATE */ |
Jouni Malinen | b9a5f8ca | 2009-04-20 18:39:05 +0200 | [diff] [blame] | 273 | (iw_handler) cfg80211_wext_siwrts, /* SIOCSIWRTS */ |
| 274 | (iw_handler) cfg80211_wext_giwrts, /* SIOCGIWRTS */ |
| 275 | (iw_handler) cfg80211_wext_siwfrag, /* SIOCSIWFRAG */ |
| 276 | (iw_handler) cfg80211_wext_giwfrag, /* SIOCGIWFRAG */ |
Johannes Berg | 7643a2c | 2009-06-02 13:01:39 +0200 | [diff] [blame] | 277 | (iw_handler) cfg80211_wext_siwtxpower, /* SIOCSIWTXPOW */ |
| 278 | (iw_handler) cfg80211_wext_giwtxpower, /* SIOCGIWTXPOW */ |
Jouni Malinen | b9a5f8ca | 2009-04-20 18:39:05 +0200 | [diff] [blame] | 279 | (iw_handler) cfg80211_wext_siwretry, /* SIOCSIWRETRY */ |
| 280 | (iw_handler) cfg80211_wext_giwretry, /* SIOCGIWRETRY */ |
Johannes Berg | 0864512 | 2009-05-11 13:54:58 +0200 | [diff] [blame] | 281 | (iw_handler) cfg80211_wext_siwencode, /* SIOCSIWENCODE */ |
| 282 | (iw_handler) cfg80211_wext_giwencode, /* SIOCGIWENCODE */ |
Johannes Berg | bc92afd | 2009-07-01 21:26:57 +0200 | [diff] [blame] | 283 | (iw_handler) cfg80211_wext_siwpower, /* SIOCSIWPOWER */ |
| 284 | (iw_handler) cfg80211_wext_giwpower, /* SIOCGIWPOWER */ |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 285 | (iw_handler) NULL, /* -- hole -- */ |
| 286 | (iw_handler) NULL, /* -- hole -- */ |
Johannes Berg | f212935 | 2009-07-01 21:26:56 +0200 | [diff] [blame] | 287 | (iw_handler) cfg80211_wext_siwgenie, /* SIOCSIWGENIE */ |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 288 | (iw_handler) NULL, /* SIOCGIWGENIE */ |
Johannes Berg | f212935 | 2009-07-01 21:26:56 +0200 | [diff] [blame] | 289 | (iw_handler) cfg80211_wext_siwauth, /* SIOCSIWAUTH */ |
| 290 | (iw_handler) cfg80211_wext_giwauth, /* SIOCGIWAUTH */ |
Johannes Berg | 0864512 | 2009-05-11 13:54:58 +0200 | [diff] [blame] | 291 | (iw_handler) cfg80211_wext_siwencodeext, /* SIOCSIWENCODEEXT */ |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 292 | (iw_handler) NULL, /* SIOCGIWENCODEEXT */ |
| 293 | (iw_handler) NULL, /* SIOCSIWPMKSA */ |
| 294 | (iw_handler) NULL, /* -- hole -- */ |
| 295 | }; |
| 296 | |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 297 | const struct iw_handler_def ieee80211_iw_handler_def = |
| 298 | { |
| 299 | .num_standard = ARRAY_SIZE(ieee80211_handler), |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 300 | .standard = (iw_handler *) ieee80211_handler, |
Jiri Benc | f0706e8 | 2007-05-05 11:45:53 -0700 | [diff] [blame] | 301 | .get_wireless_stats = ieee80211_get_wireless_stats, |
| 302 | }; |