Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159282
b: refs/heads/master
c: 562e482
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jul 29, 2009
1 parent 6237078 commit 384fcef
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 106 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0e82ffe3b90bcad72cfe80e4379946b8fb0691ca
refs/heads/master: 562e482265ac4d660d9f0114419591d62f44361d
34 changes: 2 additions & 32 deletions trunk/drivers/net/wireless/iwmc3200wifi/wext.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,36 +27,6 @@
#include "iwm.h"
#include "commands.h"

static int iwm_wext_siwap(struct net_device *dev, struct iw_request_info *info,
struct sockaddr *ap_addr, char *extra)
{
struct iwm_priv *iwm = ndev_to_iwm(dev);

switch (iwm->conf.mode) {
case UMAC_MODE_IBSS:
return cfg80211_ibss_wext_siwap(dev, info, ap_addr, extra);
case UMAC_MODE_BSS:
return cfg80211_mgd_wext_siwap(dev, info, ap_addr, extra);
default:
return -EOPNOTSUPP;
}
}

static int iwm_wext_giwap(struct net_device *dev, struct iw_request_info *info,
struct sockaddr *ap_addr, char *extra)
{
struct iwm_priv *iwm = ndev_to_iwm(dev);

switch (iwm->conf.mode) {
case UMAC_MODE_IBSS:
return cfg80211_ibss_wext_giwap(dev, info, ap_addr, extra);
case UMAC_MODE_BSS:
return cfg80211_mgd_wext_giwap(dev, info, ap_addr, extra);
default:
return -EOPNOTSUPP;
}
}

