From: Johannes Berg <johannes@sipsolutions.net>
To: linux-wireless@vger.kernel.org
Subject: [RFC 10/11] cfg80211: combine IWESSID handlers
Date: Wed, 24 Jun 2009 14:07:55 +0200 [thread overview]
Message-ID: <20090624120810.154140393@sipsolutions.net> (raw)
In-Reply-To: 20090624120745.239294066@sipsolutions.net
Since we now have handlers IWESSID for all modes, we can
combine them into one.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
include/net/cfg80211.h | 20 ++++++--------------
net/mac80211/wext.c | 35 ++---------------------------------
net/wireless/ibss.c | 4 ----
net/wireless/wext-compat.c | 34 ++++++++++++++++++++++++++++++++++
net/wireless/wext-compat.h | 12 ++++++++++++
net/wireless/wext-sme.c | 4 ----
6 files changed, 54 insertions(+), 55 deletions(-)
--- wireless-testing.orig/include/net/cfg80211.h 2009-06-24 13:54:10.000000000 +0200
+++ wireless-testing/include/net/cfg80211.h 2009-06-24 13:54:10.000000000 +0200
@@ -1524,19 +1524,6 @@ int cfg80211_wext_siwmlme(struct net_dev
int cfg80211_wext_giwrange(struct net_device *dev,
struct iw_request_info *info,
struct iw_point *data, char *extra);
-int cfg80211_ibss_wext_siwessid(struct net_device *dev,
- struct iw_request_info *info,
- struct iw_point *data, char *ssid);
-int cfg80211_ibss_wext_giwessid(struct net_device *dev,
- struct iw_request_info *info,
- struct iw_point *data, char *ssid);
-
-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_wext_siwgenie(struct net_device *dev,
struct iw_request_info *info,
struct iw_point *data, char *extra);
@@ -1553,7 +1540,12 @@ int cfg80211_wext_siwfreq(struct net_dev
int cfg80211_wext_giwfreq(struct net_device *dev,
struct iw_request_info *info,
struct iw_freq *freq, char *extra);
-
+int cfg80211_wext_siwessid(struct net_device *dev,
+ struct iw_request_info *info,
+ struct iw_point *data, char *ssid);
+int cfg80211_wext_giwessid(struct net_device *dev,
+ struct iw_request_info *info,
+ struct iw_point *data, char *ssid);
int cfg80211_wext_siwrate(struct net_device *dev,
struct iw_request_info *info,
struct iw_param *rate, char *extra);
--- wireless-testing.orig/net/wireless/wext-compat.c 2009-06-24 13:54:10.000000000 +0200
+++ wireless-testing/net/wireless/wext-compat.c 2009-06-24 13:54:10.000000000 +0200
@@ -1141,3 +1141,37 @@ int cfg80211_wext_giwap(struct net_devic
}
}
EXPORT_SYMBOL_GPL(cfg80211_wext_giwap);
+
+int cfg80211_wext_siwessid(struct net_device *dev,
+ struct iw_request_info *info,
+ struct iw_point *data, char *ssid)
+{
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+
+ switch (wdev->iftype) {
+ case NL80211_IFTYPE_ADHOC:
+ return cfg80211_ibss_wext_siwessid(dev, info, data, ssid);
+ case NL80211_IFTYPE_STATION:
+ return cfg80211_mgd_wext_siwessid(dev, info, data, ssid);
+ default:
+ return -EOPNOTSUPP;
+ }
+}
+EXPORT_SYMBOL_GPL(cfg80211_wext_siwessid);
+
+int cfg80211_wext_giwessid(struct net_device *dev,
+ struct iw_request_info *info,
+ struct iw_point *data, char *ssid)
+{
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+
+ switch (wdev->iftype) {
+ case NL80211_IFTYPE_ADHOC:
+ return cfg80211_ibss_wext_giwessid(dev, info, data, ssid);
+ case NL80211_IFTYPE_STATION:
+ return cfg80211_mgd_wext_giwessid(dev, info, data, ssid);
+ default:
+ return -EOPNOTSUPP;
+ }
+}
+EXPORT_SYMBOL_GPL(cfg80211_wext_giwessid);
--- wireless-testing.orig/net/wireless/wext-compat.h 2009-06-24 13:54:10.000000000 +0200
+++ wireless-testing/net/wireless/wext-compat.h 2009-06-24 13:54:10.000000000 +0200
@@ -13,6 +13,12 @@ int cfg80211_ibss_wext_siwap(struct net_
int cfg80211_ibss_wext_giwap(struct net_device *dev,
struct iw_request_info *info,
struct sockaddr *ap_addr, char *extra);
+int cfg80211_ibss_wext_siwessid(struct net_device *dev,
+ struct iw_request_info *info,
+ struct iw_point *data, char *ssid);
+int cfg80211_ibss_wext_giwessid(struct net_device *dev,
+ struct iw_request_info *info,
+ struct iw_point *data, char *ssid);
int cfg80211_mgd_wext_siwfreq(struct net_device *dev,
struct iw_request_info *info,
@@ -26,6 +32,12 @@ int cfg80211_mgd_wext_siwap(struct net_d
int cfg80211_mgd_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);
struct ieee80211_channel *cfg80211_wext_freq(struct wiphy *wiphy,
struct iw_freq *freq);
--- wireless-testing.orig/net/mac80211/wext.c 2009-06-24 13:54:10.000000000 +0200
+++ wireless-testing/net/mac80211/wext.c 2009-06-24 13:54:10.000000000 +0200
@@ -27,37 +27,6 @@
#include "aes_ccm.h"
-static int ieee80211_ioctl_siwessid(struct net_device *dev,
- struct iw_request_info *info,
- struct iw_point *data, char *ssid)
-{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
-
- if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
- return cfg80211_ibss_wext_siwessid(dev, info, data, ssid);
- else if (sdata->vif.type == NL80211_IFTYPE_STATION)
- return cfg80211_mgd_wext_siwessid(dev, info, data, ssid);
-
- return -EOPNOTSUPP;
-}
-
-
-static int ieee80211_ioctl_giwessid(struct net_device *dev,
- struct iw_request_info *info,
- struct iw_point *data, char *ssid)
-{
- struct ieee80211_sub_if_data *sdata;
-
- sdata = IEEE80211_DEV_TO_SUB_IF(dev);
-
- if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
- return cfg80211_ibss_wext_giwessid(dev, info, data, ssid);
- else if (sdata->vif.type == NL80211_IFTYPE_STATION)
- return cfg80211_mgd_wext_giwessid(dev, info, data, ssid);
-
- return -EOPNOTSUPP;
-}
-
/* Structures to export the Wireless Handlers */
@@ -89,8 +58,8 @@ static const iw_handler ieee80211_handle
(iw_handler) NULL, /* SIOCGIWAPLIST */
(iw_handler) cfg80211_wext_siwscan, /* SIOCSIWSCAN */
(iw_handler) cfg80211_wext_giwscan, /* SIOCGIWSCAN */
- (iw_handler) ieee80211_ioctl_siwessid, /* SIOCSIWESSID */
- (iw_handler) ieee80211_ioctl_giwessid, /* SIOCGIWESSID */
+ (iw_handler) cfg80211_wext_siwessid, /* SIOCSIWESSID */
+ (iw_handler) cfg80211_wext_giwessid, /* SIOCGIWESSID */
(iw_handler) NULL, /* SIOCSIWNICKN */
(iw_handler) NULL, /* SIOCGIWNICKN */
(iw_handler) NULL, /* -- hole -- */
--- wireless-testing.orig/net/wireless/wext-sme.c 2009-06-24 13:54:10.000000000 +0200
+++ wireless-testing/net/wireless/wext-sme.c 2009-06-24 13:54:10.000000000 +0200
@@ -145,8 +145,6 @@ int cfg80211_mgd_wext_siwessid(struct ne
return cfg80211_mgd_wext_connect(wiphy_to_dev(wdev->wiphy), wdev);
}
-/* temporary symbol - mark GPL - in the future the handler won't be */
-EXPORT_SYMBOL_GPL(cfg80211_mgd_wext_siwessid);
int cfg80211_mgd_wext_giwessid(struct net_device *dev,
struct iw_request_info *info,
@@ -173,8 +171,6 @@ int cfg80211_mgd_wext_giwessid(struct ne
return 0;
}
-/* temporary symbol - mark GPL - in the future the handler won't be */
-EXPORT_SYMBOL_GPL(cfg80211_mgd_wext_giwessid);
int cfg80211_mgd_wext_siwap(struct net_device *dev,
struct iw_request_info *info,
--- wireless-testing.orig/net/wireless/ibss.c 2009-06-24 13:54:10.000000000 +0200
+++ wireless-testing/net/wireless/ibss.c 2009-06-24 13:54:10.000000000 +0200
@@ -257,8 +257,6 @@ int cfg80211_ibss_wext_siwessid(struct n
return cfg80211_ibss_wext_join(wiphy_to_dev(wdev->wiphy), wdev);
}
-/* temporary symbol - mark GPL - in the future the handler won't be */
-EXPORT_SYMBOL_GPL(cfg80211_ibss_wext_siwessid);
int cfg80211_ibss_wext_giwessid(struct net_device *dev,
struct iw_request_info *info,
@@ -284,8 +282,6 @@ int cfg80211_ibss_wext_giwessid(struct n
return 0;
}
-/* temporary symbol - mark GPL - in the future the handler won't be */
-EXPORT_SYMBOL_GPL(cfg80211_ibss_wext_giwessid);
int cfg80211_ibss_wext_siwap(struct net_device *dev,
struct iw_request_info *info,
--
next prev parent reply other threads:[~2009-06-24 12:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-24 12:07 [RFC 00/11] cfg80211 connect API + wireless extension move Johannes Berg
2009-06-24 12:07 ` [RFC 01/11] cfg80211: connect/disconnect API Johannes Berg
2009-06-24 15:30 ` Samuel Ortiz
2009-06-24 12:07 ` [RFC 02/11] cfg80211: emulate connect with auth/assoc Johannes Berg
2009-06-24 12:07 ` [RFC 03/11] cfg80211: managed mode wext compatibility Johannes Berg
2009-06-24 12:07 ` [RFC 04/11] cfg80211: implement iwpower Johannes Berg
2009-06-24 12:07 ` [RFC 05/11] cfg80211: implement IWAP for WDS Johannes Berg
2009-06-24 12:07 ` [RFC 06/11] cfg80211: implement IWRATE Johannes Berg
2009-06-24 12:07 ` [RFC 07/11] cfg80211: implement get_wireless_stats Johannes Berg
2009-06-24 12:07 ` [RFC 08/11] cfg80211: combine iwfreq implementations Johannes Berg
2009-06-24 12:07 ` [RFC 09/11] cfg80211: combine IWAP handlers Johannes Berg
2009-06-24 12:07 ` Johannes Berg [this message]
2009-06-24 12:07 ` [RFC 11/11] cfg80211: self-contained wext handling Johannes Berg
2009-06-24 20:24 ` [RFC 00/11] cfg80211 connect API + wireless extension move Luis R. Rodriguez
2009-06-25 20:37 ` Dave
2009-06-26 20:18 ` Johannes Berg
2009-06-28 9:26 ` Dave
2009-06-29 8:35 ` Johannes Berg
2009-06-26 21:01 ` Johannes Berg
2009-06-28 8:43 ` Dave
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090624120810.154140393@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).