aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-07-27 06:01:51 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-29 15:46:16 -0400
commit562e482265ac4d660d9f0114419591d62f44361d (patch)
treefd57e0b515aef085a4eb1fc0d351811c82210db8 /net/wireless
parent0e82ffe3b90bcad72cfe80e4379946b8fb0691ca (diff)
cfg80211: combine IWAP handlers
Since we now have IWAP handlers for all modes, we can combine them into one. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless')
-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
4 files changed, 56 insertions, 16 deletions
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,