static int iwm_wext_siwessid(struct net_device *dev,
struct iw_request_info *info,
struct iw_point *data, char *ssid)
Expand Down Expand Up @@ -111,8 +81,8 @@ static const iw_handler iwm_handlers[] =
(iw_handler) NULL, /* SIOCGIWSPY */
(iw_handler) NULL, /* SIOCSIWTHRSPY */
(iw_handler) NULL, /* SIOCGIWTHRSPY */
(iw_handler) iwm_wext_siwap, /* SIOCSIWAP */
(iw_handler) iwm_wext_giwap, /* SIOCGIWAP */
(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 */
Expand Down
24 changes: 6 additions & 18 deletions trunk/include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -1601,25 +1601,13 @@ int cfg80211_ibss_wext_siwessid(struct net_device *dev,
int cfg80211_ibss_wext_giwessid(struct net_device *dev,
struct iw_request_info *info,
struct iw_point *data, char *ssid);
int cfg80211_ibss_wext_siwap(struct net_device *dev,
struct iw_request_info *info,
struct sockaddr *ap_addr, char *extra);
int cfg80211_ibss_wext_giwap(struct net_device *dev,
struct iw_request_info *info,
struct sockaddr *ap_addr, char *extra);

int cfg80211_mgd_wext_siwessid(struct net_device *dev,
struct iw_request_info *info,
struct iw_point *data, char *ssid);
int cfg80211_mgd_wext_giwessid(struct net_device *dev,
struct iw_request_info *info,
struct iw_point *data, char *ssid);
int cfg80211_mgd_wext_siwap(struct net_device *dev,
struct iw_request_info *info,
struct sockaddr *ap_addr, char *extra);
int cfg80211_mgd_wext_giwap(struct net_device *dev,
struct iw_request_info *info,
struct sockaddr *ap_addr, char *extra);
int cfg80211_wext_siwgenie(struct net_device *dev,
struct iw_request_info *info,
struct iw_point *data, char *extra);
Expand Down Expand Up @@ -1686,12 +1674,12 @@ int cfg80211_wext_giwpower(struct net_device *dev,
struct iw_request_info *info,
struct iw_param *wrq, char *extra);

int cfg80211_wds_wext_siwap(struct net_device *dev,
struct iw_request_info *info,
struct sockaddr *addr, char *extra);
int cfg80211_wds_wext_giwap(struct net_device *dev,
struct iw_request_info *info,
struct sockaddr *addr, char *extra);
int cfg80211_wext_siwap(struct net_device *dev,
struct iw_request_info *info,
struct sockaddr *ap_addr, char *extra);
int cfg80211_wext_giwap(struct net_device *dev,
struct iw_request_info *info,
struct sockaddr *ap_addr, char *extra);

/*
* callbacks for asynchronous cfg80211 methods, notification
Expand Down
41 changes: 2 additions & 39 deletions trunk/net/mac80211/wext.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,43 +59,6 @@ static int ieee80211_ioctl_giwessid(struct net_device *dev,
}


static int ieee80211_ioctl_siwap(struct net_device *dev,
struct iw_request_info *info,
struct sockaddr *ap_addr, char *extra)
{
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);

if (sdata->vif.type == NL80211_IFTYPE_STATION)
return cfg80211_mgd_wext_siwap(dev, info, ap_addr, extra);

if (sdata->vif.type == NL80211_IFTYPE_WDS)
return cfg80211_wds_wext_siwap(dev, info, ap_addr, extra);
return -EOPNOTSUPP;
}


static int ieee80211_ioctl_giwap(struct net_device *dev,
struct iw_request_info *info,
struct sockaddr *ap_addr, char *extra)
{
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);

if (sdata->vif.type == NL80211_IFTYPE_STATION)
return cfg80211_mgd_wext_giwap(dev, info, ap_addr, extra);

if (sdata->vif.type == NL80211_IFTYPE_WDS)
return cfg80211_wds_wext_giwap(dev, info, ap_addr, extra);

return -EOPNOTSUPP;
}


/* Structures to export the Wireless Handlers */

static const iw_handler ieee80211_handler[] =
Expand All @@ -120,8 +83,8 @@ static const iw_handler ieee80211_handler[] =
(iw_handler) NULL, /* SIOCGIWSPY */
(iw_handler) NULL, /* SIOCSIWTHRSPY */
(iw_handler) NULL, /* SIOCGIWTHRSPY */
(iw_handler) ieee80211_ioctl_siwap, /* SIOCSIWAP */
(iw_handler) ieee80211_ioctl_giwap, /* SIOCGIWAP */
(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 */
Expand Down
4 changes: 0 additions & 4 deletions trunk/net/wireless/ibss.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,6 @@ int cfg80211_ibss_wext_siwap(struct net_device *dev,

return err;
}
/* temporary symbol - mark GPL - in the future the handler won't be */
EXPORT_SYMBOL_GPL(cfg80211_ibss_wext_siwap);

int cfg80211_ibss_wext_giwap(struct net_device *dev,
struct iw_request_info *info,
Expand All @@ -493,6 +491,4 @@ int cfg80211_ibss_wext_giwap(struct net_device *dev,

return 0;
}
/* temporary symbol - mark GPL - in the future the handler won't be */
EXPORT_SYMBOL_GPL(cfg80211_ibss_wext_giwap);
#endif
52 changes: 44 additions & 8 deletions trunk/net/wireless/wext-compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1149,9 +1149,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);
Expand All @@ -1177,11 +1177,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;

Expand All @@ -1193,7 +1192,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,
Expand Down Expand Up @@ -1327,3 +1325,41 @@ 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);
12 changes: 12 additions & 0 deletions trunk/net/wireless/wext-compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,25 @@ int cfg80211_ibss_wext_siwfreq(struct net_device *dev,
int cfg80211_ibss_wext_giwfreq(struct net_device *dev,
struct iw_request_info *info,
struct iw_freq *freq, char *extra);
int cfg80211_ibss_wext_siwap(struct net_device *dev,
struct iw_request_info *info,
struct sockaddr *ap_addr, char *extra);
int cfg80211_ibss_wext_giwap(struct net_device *dev,
struct iw_request_info *info,
struct sockaddr *ap_addr, char *extra);

int cfg80211_mgd_wext_siwfreq(struct net_device *dev,
struct iw_request_info *info,
struct iw_freq *freq, char *extra);
int cfg80211_mgd_wext_giwfreq(struct net_device *dev,
struct iw_request_info *info,
struct iw_freq *freq, char *extra);
int cfg80211_mgd_wext_siwap(struct net_device *dev,
struct iw_request_info *info,
struct sockaddr *ap_addr, char *extra);
int cfg80211_mgd_wext_giwap(struct net_device *dev,
struct iw_request_info *info,
struct sockaddr *ap_addr, char *extra);

struct ieee80211_channel *cfg80211_wext_freq(struct wiphy *wiphy,
struct iw_freq *freq);
Expand Down
4 changes: 0 additions & 4 deletions trunk/net/wireless/wext-sme.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,6 @@ int cfg80211_mgd_wext_siwap(struct net_device *dev,
cfg80211_unlock_rdev(wiphy_to_dev(wdev->wiphy));
return err;
}
/* temporary symbol - mark GPL - in the future the handler won't be */
EXPORT_SYMBOL_GPL(cfg80211_mgd_wext_siwap);

int cfg80211_mgd_wext_giwap(struct net_device *dev,
struct iw_request_info *info,
Expand All @@ -299,8 +297,6 @@ int cfg80211_mgd_wext_giwap(struct net_device *dev,

return 0;
}
/* temporary symbol - mark GPL - in the future the handler won't be */
EXPORT_SYMBOL_GPL(cfg80211_mgd_wext_giwap);

int cfg80211_wext_siwgenie(struct net_device *dev,
struct iw_request_info *info,
Expand Down

0 comments on commit 384fcef

Please sign in to comment.