aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/iwmc3200wifi/wext.c34
-rw-r--r--include/net/cfg80211.h24
-rw-r--r--net/mac80211/wext.c41
-rw-r--r--net/wireless/ibss.c4
-rw-r--r--net/wireless/wext-compat.c52
-rw-r--r--net/wireless/wext-compat.h12
-rw-r--r--net/wireless/wext-sme.c4
7 files changed, 66 insertions, 105 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/wext.c b/drivers/net/wireless/iwmc3200wifi/wext.c
index 8058e9991c30..5319b16474e3 100644
--- a/drivers/net/wireless/iwmc3200wifi/wext.c
+++ b/drivers/net/wireless/iwmc3200wifi/wext.c
@@ -27,36 +27,6 @@
27#include "iwm.h" 27#include "iwm.h"
28#include "commands.h" 28#include "commands.h"
29 29
30static int iwm_wext_siwap(struct net_device *dev, struct iw_request_info *info,
31 struct sockaddr *ap_addr, char *extra)
32{
33 struct iwm_priv *iwm = ndev_to_iwm(dev);
34
35 switch (iwm->conf.mode) {
36 case UMAC_MODE_IBSS:
37 return cfg80211_ibss_wext_siwap(dev, info, ap_addr, extra);
38 case UMAC_MODE_BSS:
39 return cfg80211_mgd_wext_siwap(dev, info, ap_addr, extra);
40 default:
41 return -EOPNOTSUPP;
42 }
43}
44
45static int iwm_wext_giwap(struct net_device *dev, struct iw_request_info *info,
46 struct sockaddr *ap_addr, char *extra)
47{
48 struct iwm_priv *iwm = ndev_to_iwm(dev);
49
50 switch (iwm->conf.mode) {
51 case UMAC_MODE_IBSS:
52 return cfg80211_ibss_wext_giwap(dev, info, ap_addr, extra);
53 case UMAC_MODE_BSS:
54 return cfg80211_mgd_wext_giwap(dev, info, ap_addr, extra);
55 default:
56 return -EOPNOTSUPP;
57 }
58}
59
60static int iwm_wext_siwessid(struct net_device *dev, 30static int iwm_wext_siwessid(struct net_device *dev,
61 struct iw_request_info *info, 31 struct iw_request_info *info,
62 struct iw_point *data, char *ssid) 32 struct iw_point *data, char *ssid)
@@ -111,8 +81,8 @@ static const iw_handler iwm_handlers[] =
111 (iw_handler) NULL, /* SIOCGIWSPY */ 81 (iw_handler) NULL, /* SIOCGIWSPY */
112 (iw_handler) NULL, /* SIOCSIWTHRSPY */ 82 (iw_handler) NULL, /* SIOCSIWTHRSPY */
113 (iw_handler) NULL, /* SIOCGIWTHRSPY */ 83 (iw_handler) NULL, /* SIOCGIWTHRSPY */
114 (iw_handler) iwm_wext_siwap, /* SIOCSIWAP */ 84 (iw_handler) cfg80211_wext_siwap, /* SIOCSIWAP */
115 (iw_handler) iwm_wext_giwap, /* SIOCGIWAP */ 85 (iw_handler) cfg80211_wext_giwap, /* SIOCGIWAP */
116 (iw_handler) NULL, /* SIOCSIWMLME */ 86 (iw_handler) NULL, /* SIOCSIWMLME */
117 (iw_handler) NULL, /* SIOCGIWAPLIST */ 87 (iw_handler) NULL, /* SIOCGIWAPLIST */
118 (iw_handler) cfg80211_wext_siwscan, /* SIOCSIWSCAN */ 88 (iw_handler) cfg80211_wext_siwscan, /* SIOCSIWSCAN */
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 5d249c4bf225..3348c16e1f35 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1601,12 +1601,6 @@ int cfg80211_ibss_wext_siwessid(struct net_device *dev,
1601int cfg80211_ibss_wext_giwessid(struct net_device *dev, 1601int cfg80211_ibss_wext_giwessid(struct net_device *dev,
1602 struct iw_request_info *info, 1602 struct iw_request_info *info,
1603 struct iw_point *data, char *ssid); 1603 struct iw_point *data, char *ssid);
1604int cfg80211_ibss_wext_siwap(struct net_device *dev,
1605 struct iw_request_info *info,
1606 struct sockaddr *ap_addr, char *extra);
1607int cfg80211_ibss_wext_giwap(struct net_device *dev,
1608 struct iw_request_info *info,
1609 struct sockaddr *ap_addr, char *extra);
1610 1604
1611int cfg80211_mgd_wext_siwessid(struct net_device *dev, 1605int cfg80211_mgd_wext_siwessid(struct net_device *dev,
1612 struct iw_request_info *info, 1606 struct iw_request_info *info,
@@ -1614,12 +1608,6 @@ int cfg80211_mgd_wext_siwessid(struct net_device *dev,
1614int cfg80211_mgd_wext_giwessid(struct net_device *dev, 1608int cfg80211_mgd_wext_giwessid(struct net_device *dev,
1615 struct iw_request_info *info, 1609 struct iw_request_info *info,
1616 struct iw_point *data, char *ssid); 1610 struct iw_point *data, char *ssid);
1617int cfg80211_mgd_wext_siwap(struct net_device *dev,
1618 struct iw_request_info *info,
1619 struct sockaddr *ap_addr, char *extra);
1620int cfg80211_mgd_wext_giwap(struct net_device *dev,
1621 struct iw_request_info *info,
1622 struct sockaddr *ap_addr, char *extra);
1623int cfg80211_wext_siwgenie(struct net_device *dev, 1611int cfg80211_wext_siwgenie(struct net_device *dev,
1624 struct iw_request_info *info, 1612 struct iw_request_info *info,
1625 struct iw_point *data, char *extra); 1613 struct iw_point *data, char *extra);
@@ -1686,12 +1674,12 @@ int cfg80211_wext_giwpower(struct net_device *dev,
1686 struct iw_request_info *info, 1674 struct iw_request_info *info,
1687 struct iw_param *wrq, char *extra); 1675 struct iw_param *wrq, char *extra);
1688 1676
1689int cfg80211_wds_wext_siwap(struct net_device *dev, 1677int cfg80211_wext_siwap(struct net_device *dev,
1690 struct iw_request_info *info, 1678 struct iw_request_info *info,
1691 struct sockaddr *addr, char *extra); 1679 struct sockaddr *ap_addr, char *extra);
1692int cfg80211_wds_wext_giwap(struct net_device *dev, 1680int cfg80211_wext_giwap(struct net_device *dev,
1693 struct iw_request_info *info, 1681 struct iw_request_info *info,
1694 struct sockaddr *addr, char *extra); 1682 struct sockaddr *ap_addr, char *extra);
1695 1683
1696/* 1684/*
1697 * callbacks for asynchronous cfg80211 methods, notification 1685 * callbacks for asynchronous cfg80211 methods, notification
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index 7cd9aa79ef52..72866c8b8c3d 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -59,43 +59,6 @@ static int ieee80211_ioctl_giwessid(struct net_device *dev,
59} 59}
60 60
61 61
62static int ieee80211_ioctl_siwap(struct net_device *dev,
63 struct iw_request_info *info,
64 struct sockaddr *ap_addr, char *extra)
65{
66 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
67
68 if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
69 return cfg80211_ibss_wext_siwap(dev, info, ap_addr, extra);
70
71 if (sdata->vif.type == NL80211_IFTYPE_STATION)
72 return cfg80211_mgd_wext_siwap(dev, info, ap_addr, extra);
73
74 if (sdata->vif.type == NL80211_IFTYPE_WDS)
75 return cfg80211_wds_wext_siwap(dev, info, ap_addr, extra);
76 return -EOPNOTSUPP;
77}
78
79
80static int ieee80211_ioctl_giwap(struct net_device *dev,
81 struct iw_request_info *info,
82 struct sockaddr *ap_addr, char *extra)
83{
84 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
85
86 if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
87 return cfg80211_ibss_wext_giwap(dev, info, ap_addr, extra);
88
89 if (sdata->vif.type == NL80211_IFTYPE_STATION)
90 return cfg80211_mgd_wext_giwap(dev, info, ap_addr, extra);
91
92 if (sdata->vif.type == NL80211_IFTYPE_WDS)
93 return cfg80211_wds_wext_giwap(dev, info, ap_addr, extra);
94
95 return -EOPNOTSUPP;
96}
97
98
99/* Structures to export the Wireless Handlers */ 62/* Structures to export the Wireless Handlers */
100 63
101static const iw_handler ieee80211_handler[] = 64static const iw_handler ieee80211_handler[] =
@@ -120,8 +83,8 @@ static const iw_handler ieee80211_handler[] =
120 (iw_handler) NULL, /* SIOCGIWSPY */ 83 (iw_handler) NULL, /* SIOCGIWSPY */
121 (iw_handler) NULL, /* SIOCSIWTHRSPY */ 84 (iw_handler) NULL, /* SIOCSIWTHRSPY */
122 (iw_handler) NULL, /* SIOCGIWTHRSPY */ 85 (iw_handler) NULL, /* SIOCGIWTHRSPY */
123 (iw_handler) ieee80211_ioctl_siwap, /* SIOCSIWAP */ 86 (iw_handler) cfg80211_wext_siwap, /* SIOCSIWAP */
124 (iw_handler) ieee80211_ioctl_giwap, /* SIOCGIWAP */ 87 (iw_handler) cfg80211_wext_giwap, /* SIOCGIWAP */
125 (iw_handler) cfg80211_wext_siwmlme, /* SIOCSIWMLME */ 88 (iw_handler) cfg80211_wext_siwmlme, /* SIOCSIWMLME */
126 (iw_handler) NULL, /* SIOCGIWAPLIST */ 89 (iw_handler) NULL, /* SIOCGIWAPLIST */
127 (iw_handler) cfg80211_wext_siwscan, /* SIOCSIWSCAN */ 90 (iw_handler) cfg80211_wext_siwscan, /* SIOCSIWSCAN */
diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c
index de9ac49cd907..f955225ed911 100644
--- a/net/wireless/ibss.c
+++ b/net/wireless/ibss.c
@@ -466,8 +466,6 @@ int cfg80211_ibss_wext_siwap(struct net_device *dev,
466 466
467 return err; 467 return err;
468} 468}
469/* temporary symbol - mark GPL - in the future the handler won't be */
470EXPORT_SYMBOL_GPL(cfg80211_ibss_wext_siwap);
471 469
472int cfg80211_ibss_wext_giwap(struct net_device *dev, 470int cfg80211_ibss_wext_giwap(struct net_device *dev,
473 struct iw_request_info *info, 471 struct iw_request_info *info,
@@ -493,6 +491,4 @@ int cfg80211_ibss_wext_giwap(struct net_device *dev,
493 491
494 return 0; 492 return 0;
495} 493}
496/* temporary symbol - mark GPL - in the future the handler won't be */
497EXPORT_SYMBOL_GPL(cfg80211_ibss_wext_giwap);
498#endif 494#endif
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
index fc2e7768967d..c27774bd0107 100644
--- a/net/wireless/wext-compat.c
+++ b/net/wireless/wext-compat.c
@@ -1149,9 +1149,9 @@ int cfg80211_wext_giwpower(struct net_device *dev,
1149} 1149}
1150EXPORT_SYMBOL_GPL(cfg80211_wext_giwpower); 1150EXPORT_SYMBOL_GPL(cfg80211_wext_giwpower);
1151 1151
1152int cfg80211_wds_wext_siwap(struct net_device *dev, 1152static int cfg80211_wds_wext_siwap(struct net_device *dev,
1153 struct iw_request_info *info, 1153 struct iw_request_info *info,
1154 struct sockaddr *addr, char *extra) 1154 struct sockaddr *addr, char *extra)
1155{ 1155{
1156 struct wireless_dev *wdev = dev->ieee80211_ptr; 1156 struct wireless_dev *wdev = dev->ieee80211_ptr;
1157 struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); 1157 struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy);
@@ -1177,11 +1177,10 @@ int cfg80211_wds_wext_siwap(struct net_device *dev,
1177 1177
1178 return 0; 1178 return 0;
1179} 1179}
1180EXPORT_SYMBOL_GPL(cfg80211_wds_wext_siwap);
1181 1180
1182int cfg80211_wds_wext_giwap(struct net_device *dev, 1181static int cfg80211_wds_wext_giwap(struct net_device *dev,
1183 struct iw_request_info *info, 1182 struct iw_request_info *info,
1184 struct sockaddr *addr, char *extra) 1183 struct sockaddr *addr, char *extra)
1185{ 1184{
1186 struct wireless_dev *wdev = dev->ieee80211_ptr; 1185 struct wireless_dev *wdev = dev->ieee80211_ptr;
1187 1186
@@ -1193,7 +1192,6 @@ int cfg80211_wds_wext_giwap(struct net_device *dev,
1193 1192
1194 return 0; 1193 return 0;
1195} 1194}
1196EXPORT_SYMBOL_GPL(cfg80211_wds_wext_giwap);
1197 1195
1198int cfg80211_wext_siwrate(struct net_device *dev, 1196int cfg80211_wext_siwrate(struct net_device *dev,
1199 struct iw_request_info *info, 1197 struct iw_request_info *info,
@@ -1327,3 +1325,41 @@ struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev)
1327 return &wstats; 1325 return &wstats;
1328} 1326}
1329EXPORT_SYMBOL_GPL(cfg80211_wireless_stats); 1327EXPORT_SYMBOL_GPL(cfg80211_wireless_stats);
1328
1329int cfg80211_wext_siwap(struct net_device *dev,
1330 struct iw_request_info *info,
1331 struct sockaddr *ap_addr, char *extra)
1332{
1333 struct wireless_dev *wdev = dev->ieee80211_ptr;
1334
1335 switch (wdev->iftype) {
1336 case NL80211_IFTYPE_ADHOC:
1337 return cfg80211_ibss_wext_siwap(dev, info, ap_addr, extra);
1338 case NL80211_IFTYPE_STATION:
1339 return cfg80211_mgd_wext_siwap(dev, info, ap_addr, extra);
1340 case NL80211_IFTYPE_WDS:
1341 return cfg80211_wds_wext_siwap(dev, info, ap_addr, extra);
1342 default:
1343 return -EOPNOTSUPP;
1344 }
1345}
1346EXPORT_SYMBOL_GPL(cfg80211_wext_siwap);
1347
1348int cfg80211_wext_giwap(struct net_device *dev,
1349 struct iw_request_info *info,
1350 struct sockaddr *ap_addr, char *extra)
1351{
1352 struct wireless_dev *wdev = dev->ieee80211_ptr;
1353
1354 switch (wdev->iftype) {
1355 case NL80211_IFTYPE_ADHOC:
1356 return cfg80211_ibss_wext_giwap(dev, info, ap_addr, extra);
1357 case NL80211_IFTYPE_STATION:
1358 return cfg80211_mgd_wext_giwap(dev, info, ap_addr, extra);
1359 case NL80211_IFTYPE_WDS:
1360 return cfg80211_wds_wext_giwap(dev, info, ap_addr, extra);
1361 default:
1362 return -EOPNOTSUPP;
1363 }
1364}
1365EXPORT_SYMBOL_GPL(cfg80211_wext_giwap);
diff --git a/net/wireless/wext-compat.h b/net/wireless/wext-compat.h
index 23a6b5a83f2d..51028ebf19ae 100644
--- a/net/wireless/wext-compat.h
+++ b/net/wireless/wext-compat.h
@@ -7,6 +7,12 @@ int cfg80211_ibss_wext_siwfreq(struct net_device *dev,
7int cfg80211_ibss_wext_giwfreq(struct net_device *dev, 7int cfg80211_ibss_wext_giwfreq(struct net_device *dev,
8 struct iw_request_info *info, 8 struct iw_request_info *info,
9 struct iw_freq *freq, char *extra); 9 struct iw_freq *freq, char *extra);
10int cfg80211_ibss_wext_siwap(struct net_device *dev,
11 struct iw_request_info *info,
12 struct sockaddr *ap_addr, char *extra);
13int cfg80211_ibss_wext_giwap(struct net_device *dev,
14 struct iw_request_info *info,
15 struct sockaddr *ap_addr, char *extra);
10 16
11int cfg80211_mgd_wext_siwfreq(struct net_device *dev, 17int cfg80211_mgd_wext_siwfreq(struct net_device *dev,
12 struct iw_request_info *info, 18 struct iw_request_info *info,
@@ -14,6 +20,12 @@ int cfg80211_mgd_wext_siwfreq(struct net_device *dev,
14int cfg80211_mgd_wext_giwfreq(struct net_device *dev, 20int cfg80211_mgd_wext_giwfreq(struct net_device *dev,
15 struct iw_request_info *info, 21 struct iw_request_info *info,
16 struct iw_freq *freq, char *extra); 22 struct iw_freq *freq, char *extra);
23int cfg80211_mgd_wext_siwap(struct net_device *dev,
24 struct iw_request_info *info,
25 struct sockaddr *ap_addr, char *extra);
26int cfg80211_mgd_wext_giwap(struct net_device *dev,
27 struct iw_request_info *info,
28 struct sockaddr *ap_addr, char *extra);
17 29
18struct ieee80211_channel *cfg80211_wext_freq(struct wiphy *wiphy, 30struct ieee80211_channel *cfg80211_wext_freq(struct wiphy *wiphy,
19 struct iw_freq *freq); 31 struct iw_freq *freq);
diff --git a/net/wireless/wext-sme.c b/net/wireless/wext-sme.c
index 509279a1cfb2..1aa31cc55113 100644
--- a/net/wireless/wext-sme.c
+++ b/net/wireless/wext-sme.c
@@ -273,8 +273,6 @@ int cfg80211_mgd_wext_siwap(struct net_device *dev,
273 cfg80211_unlock_rdev(wiphy_to_dev(wdev->wiphy)); 273 cfg80211_unlock_rdev(wiphy_to_dev(wdev->wiphy));
274 return err; 274 return err;
275} 275}
276/* temporary symbol - mark GPL - in the future the handler won't be */
277EXPORT_SYMBOL_GPL(cfg80211_mgd_wext_siwap);
278 276
279int cfg80211_mgd_wext_giwap(struct net_device *dev, 277int cfg80211_mgd_wext_giwap(struct net_device *dev,
280 struct iw_request_info *info, 278 struct iw_request_info *info,
@@ -299,8 +297,6 @@ int cfg80211_mgd_wext_giwap(struct net_device *dev,
299 297
300 return 0; 298 return 0;
301} 299}
302/* temporary symbol - mark GPL - in the future the handler won't be */
303EXPORT_SYMBOL_GPL(cfg80211_mgd_wext_giwap);
304 300
305int cfg80211_wext_siwgenie(struct net_device *dev, 301int cfg80211_wext_siwgenie(struct net_device *dev,
306 struct iw_request_info *info, 302 struct iw_request_info *info,