All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxim Levitsky <maximlevitsky@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	"hostap@lists.shmoo.com" <hostap@lists.shmoo.com>
Subject: Re: [PATCH 1/2] Allow scanning while in authenticated only state
Date: Sat, 31 Oct 2009 11:46:21 +0200	[thread overview]
Message-ID: <1256982381.3089.10.camel@maxim-laptop> (raw)
In-Reply-To: <1256967782.3555.69.camel@johannes.local>

On Sat, 2009-10-31 at 06:43 +0100, Johannes Berg wrote: 
> On Fri, 2009-10-30 at 23:52 +0200, Maxim Levitsky wrote:
> > >From 1d13f997f652c7e632d4ddb053df3f3fad78da23 Mon Sep 17 00:00:00 2001
> > From: Maxim Levitsky <maximlevitsky@gmail.com>
> > Date: Fri, 30 Oct 2009 23:36:20 +0200
> > Subject: [PATCH 1/2] Allow scanning while in authenticated only state
> > 
> > Since ifmgd->work_list is {ab}used as a storage for authenticated,
> > but not associated access points (this is done using idle work items),
> > allow scanning if all work items are in this state.
> > 
> > Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
> 
> I don't think this is needed. While not _strictly_ wrong, I still
> dislike the additional complexity.
> 
> I think you just need this wpa_supplicant patch:
> http://johannes.sipsolutions.net/patches/hostap/all/2009-10-26-12%3a59/deauth-on-disassoc.patch

Nope, this patch doesn't help.

if I remove the bssid_changed, then it seems to work when connecting to
same AP, but still scan hangs when connecting to different.

The problem is that wpa_supplicant doesn't do deauthentication
explicitly, and I was told that this is right thing to do. This confuses
all the nl80211 and mac80211...


I also think that its best just to do both deauthentication and
disassociation in same time.

Yet, I think this path is ok, that is, when you disallow scanning, you
can be sure that wifi will be dead, and this patch catches the situation
when it for sure will disallowed  forever.


Best regards,
Maxim Levitsky


> 
> johannes
> 
> > ---
> >  net/mac80211/scan.c |   12 +++++++++---
> >  1 files changed, 9 insertions(+), 3 deletions(-)
> > 
> > diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
> > index c46ac01..c932765 100644
> > --- a/net/mac80211/scan.c
> > +++ b/net/mac80211/scan.c
> > @@ -418,6 +418,7 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata,
> >  {
> >  	struct ieee80211_local *local = sdata->local;
> >  	struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
> > +	struct ieee80211_mgd_work *wk, *tmp;
> >  	int rc;
> >  
> >  	if (local->scan_req)
> > @@ -450,9 +451,14 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata,
> >  	if (req != local->int_scan_req &&
> >  	    sdata->vif.type == NL80211_IFTYPE_STATION &&
> >  	    !list_empty(&ifmgd->work_list)) {
> > -		/* actually wait for the work it's doing to finish/time out */
> > -		set_bit(IEEE80211_STA_REQ_SCAN, &ifmgd->request);
> > -		return 0;
> > +
> > +		/* actually wait for the work it's doing to finish/time out*/
> > +		list_for_each_entry_safe(wk, tmp, &ifmgd->work_list, list) {
> > +			if (wk->state != IEEE80211_MGD_STATE_IDLE) {
> > +				set_bit(IEEE80211_STA_REQ_SCAN, &ifmgd->request);
> > +				return 0;
> > +			}
> > +		}
> >  	}
> >  
> >  	if (local->ops->hw_scan)
> 



  reply	other threads:[~2009-10-31  9:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-30 21:49 [PATH 0/2] Make driver_nl80211 really work Maxim Levitsky
2009-10-30 21:52 ` [PATCH 1/2] Allow scanning while in authenticated only state Maxim Levitsky
2009-10-31  5:43   ` Johannes Berg
2009-10-31  9:46     ` Maxim Levitsky [this message]
2009-10-31 10:02       ` Johannes Berg
2009-10-31 10:33         ` Maxim Levitsky
2009-10-31 10:44           ` Johannes Berg
2009-11-01 20:10           ` Jouni Malinen
2009-11-02 23:17             ` Maxim Levitsky
2009-11-03  8:16               ` Johannes Berg
2009-10-30 21:54 ` [PATCH 2/2] nl80211: allow to authenticate to access point that we already authenticated Maxim Levitsky
2009-10-31  5:44   ` Johannes Berg
2009-10-31  9:36     ` Maxim Levitsky
2009-10-30 22:33 ` [PATH 0/2] Make driver_nl80211 really work Maxim Levitsky

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=1256982381.3089.10.camel@maxim-laptop \
    --to=maximlevitsky@gmail.com \
    --cc=hostap@lists.shmoo.com \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.