2007-05-05 14:45:53 -04:00
|
|
|
/*
|
|
|
|
* 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"
|
2008-04-08 15:14:40 -04:00
|
|
|
#include "led.h"
|
|
|
|
#include "rate.h"
|
2007-05-05 14:45:53 -04:00
|
|
|
#include "wpa.h"
|
|
|
|
#include "aes_ccm.h"
|
|
|
|
|
2007-09-14 11:10:25 -04:00
|
|
|
|
2007-05-05 14:45:53 -04:00
|
|
|
static int ieee80211_ioctl_siwgenie(struct net_device *dev,
|
|
|
|
struct iw_request_info *info,
|
|
|
|
struct iw_point *data, char *extra)
|
|
|
|
{
|
|
|
|
struct ieee80211_sub_if_data *sdata;
|
|
|
|
|
2007-09-26 11:53:20 -04:00
|
|
|
sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
|
|
|
|
2009-02-15 06:44:28 -05:00
|
|
|
if (sdata->vif.type == NL80211_IFTYPE_STATION) {
|
2008-08-02 20:04:37 -04:00
|
|
|
int ret = ieee80211_sta_set_extra_ie(sdata, extra, data->length);
|
2007-05-05 14:45:53 -04:00
|
|
|
if (ret)
|
|
|
|
return ret;
|
2009-02-15 06:44:28 -05:00
|
|
|
sdata->u.mgd.flags &= ~IEEE80211_STA_AUTO_BSSID_SEL;
|
2009-03-19 07:39:22 -04:00
|
|
|
sdata->u.mgd.flags &= ~IEEE80211_STA_EXT_SME;
|
2009-05-11 14:57:57 -04:00
|
|
|
sdata->u.mgd.flags &= ~IEEE80211_STA_CONTROL_PORT;
|
2009-02-15 06:44:28 -05:00
|
|
|
ieee80211_sta_req_auth(sdata);
|
2007-05-05 14:45:53 -04:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
return -EOPNOTSUPP;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int ieee80211_ioctl_siwfreq(struct net_device *dev,
|
|
|
|
struct iw_request_info *info,
|
|
|
|
struct iw_freq *freq, char *extra)
|
|
|
|
{
|
|
|
|
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
|
|
|
|
2009-02-15 06:44:28 -05:00
|
|
|
if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
|
2009-04-19 15:25:43 -04:00
|
|
|
return cfg80211_ibss_wext_siwfreq(dev, info, freq, extra);
|
2009-02-15 06:44:28 -05:00
|
|
|
else if (sdata->vif.type == NL80211_IFTYPE_STATION)
|
|
|
|
sdata->u.mgd.flags &= ~IEEE80211_STA_AUTO_CHANNEL_SEL;
|
2007-05-05 14:45:53 -04:00
|
|
|
|
|
|
|
/* freq->e == 0: freq->m = channel; otherwise freq = m * 10^e */
|
|
|
|
if (freq->e == 0) {
|
|
|
|
if (freq->m < 0) {
|
2009-04-19 15:25:43 -04:00
|
|
|
if (sdata->vif.type == NL80211_IFTYPE_STATION)
|
2009-02-15 06:44:28 -05:00
|
|
|
sdata->u.mgd.flags |=
|
2007-08-28 17:01:54 -04:00
|
|
|
IEEE80211_STA_AUTO_CHANNEL_SEL;
|
2007-05-05 14:45:53 -04:00
|
|
|
return 0;
|
|
|
|
} else
|
2008-08-02 20:04:37 -04:00
|
|
|
return ieee80211_set_freq(sdata,
|
2008-01-24 13:38:38 -05:00
|
|
|
ieee80211_channel_to_frequency(freq->m));
|
2007-05-05 14:45:53 -04:00
|
|
|
} else {
|
|
|
|
int i, div = 1000000;
|
|
|
|
for (i = 0; i < freq->e; i++)
|
|
|
|
div /= 10;
|
|
|
|
if (div > 0)
|
2008-08-02 20:04:37 -04:00
|
|
|
return ieee80211_set_freq(sdata, freq->m / div);
|
2007-05-05 14:45:53 -04:00
|
|
|
else
|
|
|
|
return -EINVAL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int ieee80211_ioctl_giwfreq(struct net_device *dev,
|
|
|
|
struct iw_request_info *info,
|
|
|
|
struct iw_freq *freq, char *extra)
|
|
|
|
{
|
|
|
|
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
|
2009-04-19 15:25:43 -04:00
|
|
|
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
|
|
|
|
|
|
|
if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
|
|
|
|
return cfg80211_ibss_wext_giwfreq(dev, info, freq, extra);
|
2007-05-05 14:45:53 -04:00
|
|
|
|
2009-05-04 11:52:10 -04:00
|
|
|
freq->m = local->oper_channel->center_freq;
|
2007-05-05 14:45:53 -04:00
|
|
|
freq->e = 6;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int ieee80211_ioctl_siwessid(struct net_device *dev,
|
|
|
|
struct iw_request_info *info,
|
|
|
|
struct iw_point *data, char *ssid)
|
|
|
|
{
|
2009-04-19 15:25:43 -04:00
|
|
|
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
2007-05-05 14:45:53 -04:00
|
|
|
size_t len = data->length;
|
2009-02-15 06:44:28 -05:00
|
|
|
int ret;
|
2007-05-05 14:45:53 -04:00
|
|
|
|
2009-04-19 15:25:43 -04:00
|
|
|
if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
|
|
|
|
return cfg80211_ibss_wext_siwessid(dev, info, data, ssid);
|
|
|
|
|
2007-05-05 14:45:53 -04:00
|
|
|
/* iwconfig uses nul termination in SSID.. */
|
|
|
|
if (len > 0 && ssid[len - 1] == '\0')
|
|
|
|
len--;
|
|
|
|
|
2009-02-15 06:44:28 -05:00
|
|
|
if (sdata->vif.type == NL80211_IFTYPE_STATION) {
|
2007-08-28 17:01:54 -04:00
|
|
|
if (data->flags)
|
2009-02-15 06:44:28 -05:00
|
|
|
sdata->u.mgd.flags &= ~IEEE80211_STA_AUTO_SSID_SEL;
|
2007-08-28 17:01:54 -04:00
|
|
|
else
|
2009-02-15 06:44:28 -05:00
|
|
|
sdata->u.mgd.flags |= IEEE80211_STA_AUTO_SSID_SEL;
|
|
|
|
|
2008-08-02 20:04:37 -04:00
|
|
|
ret = ieee80211_sta_set_ssid(sdata, ssid, len);
|
2007-05-05 14:45:53 -04:00
|
|
|
if (ret)
|
|
|
|
return ret;
|
2009-02-15 06:44:28 -05:00
|
|
|
|
2009-03-19 07:39:22 -04:00
|
|
|
sdata->u.mgd.flags &= ~IEEE80211_STA_EXT_SME;
|
2009-05-11 14:57:57 -04:00
|
|
|
sdata->u.mgd.flags &= ~IEEE80211_STA_CONTROL_PORT;
|
2009-02-15 06:44:28 -05:00
|
|
|
ieee80211_sta_req_auth(sdata);
|
2007-05-05 14:45:53 -04:00
|
|
|
return 0;
|
2009-04-19 15:25:43 -04:00
|
|
|
}
|
2007-05-05 14:45:53 -04:00
|
|
|
|
|
|
|
return -EOPNOTSUPP;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int ieee80211_ioctl_giwessid(struct net_device *dev,
|
|
|
|
struct iw_request_info *info,
|
|
|
|
struct iw_point *data, char *ssid)
|
|
|
|
{
|
|
|
|
size_t len;
|
|
|
|
struct ieee80211_sub_if_data *sdata;
|
2009-04-19 15:25:43 -04:00
|
|
|
|
2007-05-05 14:45:53 -04:00
|
|
|
sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
2009-04-19 15:25:43 -04:00
|
|
|
|
|
|
|
if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
|
|
|
|
return cfg80211_ibss_wext_giwessid(dev, info, data, ssid);
|
|
|
|
|
2009-02-15 06:44:28 -05:00
|
|
|
if (sdata->vif.type == NL80211_IFTYPE_STATION) {
|
2008-08-02 20:04:37 -04:00
|
|
|
int res = ieee80211_sta_get_ssid(sdata, ssid, &len);
|
2007-05-05 14:45:53 -04:00
|
|
|
if (res == 0) {
|
|
|
|
data->length = len;
|
|
|
|
data->flags = 1;
|
|
|
|
} else
|
|
|
|
data->flags = 0;
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
return -EOPNOTSUPP;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int ieee80211_ioctl_siwap(struct net_device *dev,
|
|
|
|
struct iw_request_info *info,
|
|
|
|
struct sockaddr *ap_addr, char *extra)
|
|
|
|
{
|
2009-04-19 15:25:43 -04:00
|
|
|
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
|
|
|
|
|
|
|
if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
|
|
|
|
return cfg80211_ibss_wext_siwap(dev, info, ap_addr, extra);
|
2007-05-05 14:45:53 -04:00
|
|
|
|
2009-02-15 06:44:28 -05:00
|
|
|
if (sdata->vif.type == NL80211_IFTYPE_STATION) {
|
2007-05-05 14:45:53 -04:00
|
|
|
int ret;
|
2009-03-21 12:08:43 -04:00
|
|
|
|
2007-08-28 17:01:54 -04:00
|
|
|
if (is_zero_ether_addr((u8 *) &ap_addr->sa_data))
|
2009-02-15 06:44:28 -05:00
|
|
|
sdata->u.mgd.flags |= IEEE80211_STA_AUTO_BSSID_SEL |
|
2007-08-28 17:01:54 -04:00
|
|
|
IEEE80211_STA_AUTO_CHANNEL_SEL;
|
|
|
|
else if (is_broadcast_ether_addr((u8 *) &ap_addr->sa_data))
|
2009-02-15 06:44:28 -05:00
|
|
|
sdata->u.mgd.flags |= IEEE80211_STA_AUTO_BSSID_SEL;
|
2007-05-05 14:45:53 -04:00
|
|
|
else
|
2009-02-15 06:44:28 -05:00
|
|
|
sdata->u.mgd.flags &= ~IEEE80211_STA_AUTO_BSSID_SEL;
|
2008-08-02 20:04:37 -04:00
|
|
|
ret = ieee80211_sta_set_bssid(sdata, (u8 *) &ap_addr->sa_data);
|
2007-05-05 14:45:53 -04:00
|
|
|
if (ret)
|
|
|
|
return ret;
|
2009-03-19 07:39:22 -04:00
|
|
|
sdata->u.mgd.flags &= ~IEEE80211_STA_EXT_SME;
|
2009-05-11 14:57:57 -04:00
|
|
|
sdata->u.mgd.flags &= ~IEEE80211_STA_CONTROL_PORT;
|
2009-02-15 06:44:28 -05:00
|
|
|
ieee80211_sta_req_auth(sdata);
|
2007-05-05 14:45:53 -04:00
|
|
|
return 0;
|
2008-09-10 18:01:58 -04:00
|
|
|
} else if (sdata->vif.type == NL80211_IFTYPE_WDS) {
|
2008-02-25 10:27:49 -05:00
|
|
|
/*
|
|
|
|
* If it is necessary to update the WDS peer address
|
|
|
|
* while the interface is running, then we need to do
|
|
|
|
* more work here, namely if it is running we need to
|
|
|
|
* add a new and remove the old STA entry, this is
|
|
|
|
* normally handled by _open() and _stop().
|
|
|
|
*/
|
|
|
|
if (netif_running(dev))
|
|
|
|
return -EBUSY;
|
|
|
|
|
|
|
|
memcpy(&sdata->u.wds.remote_addr, (u8 *) &ap_addr->sa_data,
|
|
|
|
ETH_ALEN);
|
|
|
|
|
|
|
|
return 0;
|
2007-05-05 14:45:53 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return -EOPNOTSUPP;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int ieee80211_ioctl_giwap(struct net_device *dev,
|
|
|
|
struct iw_request_info *info,
|
|
|
|
struct sockaddr *ap_addr, char *extra)
|
|
|
|
{
|
2009-04-19 15:25:43 -04:00
|
|
|
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
|
|
|
|
|
|
|
if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
|
|
|
|
return cfg80211_ibss_wext_giwap(dev, info, ap_addr, extra);
|
2007-05-05 14:45:53 -04:00
|
|
|
|
2009-02-15 06:44:28 -05:00
|
|
|
if (sdata->vif.type == NL80211_IFTYPE_STATION) {
|
|
|
|
if (sdata->u.mgd.state == IEEE80211_STA_MLME_ASSOCIATED) {
|
2008-05-23 13:15:26 -04:00
|
|
|
ap_addr->sa_family = ARPHRD_ETHER;
|
2009-02-15 06:44:28 -05:00
|
|
|
memcpy(&ap_addr->sa_data, sdata->u.mgd.bssid, ETH_ALEN);
|
|
|
|
} else
|
2008-05-23 13:15:26 -04:00
|
|
|
memset(&ap_addr->sa_data, 0, ETH_ALEN);
|
2009-02-15 06:44:28 -05:00
|
|
|
return 0;
|
2008-09-10 18:01:58 -04:00
|
|
|
} else if (sdata->vif.type == NL80211_IFTYPE_WDS) {
|
2007-05-05 14:45:53 -04:00
|
|
|
ap_addr->sa_family = ARPHRD_ETHER;
|
|
|
|
memcpy(&ap_addr->sa_data, sdata->u.wds.remote_addr, ETH_ALEN);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
return -EOPNOTSUPP;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-07-10 13:32:10 -04:00
|
|
|
static int ieee80211_ioctl_siwrate(struct net_device *dev,
|
|
|
|
struct iw_request_info *info,
|
|
|
|
struct iw_param *rate, char *extra)
|
|
|
|
{
|
|
|
|
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
|
2008-01-24 13:38:38 -05:00
|
|
|
int i, err = -EINVAL;
|
2007-07-10 13:32:10 -04:00
|
|
|
u32 target_rate = rate->value / 100000;
|
|
|
|
struct ieee80211_sub_if_data *sdata;
|
2008-01-24 13:38:38 -05:00
|
|
|
struct ieee80211_supported_band *sband;
|
2007-07-10 13:32:10 -04:00
|
|
|
|
|
|
|
sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
2008-01-24 13:38:38 -05:00
|
|
|
|
|
|
|
sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
|
|
|
|
|
2007-07-10 13:32:10 -04:00
|
|
|
/* target_rate = -1, rate->fixed = 0 means auto only, so use all rates
|
|
|
|
* target_rate = X, rate->fixed = 1 means only rate X
|
|
|
|
* target_rate = X, rate->fixed = 0 means all rates <= X */
|
mac80211: make master netdev handling sane
Currently, almost every interface type has a 'bss' pointer
pointing to BSS information. This BSS information, however,
is for a _local_ BSS, not for the BSS we joined, so having
it on a STA mode interface makes little sense, but now they
have it pointing to the master device, which is an AP mode
virtual interface. However, except for some bitrate control
data, this pointer is only used in AP/VLAN modes (for power
saving stations.)
Overall, it is not necessary to even have the master netdev
be a valid virtual interface, and it doesn't have to be on
the list of interfaces either.
This patch changes the master netdev to be special, it now
- no longer is on the list of virtual interfaces, which
lets me remove a lot of tests for that
- no longer has sub_if_data attached, since that isn't used
Additionally, this patch changes some vlan/ap mode handling
that is related to these 'bss' pointers described above (but
in the VLAN case they actually make sense because there they
point to the AP they belong to); it also adds some debugging
code to IEEE80211_DEV_TO_SUB_IF to validate it is not called
on the master netdev any more.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-07-09 08:40:34 -04:00
|
|
|
sdata->max_ratectrl_rateidx = -1;
|
|
|
|
sdata->force_unicast_rateidx = -1;
|
2007-07-10 13:32:10 -04:00
|
|
|
if (rate->value < 0)
|
|
|
|
return 0;
|
2008-01-24 13:38:38 -05:00
|
|
|
|
|
|
|
for (i=0; i< sband->n_bitrates; i++) {
|
|
|
|
struct ieee80211_rate *brate = &sband->bitrates[i];
|
|
|
|
int this_rate = brate->bitrate;
|
2007-07-10 13:32:10 -04:00
|
|
|
|
|
|
|
if (target_rate == this_rate) {
|
mac80211: make master netdev handling sane
Currently, almost every interface type has a 'bss' pointer
pointing to BSS information. This BSS information, however,
is for a _local_ BSS, not for the BSS we joined, so having
it on a STA mode interface makes little sense, but now they
have it pointing to the master device, which is an AP mode
virtual interface. However, except for some bitrate control
data, this pointer is only used in AP/VLAN modes (for power
saving stations.)
Overall, it is not necessary to even have the master netdev
be a valid virtual interface, and it doesn't have to be on
the list of interfaces either.
This patch changes the master netdev to be special, it now
- no longer is on the list of virtual interfaces, which
lets me remove a lot of tests for that
- no longer has sub_if_data attached, since that isn't used
Additionally, this patch changes some vlan/ap mode handling
that is related to these 'bss' pointers described above (but
in the VLAN case they actually make sense because there they
point to the AP they belong to); it also adds some debugging
code to IEEE80211_DEV_TO_SUB_IF to validate it is not called
on the master netdev any more.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-07-09 08:40:34 -04:00
|
|
|
sdata->max_ratectrl_rateidx = i;
|
2007-07-10 13:32:10 -04:00
|
|
|
if (rate->fixed)
|
mac80211: make master netdev handling sane
Currently, almost every interface type has a 'bss' pointer
pointing to BSS information. This BSS information, however,
is for a _local_ BSS, not for the BSS we joined, so having
it on a STA mode interface makes little sense, but now they
have it pointing to the master device, which is an AP mode
virtual interface. However, except for some bitrate control
data, this pointer is only used in AP/VLAN modes (for power
saving stations.)
Overall, it is not necessary to even have the master netdev
be a valid virtual interface, and it doesn't have to be on
the list of interfaces either.
This patch changes the master netdev to be special, it now
- no longer is on the list of virtual interfaces, which
lets me remove a lot of tests for that
- no longer has sub_if_data attached, since that isn't used
Additionally, this patch changes some vlan/ap mode handling
that is related to these 'bss' pointers described above (but
in the VLAN case they actually make sense because there they
point to the AP they belong to); it also adds some debugging
code to IEEE80211_DEV_TO_SUB_IF to validate it is not called
on the master netdev any more.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-07-09 08:40:34 -04:00
|
|
|
sdata->force_unicast_rateidx = i;
|
2008-01-24 13:38:38 -05:00
|
|
|
err = 0;
|
|
|
|
break;
|
2007-07-10 13:32:10 -04:00
|
|
|
}
|
|
|
|
}
|
2008-01-24 13:38:38 -05:00
|
|
|
return err;
|
2007-07-10 13:32:10 -04:00
|
|
|
}
|
|
|
|
|
2007-06-10 20:57:33 -04:00
|
|
|
static int ieee80211_ioctl_giwrate(struct net_device *dev,
|
|
|
|
struct iw_request_info *info,
|
|
|
|
struct iw_param *rate, char *extra)
|
|
|
|
{
|
|
|
|
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
|
|
|
|
struct sta_info *sta;
|
|
|
|
struct ieee80211_sub_if_data *sdata;
|
2008-01-24 13:38:38 -05:00
|
|
|
struct ieee80211_supported_band *sband;
|
2007-06-10 20:57:33 -04:00
|
|
|
|
|
|
|
sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
2008-01-24 13:38:38 -05:00
|
|
|
|
2008-09-10 18:01:58 -04:00
|
|
|
if (sdata->vif.type != NL80211_IFTYPE_STATION)
|
2007-06-10 20:57:33 -04:00
|
|
|
return -EOPNOTSUPP;
|
2008-01-24 13:38:38 -05:00
|
|
|
|
|
|
|
sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
|
|
|
|
|
2008-04-04 17:40:35 -04:00
|
|
|
rcu_read_lock();
|
|
|
|
|
2009-02-15 06:44:28 -05:00
|
|
|
sta = sta_info_get(local, sdata->u.mgd.bssid);
|
2008-04-04 17:40:35 -04:00
|
|
|
|
2008-10-21 06:40:02 -04:00
|
|
|
if (sta && !(sta->last_tx_rate.flags & IEEE80211_TX_RC_MCS))
|
|
|
|
rate->value = sband->bitrates[sta->last_tx_rate.idx].bitrate;
|
2007-06-10 20:57:33 -04:00
|
|
|
else
|
|
|
|
rate->value = 0;
|
2008-04-04 17:40:35 -04:00
|
|
|
|
|
|
|
rcu_read_unlock();
|
|
|
|
|
|
|
|
if (!sta)
|
|
|
|
return -ENODEV;
|
|
|
|
|
2008-01-24 13:38:38 -05:00
|
|
|
rate->value *= 100000;
|
2008-02-25 10:27:46 -05:00
|
|
|
|
2007-06-10 20:57:33 -04:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2007-09-20 16:06:39 -04:00
|
|
|
static int ieee80211_ioctl_siwtxpower(struct net_device *dev,
|
|
|
|
struct iw_request_info *info,
|
|
|
|
union iwreq_data *data, char *extra)
|
|
|
|
{
|
|
|
|
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
|
2008-10-22 16:13:53 -04:00
|
|
|
struct ieee80211_channel* chan = local->hw.conf.channel;
|
2009-04-07 09:22:28 -04:00
|
|
|
bool reconf = false;
|
2008-10-09 06:18:51 -04:00
|
|
|
u32 reconf_flags = 0;
|
2008-01-24 13:38:38 -05:00
|
|
|
int new_power_level;
|
2007-09-20 16:06:39 -04:00
|
|
|
|
|
|
|
if ((data->txpower.flags & IW_TXPOW_TYPE) != IW_TXPOW_DBM)
|
|
|
|
return -EINVAL;
|
|
|
|
if (data->txpower.flags & IW_TXPOW_RANGE)
|
|
|
|
return -EINVAL;
|
2008-10-22 16:13:53 -04:00
|
|
|
if (!chan)
|
|
|
|
return -EINVAL;
|
2007-09-20 16:06:39 -04:00
|
|
|
|
2009-04-07 09:22:28 -04:00
|
|
|
/* only change when not disabling */
|
|
|
|
if (!data->txpower.disabled) {
|
|
|
|
if (data->txpower.fixed) {
|
|
|
|
if (data->txpower.value < 0)
|
|
|
|
return -EINVAL;
|
|
|
|
new_power_level = data->txpower.value;
|
|
|
|
/*
|
|
|
|
* Debatable, but we cannot do a fixed power
|
|
|
|
* level above the regulatory constraint.
|
|
|
|
* Use "iwconfig wlan0 txpower 15dBm" instead.
|
|
|
|
*/
|
|
|
|
if (new_power_level > chan->max_power)
|
|
|
|
return -EINVAL;
|
|
|
|
} else {
|
|
|
|
/*
|
|
|
|
* Automatic power level setting, max being the value
|
|
|
|
* passed in from userland.
|
|
|
|
*/
|
|
|
|
if (data->txpower.value < 0)
|
|
|
|
new_power_level = -1;
|
|
|
|
else
|
|
|
|
new_power_level = data->txpower.value;
|
|
|
|
}
|
|
|
|
|
|
|
|
reconf = true;
|
2007-10-24 17:30:36 -04:00
|
|
|
|
2009-04-07 09:22:28 -04:00
|
|
|
/*
|
|
|
|
* ieee80211_hw_config() will limit to the channel's
|
|
|
|
* max power and possibly power constraint from AP.
|
|
|
|
*/
|
|
|
|
local->user_power_level = new_power_level;
|
|
|
|
}
|
2007-10-24 17:30:36 -04:00
|
|
|
|
2007-09-20 16:06:39 -04:00
|
|
|
if (local->hw.conf.radio_enabled != !(data->txpower.disabled)) {
|
|
|
|
local->hw.conf.radio_enabled = !(data->txpower.disabled);
|
2008-10-09 06:18:51 -04:00
|
|
|
reconf_flags |= IEEE80211_CONF_CHANGE_RADIO_ENABLED;
|
2008-01-07 13:45:24 -05:00
|
|
|
ieee80211_led_radio(local, local->hw.conf.radio_enabled);
|
2007-09-20 16:06:39 -04:00
|
|
|
}
|
2007-10-24 17:30:36 -04:00
|
|
|
|
2009-04-07 09:22:28 -04:00
|
|
|
if (reconf || reconf_flags)
|
2008-10-09 06:18:51 -04:00
|
|
|
ieee80211_hw_config(local, reconf_flags);
|
2007-09-20 16:06:39 -04:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2007-08-10 12:23:20 -04:00
|
|
|
static int ieee80211_ioctl_giwtxpower(struct net_device *dev,
|
|
|
|
struct iw_request_info *info,
|
|
|
|
union iwreq_data *data, char *extra)
|
|
|
|
{
|
|
|
|
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
|
|
|
|
|
|
|
|
data->txpower.fixed = 1;
|
|
|
|
data->txpower.disabled = !(local->hw.conf.radio_enabled);
|
|
|
|
data->txpower.value = local->hw.conf.power_level;
|
|
|
|
data->txpower.flags = IW_TXPOW_DBM;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-07-04 04:49:31 -04:00
|
|
|
static int ieee80211_ioctl_siwpower(struct net_device *dev,
|
|
|
|
struct iw_request_info *info,
|
|
|
|
struct iw_param *wrq,
|
|
|
|
char *extra)
|
|
|
|
{
|
2008-12-18 16:35:13 -05:00
|
|
|
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
2008-07-04 04:49:31 -04:00
|
|
|
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
|
|
|
|
struct ieee80211_conf *conf = &local->hw.conf;
|
2009-04-16 07:17:24 -04:00
|
|
|
int timeout = 0;
|
2008-12-18 16:35:13 -05:00
|
|
|
bool ps;
|
|
|
|
|
2009-01-07 12:28:20 -05:00
|
|
|
if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_PS))
|
|
|
|
return -EOPNOTSUPP;
|
|
|
|
|
2008-12-18 16:35:13 -05:00
|
|
|
if (sdata->vif.type != NL80211_IFTYPE_STATION)
|
|
|
|
return -EINVAL;
|
2008-07-04 04:49:31 -04:00
|
|
|
|
|
|
|
if (wrq->disabled) {
|
2008-12-18 16:35:13 -05:00
|
|
|
ps = false;
|
2008-12-18 16:35:27 -05:00
|
|
|
timeout = 0;
|
2008-12-18 16:35:13 -05:00
|
|
|
goto set;
|
2008-07-04 04:49:31 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
switch (wrq->flags & IW_POWER_MODE) {
|
|
|
|
case IW_POWER_ON: /* If not specified */
|
|
|
|
case IW_POWER_MODE: /* If set all mask */
|
|
|
|
case IW_POWER_ALL_R: /* If explicitely state all */
|
2008-12-18 16:35:13 -05:00
|
|
|
ps = true;
|
2008-07-04 04:49:31 -04:00
|
|
|
break;
|
2008-12-18 16:35:27 -05:00
|
|
|
default: /* Otherwise we ignore */
|
2009-01-06 12:12:35 -05:00
|
|
|
return -EINVAL;
|
2008-07-04 04:49:31 -04:00
|
|
|
}
|
|
|
|
|
2009-01-06 12:12:35 -05:00
|
|
|
if (wrq->flags & ~(IW_POWER_MODE | IW_POWER_TIMEOUT))
|
|
|
|
return -EINVAL;
|
|
|
|
|
2008-12-18 16:35:27 -05:00
|
|
|
if (wrq->flags & IW_POWER_TIMEOUT)
|
|
|
|
timeout = wrq->value / 1000;
|
2008-12-18 16:35:13 -05:00
|
|
|
|
2009-01-07 12:28:20 -05:00
|
|
|
set:
|
2009-04-16 07:17:24 -04:00
|
|
|
if (ps == sdata->u.mgd.powersave && timeout == conf->dynamic_ps_timeout)
|
|
|
|
return 0;
|
2008-12-18 16:35:27 -05:00
|
|
|
|
2009-04-16 07:17:24 -04:00
|
|
|
sdata->u.mgd.powersave = ps;
|
2009-01-06 12:13:18 -05:00
|
|
|
conf->dynamic_ps_timeout = timeout;
|
2008-12-18 16:35:13 -05:00
|
|
|
|
2009-01-07 12:28:20 -05:00
|
|
|
if (local->hw.flags & IEEE80211_HW_SUPPORTS_DYNAMIC_PS)
|
2009-04-22 06:40:07 -04:00
|
|
|
ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
|
2009-01-07 12:28:20 -05:00
|
|
|
|
2009-04-16 07:17:25 -04:00
|
|
|
ieee80211_recalc_ps(local, -1);
|
2008-12-18 16:35:13 -05:00
|
|
|
|
2009-04-16 07:17:24 -04:00
|
|
|
return 0;
|
2008-07-04 04:49:31 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
static int ieee80211_ioctl_giwpower(struct net_device *dev,
|
|
|
|
struct iw_request_info *info,
|
|
|
|
union iwreq_data *wrqu,
|
|
|
|
char *extra)
|
|
|
|
{
|
2009-04-16 07:17:24 -04:00
|
|
|
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
2008-07-04 04:49:31 -04:00
|
|
|
|
2009-04-16 07:17:24 -04:00
|
|
|
wrqu->power.disabled = !sdata->u.mgd.powersave;
|
2008-07-04 04:49:31 -04:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2007-05-05 14:45:53 -04:00
|
|
|
static int ieee80211_ioctl_siwauth(struct net_device *dev,
|
|
|
|
struct iw_request_info *info,
|
|
|
|
struct iw_param *data, char *extra)
|
|
|
|
{
|
|
|
|
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
|
|
|
int ret = 0;
|
|
|
|
|
|
|
|
switch (data->flags & IW_AUTH_INDEX) {
|
|
|
|
case IW_AUTH_WPA_VERSION:
|
|
|
|
case IW_AUTH_CIPHER_GROUP:
|
|
|
|
case IW_AUTH_WPA_ENABLED:
|
|
|
|
case IW_AUTH_RX_UNENCRYPTED_EAPOL:
|
|
|
|
case IW_AUTH_KEY_MGMT:
|
2009-01-08 06:32:03 -05:00
|
|
|
case IW_AUTH_CIPHER_GROUP_MGMT:
|
2007-11-03 09:11:10 -04:00
|
|
|
break;
|
2008-12-23 11:00:50 -05:00
|
|
|
case IW_AUTH_CIPHER_PAIRWISE:
|
|
|
|
if (sdata->vif.type == NL80211_IFTYPE_STATION) {
|
|
|
|
if (data->value & (IW_AUTH_CIPHER_WEP40 |
|
|
|
|
IW_AUTH_CIPHER_WEP104 | IW_AUTH_CIPHER_TKIP))
|
2009-02-15 06:44:28 -05:00
|
|
|
sdata->u.mgd.flags |=
|
2008-12-23 11:00:50 -05:00
|
|
|
IEEE80211_STA_TKIP_WEP_USED;
|
|
|
|
else
|
2009-02-15 06:44:28 -05:00
|
|
|
sdata->u.mgd.flags &=
|
2008-12-23 11:00:50 -05:00
|
|
|
~IEEE80211_STA_TKIP_WEP_USED;
|
|
|
|
}
|
|
|
|
break;
|
2007-11-28 05:04:21 -05:00
|
|
|
case IW_AUTH_DROP_UNENCRYPTED:
|
|
|
|
sdata->drop_unencrypted = !!data->value;
|
|
|
|
break;
|
2007-11-03 09:11:10 -04:00
|
|
|
case IW_AUTH_PRIVACY_INVOKED:
|
2008-09-10 18:01:58 -04:00
|
|
|
if (sdata->vif.type != NL80211_IFTYPE_STATION)
|
2007-05-05 14:45:53 -04:00
|
|
|
ret = -EINVAL;
|
|
|
|
else {
|
2009-02-15 06:44:28 -05:00
|
|
|
sdata->u.mgd.flags &= ~IEEE80211_STA_PRIVACY_INVOKED;
|
2007-05-05 14:45:53 -04:00
|
|
|
/*
|
2007-11-03 09:11:10 -04:00
|
|
|
* Privacy invoked by wpa_supplicant, store the
|
|
|
|
* value and allow associating to a protected
|
|
|
|
* network without having a key up front.
|
2007-05-05 14:45:53 -04:00
|
|
|
*/
|
2007-11-03 09:11:10 -04:00
|
|
|
if (data->value)
|
2009-02-15 06:44:28 -05:00
|
|
|
sdata->u.mgd.flags |=
|
2007-11-03 09:11:10 -04:00
|
|
|
IEEE80211_STA_PRIVACY_INVOKED;
|
2007-05-05 14:45:53 -04:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case IW_AUTH_80211_AUTH_ALG:
|
2009-02-15 06:44:28 -05:00
|
|
|
if (sdata->vif.type == NL80211_IFTYPE_STATION)
|
|
|
|
sdata->u.mgd.auth_algs = data->value;
|
2007-05-05 14:45:53 -04:00
|
|
|
else
|
|
|
|
ret = -EOPNOTSUPP;
|
|
|
|
break;
|
2009-01-08 06:32:05 -05:00
|
|
|
case IW_AUTH_MFP:
|
2009-01-08 06:32:11 -05:00
|
|
|
if (!(sdata->local->hw.flags & IEEE80211_HW_MFP_CAPABLE)) {
|
|
|
|
ret = -EOPNOTSUPP;
|
|
|
|
break;
|
|
|
|
}
|
2009-02-15 06:44:28 -05:00
|
|
|
if (sdata->vif.type == NL80211_IFTYPE_STATION) {
|
2009-02-10 15:25:40 -05:00
|
|
|
switch (data->value) {
|
|
|
|
case IW_AUTH_MFP_DISABLED:
|
2009-02-15 06:44:28 -05:00
|
|
|
sdata->u.mgd.mfp = IEEE80211_MFP_DISABLED;
|
2009-02-10 15:25:40 -05:00
|
|
|
break;
|
|
|
|
case IW_AUTH_MFP_OPTIONAL:
|
2009-02-15 06:44:28 -05:00
|
|
|
sdata->u.mgd.mfp = IEEE80211_MFP_OPTIONAL;
|
2009-02-10 15:25:40 -05:00
|
|
|
break;
|
|
|
|
case IW_AUTH_MFP_REQUIRED:
|
2009-02-15 06:44:28 -05:00
|
|
|
sdata->u.mgd.mfp = IEEE80211_MFP_REQUIRED;
|
2009-02-10 15:25:40 -05:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
ret = -EINVAL;
|
|
|
|
}
|
|
|
|
} else
|
2009-01-08 06:32:05 -05:00
|
|
|
ret = -EOPNOTSUPP;
|
|
|
|
break;
|
2007-05-05 14:45:53 -04:00
|
|
|
default:
|
|
|
|
ret = -EOPNOTSUPP;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Get wireless statistics. Called by /proc/net/wireless and by SIOCGIWSTATS */
|
|
|
|
static struct iw_statistics *ieee80211_get_wireless_stats(struct net_device *dev)
|
|
|
|
{
|
|
|
|
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
|
|
|
|
struct iw_statistics *wstats = &local->wstats;
|
|
|
|
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
|
|
|
struct sta_info *sta = NULL;
|
|
|
|
|
2008-04-10 09:36:09 -04:00
|
|
|
rcu_read_lock();
|
|
|
|
|
2009-02-15 06:44:28 -05:00
|
|
|
if (sdata->vif.type == NL80211_IFTYPE_STATION)
|
|
|
|
sta = sta_info_get(local, sdata->u.mgd.bssid);
|
|
|
|
|
2007-05-05 14:45:53 -04:00
|
|
|
if (!sta) {
|
|
|
|
wstats->discard.fragment = 0;
|
|
|
|
wstats->discard.misc = 0;
|
|
|
|
wstats->qual.qual = 0;
|
|
|
|
wstats->qual.level = 0;
|
|
|
|
wstats->qual.noise = 0;
|
|
|
|
wstats->qual.updated = IW_QUAL_ALL_INVALID;
|
|
|
|
} else {
|
2009-02-27 17:33:55 -05:00
|
|
|
wstats->qual.updated = 0;
|
|
|
|
/*
|
|
|
|
* mirror what cfg80211 does for iwrange/scan results,
|
|
|
|
* otherwise userspace gets confused.
|
|
|
|
*/
|
|
|
|
if (local->hw.flags & (IEEE80211_HW_SIGNAL_UNSPEC |
|
|
|
|
IEEE80211_HW_SIGNAL_DBM)) {
|
|
|
|
wstats->qual.updated |= IW_QUAL_LEVEL_UPDATED;
|
|
|
|
wstats->qual.updated |= IW_QUAL_QUAL_UPDATED;
|
|
|
|
} else {
|
|
|
|
wstats->qual.updated |= IW_QUAL_LEVEL_INVALID;
|
|
|
|
wstats->qual.updated |= IW_QUAL_QUAL_INVALID;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (local->hw.flags & IEEE80211_HW_SIGNAL_UNSPEC) {
|
|
|
|
wstats->qual.level = sta->last_signal;
|
|
|
|
wstats->qual.qual = sta->last_signal;
|
|
|
|
} else if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM) {
|
|
|
|
int sig = sta->last_signal;
|
|
|
|
|
|
|
|
wstats->qual.updated |= IW_QUAL_DBM;
|
|
|
|
wstats->qual.level = sig;
|
|
|
|
if (sig < -110)
|
|
|
|
sig = -110;
|
|
|
|
else if (sig > -40)
|
|
|
|
sig = -40;
|
|
|
|
wstats->qual.qual = sig + 110;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (local->hw.flags & IEEE80211_HW_NOISE_DBM) {
|
|
|
|
/*
|
|
|
|
* This assumes that if driver reports noise, it also
|
|
|
|
* reports signal in dBm.
|
|
|
|
*/
|
|
|
|
wstats->qual.noise = sta->last_noise;
|
|
|
|
wstats->qual.updated |= IW_QUAL_NOISE_UPDATED;
|
|
|
|
} else {
|
|
|
|
wstats->qual.updated |= IW_QUAL_NOISE_INVALID;
|
|
|
|
}
|
2007-05-05 14:45:53 -04:00
|
|
|
}
|
2008-04-10 09:36:09 -04:00
|
|
|
|
|
|
|
rcu_read_unlock();
|
|
|
|
|
2007-05-05 14:45:53 -04:00
|
|
|
return wstats;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int ieee80211_ioctl_giwauth(struct net_device *dev,
|
|
|
|
struct iw_request_info *info,
|
|
|
|
struct iw_param *data, char *extra)
|
|
|
|
{
|
|
|
|
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
|
|
|
int ret = 0;
|
|
|
|
|
|
|
|
switch (data->flags & IW_AUTH_INDEX) {
|
|
|
|
case IW_AUTH_80211_AUTH_ALG:
|
2009-02-15 06:44:28 -05:00
|
|
|
if (sdata->vif.type == NL80211_IFTYPE_STATION)
|
|
|
|
data->value = sdata->u.mgd.auth_algs;
|
2007-05-05 14:45:53 -04:00
|
|
|
else
|
|
|
|
ret = -EOPNOTSUPP;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
ret = -EOPNOTSUPP;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Structures to export the Wireless Handlers */
|
|
|
|
|
|
|
|
static const iw_handler ieee80211_handler[] =
|
|
|
|
{
|
|
|
|
(iw_handler) NULL, /* SIOCSIWCOMMIT */
|
2008-11-26 16:36:31 -05:00
|
|
|
(iw_handler) cfg80211_wext_giwname, /* SIOCGIWNAME */
|
2007-05-05 14:45:53 -04:00
|
|
|
(iw_handler) NULL, /* SIOCSIWNWID */
|
|
|
|
(iw_handler) NULL, /* SIOCGIWNWID */
|
|
|
|
(iw_handler) ieee80211_ioctl_siwfreq, /* SIOCSIWFREQ */
|
|
|
|
(iw_handler) ieee80211_ioctl_giwfreq, /* SIOCGIWFREQ */
|
2008-11-26 17:31:40 -05:00
|
|
|
(iw_handler) cfg80211_wext_siwmode, /* SIOCSIWMODE */
|
|
|
|
(iw_handler) cfg80211_wext_giwmode, /* SIOCGIWMODE */
|
2007-05-05 14:45:53 -04:00
|
|
|
(iw_handler) NULL, /* SIOCSIWSENS */
|
|
|
|
(iw_handler) NULL, /* SIOCGIWSENS */
|
|
|
|
(iw_handler) NULL /* not used */, /* SIOCSIWRANGE */
|
2009-02-18 13:32:08 -05:00
|
|
|
(iw_handler) cfg80211_wext_giwrange, /* SIOCGIWRANGE */
|
2007-05-05 14:45:53 -04:00
|
|
|
(iw_handler) NULL /* not used */, /* SIOCSIWPRIV */
|
|
|
|
(iw_handler) NULL /* kernel code */, /* SIOCGIWPRIV */
|
|
|
|
(iw_handler) NULL /* not used */, /* SIOCSIWSTATS */
|
|
|
|
(iw_handler) NULL /* kernel code */, /* SIOCGIWSTATS */
|
2007-09-14 11:10:24 -04:00
|
|
|
(iw_handler) NULL, /* SIOCSIWSPY */
|
|
|
|
(iw_handler) NULL, /* SIOCGIWSPY */
|
|
|
|
(iw_handler) NULL, /* SIOCSIWTHRSPY */
|
|
|
|
(iw_handler) NULL, /* SIOCGIWTHRSPY */
|
2007-05-05 14:45:53 -04:00
|
|
|
(iw_handler) ieee80211_ioctl_siwap, /* SIOCSIWAP */
|
|
|
|
(iw_handler) ieee80211_ioctl_giwap, /* SIOCGIWAP */
|
2009-04-19 13:57:45 -04:00
|
|
|
(iw_handler) cfg80211_wext_siwmlme, /* SIOCSIWMLME */
|
2007-05-05 14:45:53 -04:00
|
|
|
(iw_handler) NULL, /* SIOCGIWAPLIST */
|
2009-02-10 15:25:55 -05:00
|
|
|
(iw_handler) cfg80211_wext_siwscan, /* SIOCSIWSCAN */
|
|
|
|
(iw_handler) cfg80211_wext_giwscan, /* SIOCGIWSCAN */
|
2007-05-05 14:45:53 -04:00
|
|
|
(iw_handler) ieee80211_ioctl_siwessid, /* SIOCSIWESSID */
|
|
|
|
(iw_handler) ieee80211_ioctl_giwessid, /* SIOCGIWESSID */
|
|
|
|
(iw_handler) NULL, /* SIOCSIWNICKN */
|
|
|
|
(iw_handler) NULL, /* SIOCGIWNICKN */
|
|
|
|
(iw_handler) NULL, /* -- hole -- */
|
|
|
|
(iw_handler) NULL, /* -- hole -- */
|
2007-07-10 13:32:10 -04:00
|
|
|
(iw_handler) ieee80211_ioctl_siwrate, /* SIOCSIWRATE */
|
2007-06-10 20:57:33 -04:00
|
|
|
(iw_handler) ieee80211_ioctl_giwrate, /* SIOCGIWRATE */
|
2009-04-20 12:39:05 -04:00
|
|
|
(iw_handler) cfg80211_wext_siwrts, /* SIOCSIWRTS */
|
|
|
|
(iw_handler) cfg80211_wext_giwrts, /* SIOCGIWRTS */
|
|
|
|
(iw_handler) cfg80211_wext_siwfrag, /* SIOCSIWFRAG */
|
|
|
|
(iw_handler) cfg80211_wext_giwfrag, /* SIOCGIWFRAG */
|
2007-09-20 16:06:39 -04:00
|
|
|
(iw_handler) ieee80211_ioctl_siwtxpower, /* SIOCSIWTXPOW */
|
2007-08-10 12:23:20 -04:00
|
|
|
(iw_handler) ieee80211_ioctl_giwtxpower, /* SIOCGIWTXPOW */
|
2009-04-20 12:39:05 -04:00
|
|
|
(iw_handler) cfg80211_wext_siwretry, /* SIOCSIWRETRY */
|
|
|
|
(iw_handler) cfg80211_wext_giwretry, /* SIOCGIWRETRY */
|
2009-05-11 07:54:58 -04:00
|
|
|
(iw_handler) cfg80211_wext_siwencode, /* SIOCSIWENCODE */
|
|
|
|
(iw_handler) cfg80211_wext_giwencode, /* SIOCGIWENCODE */
|
2008-07-04 04:49:31 -04:00
|
|
|
(iw_handler) ieee80211_ioctl_siwpower, /* SIOCSIWPOWER */
|
|
|
|
(iw_handler) ieee80211_ioctl_giwpower, /* SIOCGIWPOWER */
|
2007-05-05 14:45:53 -04:00
|
|
|
(iw_handler) NULL, /* -- hole -- */
|
|
|
|
(iw_handler) NULL, /* -- hole -- */
|
|
|
|
(iw_handler) ieee80211_ioctl_siwgenie, /* SIOCSIWGENIE */
|
|
|
|
(iw_handler) NULL, /* SIOCGIWGENIE */
|
|
|
|
(iw_handler) ieee80211_ioctl_siwauth, /* SIOCSIWAUTH */
|
|
|
|
(iw_handler) ieee80211_ioctl_giwauth, /* SIOCGIWAUTH */
|
2009-05-11 07:54:58 -04:00
|
|
|
(iw_handler) cfg80211_wext_siwencodeext, /* SIOCSIWENCODEEXT */
|
2007-05-05 14:45:53 -04:00
|
|
|
(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 = ieee80211_get_wireless_stats,
|
|
|
|
};
|