From: Johannes Berg <johannes@sipsolutions.net>
To: Samuel Ortiz <samuel.ortiz@intel.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] cfg80211: set conn.state properly in the connect() case
Date: Wed, 01 Jul 2009 12:58:22 +0200 [thread overview]
Message-ID: <1246445902.4131.16.camel@johannes.local> (raw)
In-Reply-To: <20090630153522.GA28206@sortiz.org>
[-- Attachment #1: Type: text/plain, Size: 1887 bytes --]
On Tue, 2009-06-30 at 17:35 +0200, Samuel Ortiz wrote:
> We need to set the conn.state to ASSOCIATING for the ->connect() path. By
> default, it is set to 0, i.e. SCANNING, which causes sme_scan_done() to
> eventually call conn_do_work(), which then would call assoc() and auth()
> blindly. That's why we also bug on those hooks not being defined there.
Maybe it would be better to have a default IDLE state for this state
machine as well, instead?
johannes
> Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
> ---
> net/wireless/sme.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> Index: iwm-2.6/net/wireless/sme.c
> ===================================================================
> --- iwm-2.6.orig/net/wireless/sme.c 2009-06-30 16:39:58.000000000 +0200
> +++ iwm-2.6/net/wireless/sme.c 2009-06-30 17:17:14.000000000 +0200
> @@ -103,6 +103,7 @@ static int cfg80211_conn_do_work(struct
> u.auth_req.ie = NULL;
> u.auth_req.ie_len = 0;
> wdev->conn.state = CFG80211_CONN_AUTHENTICATING;
> + BUG_ON(!drv->ops->auth);
> return drv->ops->auth(wdev->wiphy, wdev->netdev, &u.auth_req);
> case CFG80211_CONN_ASSOCIATE_NEXT:
> u.assoc_req.chan = wdev->conn.params.channel;
> @@ -115,6 +116,7 @@ static int cfg80211_conn_do_work(struct
> memcpy(&u.assoc_req.crypto, &wdev->conn.params.crypto,
> sizeof(u.assoc_req.crypto));
> wdev->conn.state = CFG80211_CONN_ASSOCIATING;
> + BUG_ON(!drv->ops->assoc);
> return drv->ops->assoc(wdev->wiphy, wdev->netdev,
> &u.assoc_req);
> default:
> @@ -455,6 +457,7 @@ int cfg80211_connect(struct cfg80211_reg
> return err;
> } else {
> wdev->sme_state = CFG80211_SME_CONNECTING;
> + wdev->conn.state = CFG80211_CONN_ASSOCIATING;
> err = rdev->ops->connect(&rdev->wiphy, dev, connect);
> if (err) {
> wdev->sme_state = CFG80211_SME_IDLE;
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
next prev parent reply other threads:[~2009-07-01 10:58 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-30 11:52 [PATCH 0/8 v3] connect API, wext conversion Johannes Berg
2009-06-30 11:52 ` [PATCH 1/8 v3] cfg80211: connect/disconnect API Johannes Berg
2009-06-30 15:35 ` [PATCH] cfg80211: set conn.state properly in the connect() case Samuel Ortiz
2009-07-01 10:58 ` Johannes Berg [this message]
2009-06-30 15:45 ` [PATCH RFC] iwmc3200wifi: connect API port Samuel Ortiz
2009-06-30 11:52 ` [PATCH 2/8 v3] cfg80211: emulate connect with auth/assoc Johannes Berg
2009-06-30 11:52 ` [PATCH 3/8 v3] cfg80211: managed mode wext compatibility Johannes Berg
2009-06-30 11:52 ` [PATCH 4/8 v3] cfg80211: implement iwpower Johannes Berg
2009-06-30 11:52 ` [PATCH 5/8 v3] cfg80211: implement IWAP for WDS Johannes Berg
2009-06-30 11:52 ` [PATCH 6/8 v3] cfg80211: implement IWRATE Johannes Berg
2009-06-30 11:52 ` [PATCH 7/8 v3] cfg80211: implement get_wireless_stats Johannes Berg
2009-06-30 11:52 ` [PATCH 8/8 v3] mac80211: re-add HT disabling Johannes Berg
2009-06-30 13:25 ` Vasanthakumar Thiagarajan
2009-06-30 13:37 ` Johannes Berg
2009-06-30 13:52 ` Vasanthakumar Thiagarajan
2009-06-30 14:00 ` Johannes Berg
2009-07-01 7:39 ` [PATCH 8/8 v3.1] " Johannes Berg
2009-07-01 10:13 ` Vasanthakumar Thiagarajan
2009-07-01 10:42 ` Johannes Berg
2009-07-02 9:51 ` Jouni Malinen
2009-07-02 9:53 ` Johannes Berg
2009-07-02 11:43 ` Jouni Malinen
2009-07-02 11:56 ` 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=1246445902.4131.16.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=samuel.ortiz@intel.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).