aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/wext-compat.c
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/wext-compat.c
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/wext-compat.c')
-rw-r--r--net/wireless/wext-compat.c52
1 files changed, 44 insertions, 8 deletions
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);