From: Johannes Berg <johannes@sipsolutions.net>
To: linux-wireless@vger.kernel.org
Cc: John Linville <linville@tuxdriver.com>, Jiri Benc <jbenc@suse.cz>
Subject: [PATCH 04/10] cfg/nl80211: make association explicit
Date: Thu, 15 Feb 2007 15:42:45 +0100 [thread overview]
Message-ID: <20070215144257.949316000@sipsolutions.net> (raw)
In-Reply-To: 20070215144241.847938000@sipsolutions.net
This patch makes association explicit.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
include/linux/nl80211.h | 3 +++
include/net/cfg80211.h | 7 ++++++-
net/wireless/nl80211.c | 10 ++++++++++
3 files changed, 19 insertions(+), 1 deletion(-)
--- wireless-dev.orig/include/net/cfg80211.h 2007-02-15 13:41:33.057940064 +0100
+++ wireless-dev/include/net/cfg80211.h 2007-02-15 13:48:54.087940064 +0100
@@ -78,13 +78,17 @@ struct wiphy;
*
* @configure: configure the given interface as requested in the config struct.
* must not ignore any configuration item, if something is
- * is requested that cannot be fulfilled return an error
+ * is requested that cannot be fulfilled return an error.
+ * This call does not actually initiate any association or such.
*
* @get_config: fill the given config structure with the current configuration
*
* @get_config_valid: return a bitmask of CFG80211_CFG_VALID_* indicating
* which parameters can be set.
*
+ * @associate: associate with previously given settings (SSID, BSSID
+ * if userspace roaming is enabled)
+ *
* @reassociate: reassociate with current settings (SSID, BSSID if
* userspace roaming is enabled)
*
@@ -135,6 +139,7 @@ struct cfg80211_ops {
struct net_device *dev);
+ int (*associate)(struct wiphy *wiphy, struct net_device *dev);
int (*reassociate)(struct wiphy *wiphy, struct net_device *dev);
int (*disassociate)(struct wiphy *wiphy, struct net_device *dev);
int (*deauth)(struct wiphy *wiphy, struct net_device *dev);
--- wireless-dev.orig/include/linux/nl80211.h 2007-02-15 13:41:26.287940064 +0100
+++ wireless-dev/include/linux/nl80211.h 2007-02-15 13:48:53.357940064 +0100
@@ -98,6 +98,9 @@ enum {
/* deauth from current AP */
NL80211_CMD_DEAUTH,
+ /* associate with current settings */
+ NL80211_CMD_ASSOCIATE,
+
/* re-associate with current settings
* (SSID and BSSID if roaming control in userspace) */
NL80211_CMD_REASSOCIATE,
--- wireless-dev.orig/net/wireless/nl80211.c 2007-02-15 13:41:33.067940064 +0100
+++ wireless-dev/net/wireless/nl80211.c 2007-02-15 13:49:48.257940064 +0100
@@ -130,6 +130,7 @@ static int nl80211_get_cmdlist(struct sk
CHECK_CMD(del_virtual_intf, DEL_VIRTUAL_INTERFACE);
CHECK_CMD(configure, CONFIGURE);
CHECK_CMD(get_config, GET_CONFIG);
+ CHECK_CMD(associate, ASSOCIATE);
CHECK_CMD(reassociate, REASSOCIATE);
CHECK_CMD(disassociate, DISASSOCIATE);
CHECK_CMD(deauth, DEAUTH);
@@ -699,6 +700,9 @@ static int nl80211_assoc_deauth(struct s
return err;
switch (info->genlhdr->cmd) {
+ case NL80211_CMD_ASSOCIATE:
+ act = drv->ops->associate;
+ break;
case NL80211_CMD_DISASSOCIATE:
act = drv->ops->disassociate;
break;
@@ -964,6 +968,12 @@ static struct genl_ops nl80211_ops[] = {
/* can be retrieved by unprivileged users */
},
{
+ .cmd = NL80211_CMD_ASSOCIATE,
+ .doit = nl80211_assoc_deauth,
+ .policy = nl80211_policy,
+ .flags = GENL_ADMIN_PERM,
+ },
+ {
.cmd = NL80211_CMD_DISASSOCIATE,
.doit = nl80211_assoc_deauth,
.policy = nl80211_policy,
--
next prev parent reply other threads:[~2007-02-15 15:00 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-15 14:42 [PATCH 00/10] cfg80211 updates Johannes Berg
2007-02-15 14:42 ` [PATCH 01/10] remove cfg80211/wext-nl compatibility Johannes Berg
2007-02-15 14:42 ` [PATCH 02/10] update cfg80211/wext and wext code Johannes Berg
2007-02-15 14:42 ` [PATCH 03/10] introduce wiphy concept Johannes Berg
2007-02-19 20:37 ` Jiri Benc
2007-02-19 20:55 ` Johannes Berg
2007-02-15 14:42 ` Johannes Berg [this message]
2007-02-15 14:42 ` [PATCH 05/10] wext: clean up Johannes Berg
2007-02-15 14:42 ` [PATCH 06/10] d80211: update for wiphy api Johannes Berg
2007-02-15 16:16 ` Johannes Berg
2007-02-19 20:49 ` Jiri Benc
2007-02-19 21:03 ` Johannes Berg
2007-02-15 14:42 ` [PATCH 07/10] bcm43xx-d80211: " Johannes Berg
2007-02-15 15:09 ` Michael Buesch
2007-02-15 15:18 ` Johannes Berg
2007-02-15 14:42 ` [PATCH 08/10] zd1211rw-d80211: " Johannes Berg
2007-02-15 14:42 ` [PATCH 09/10] cfg80211: pending config Johannes Berg
2007-02-16 19:10 ` Dan Williams
2007-02-16 20:22 ` Johannes Berg
2007-02-16 20:49 ` Michael Wu
2007-02-15 14:42 ` [PATCH 10/10] cfg/nl80211: remove legacy network id Johannes Berg
2007-02-16 19:12 ` Dan Williams
2007-02-16 20:16 ` Johannes Berg
2007-02-15 16:02 ` [PATCH 00/10] cfg80211 updates Johannes Berg
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=20070215144257.949316000@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=jbenc@suse.cz \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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).