summaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-07-27 12:01:51 +0200
committerJohn W. Linville <linville@tuxdriver.com>2009-07-29 15:46:16 -0400
commit562e482265ac4d660d9f0114419591d62f44361d (patch)
treefd57e0b515aef085a4eb1fc0d351811c82210db8 /net/wireless
parent0e82ffe3b90bcad72cfe80e4379946b8fb0691ca (diff)
downloadblackbird-op-linux-562e482265ac4d660d9f0114419591d62f44361d.tar.gz
blackbird-op-linux-562e482265ac4d660d9f0114419591d62f44361d.zip
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,
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,
@@ -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
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,
}
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);
@@ -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;
@@ -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,
@@ -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);
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,
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,
@@ -14,6 +20,12 @@ int cfg80211_mgd_wext_siwfreq(struct net_device *dev,
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);
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,
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,
@@ -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,
OpenPOWER on IntegriCloud