2009-05-30 20:47:22

by Maxim Levitsky

[permalink] [raw]
Subject: commit #1868cf308a3b3a336fcfe52c5aea4ac12d5e42ac breaks wireless on my system

I use nl80211 wpa_suppicant driver.
With this commit (have just bisected) I can't connect to same AP twice,
and usually only a module reload, or somtimes restart of supplicant
help.
Actually usually I can't connect again after first successful connection
at all.


With wext supplicant works, but still sometimes hangs in same way.

commit 1868cf308a3b3a336fcfe52c5aea4ac12d5e42ac
Author: Johannes Berg <[email protected]>
Date: Tue May 19 22:16:25 2009 +0200

mac80211: don't try to do anything on unchanged genIE

When the genIE hasn't changed there's no reason to kick
the state machine since it won't be able to do anything
new -- doing this decreases the useless work we do for
reassociating because if we do kick the state machine
it will try to find a usable BSS but there might not be
one because wpa_supplicant will only change the BSSID
a little later.

In a sense this is a workaround for userspace behaviour,
but on the other hand userspace cannot really keep track
of what the kernel currently has for genIE since any
process could have changed that while wpa_supplicant
wasn't looking.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: John W. Linville <[email protected]>


Best regards,
Maxim Levitsky



2009-05-30 21:00:41

by Larry Finger

[permalink] [raw]
Subject: Re: commit #1868cf308a3b3a336fcfe52c5aea4ac12d5e42ac breaks wireless on my system

Maxim Levitsky wrote:
> I use nl80211 wpa_suppicant driver.
> With this commit (have just bisected) I can't connect to same AP twice,
> and usually only a module reload, or somtimes restart of supplicant
> help.
> Actually usually I can't connect again after first successful connection
> at all.
>
>
> With wext supplicant works, but still sometimes hangs in same way.
>
> commit 1868cf308a3b3a336fcfe52c5aea4ac12d5e42ac
> Author: Johannes Berg <[email protected]>
> Date: Tue May 19 22:16:25 2009 +0200
>
> mac80211: don't try to do anything on unchanged genIE
>
> When the genIE hasn't changed there's no reason to kick
> the state machine since it won't be able to do anything
> new -- doing this decreases the useless work we do for
> reassociating because if we do kick the state machine
> it will try to find a usable BSS but there might not be
> one because wpa_supplicant will only change the BSSID
> a little later.
>
> In a sense this is a workaround for userspace behaviour,
> but on the other hand userspace cannot really keep track
> of what the kernel currently has for genIE since any
> process could have changed that while wpa_supplicant
> wasn't looking.
>
> Signed-off-by: Johannes Berg <[email protected]>
> Signed-off-by: John W. Linville <[email protected]>

>From the above patch, this hunk looks a little strange:

diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index c143947..a01154e 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -37,12 +37,13 @@ static int ieee80211_ioctl_siwgenie(struct
net_device *dev,

if (sdata->vif.type == NL80211_IFTYPE_STATION) {
int ret = ieee80211_sta_set_extra_ie(sdata, extra,
data->length);
- if (ret)
+ if (ret && ret != -EALREADY)
return ret;
sdata->u.mgd.flags &= ~IEEE80211_STA_AUTO_BSSID_SEL;
sdata->u.mgd.flags &= ~IEEE80211_STA_EXT_SME;
sdata->u.mgd.flags &= ~IEEE80211_STA_CONTROL_PORT;
- ieee80211_sta_req_auth(sdata);
+ if (ret != -EALREADY)
+ ieee80211_sta_req_auth(sdata);
return 0;
}

Why is there a check before the call to ieee80211_sta_req_auth()? If
ret != -EALREADY, would we not have already exited?

Larry


2009-05-30 20:49:41

by Johannes Berg

[permalink] [raw]
Subject: Re: commit #1868cf308a3b3a336fcfe52c5aea4ac12d5e42ac breaks wireless on my system

On Sat, 2009-05-30 at 23:47 +0300, Maxim Levitsky wrote:
> I use nl80211 wpa_suppicant driver.
> With this commit (have just bisected) I can't connect to same AP twice,
> and usually only a module reload, or somtimes restart of supplicant
> help.
> Actually usually I can't connect again after first successful connection
> at all.

Grab Luis's fix.

johannes


Attachments:
signature.asc (801.00 B)
This is a digitally signed message part

2009-05-31 12:03:58

by Maxim Levitsky

[permalink] [raw]
Subject: Re: commit #1868cf308a3b3a336fcfe52c5aea4ac12d5e42ac breaks wireless on my system

On Sun, 2009-05-31 at 12:11 +0200, Johannes Berg wrote:
> On Sun, 2009-05-31 at 01:37 +0300, Maxim Levitsky wrote:
>
> > It appears that I don't receive half of mails of linux-wireless
> > nether they are in spam folder.
> >
> > I am subscribed to [email protected]>
> >
> > For example I see no trace of new intel fullmac driver.
> >
> > Is gmail that bad?
>
> Strange, I have no idea. FWIW, the patch is archived for the list, so it
> must have gotten to it:
> http://article.gmane.org/gmane.linux.kernel.wireless.general/33606
>
> johannes

Thanks,

Well it turns out, that somehow I wasn't subscribed to linux-wireless,
but since I am subscribed to ath5k-devel, LKML, I do receive most of its
mails, and thus I didn't notice this till now, so sorry for this
mistake.

Best regards,
Maxim Levitsky


2009-05-30 22:37:28

by Maxim Levitsky

[permalink] [raw]
Subject: Re: commit #1868cf308a3b3a336fcfe52c5aea4ac12d5e42ac breaks wireless on my system

On Sat, 2009-05-30 at 23:59 +0300, Maxim Levitsky wrote:
> On Sat, 2009-05-30 at 22:49 +0200, Johannes Berg wrote:
> > On Sat, 2009-05-30 at 23:47 +0300, Maxim Levitsky wrote:
> > > I use nl80211 wpa_suppicant driver.
> > > With this commit (have just bisected) I can't connect to same AP twice,
> > > and usually only a module reload, or somtimes restart of supplicant
> > > help.
> > > Actually usually I can't connect again after first successful connection
> > > at all.
> >
> > Grab Luis's fix.
> >
> > johannes
>
> I might sound lazy, but I have searched by mailbox and I haven't see a
> mail from Luis R. Rodriguez, after the point we discussed the oops I
> have been getting on my system due to BUG_ON in crda code (which still
> isn't fixed)
>
>
> What fix? to what module? kernel drivers, supplicant?
>

It appears that I don't receive half of mails of linux-wireless
nether they are in spam folder.

I am subscribed to [email protected]>

For example I see no trace of new intel fullmac driver.

Is gmail that bad?

Best regards,
Maxim Levitsky


2009-05-31 10:11:39

by Johannes Berg

[permalink] [raw]
Subject: Re: commit #1868cf308a3b3a336fcfe52c5aea4ac12d5e42ac breaks wireless on my system

On Sun, 2009-05-31 at 01:37 +0300, Maxim Levitsky wrote:

> It appears that I don't receive half of mails of linux-wireless
> nether they are in spam folder.
>
> I am subscribed to [email protected]>
>
> For example I see no trace of new intel fullmac driver.
>
> Is gmail that bad?

Strange, I have no idea. FWIW, the patch is archived for the list, so it
must have gotten to it:
http://article.gmane.org/gmane.linux.kernel.wireless.general/33606

johannes


Attachments:
signature.asc (801.00 B)
This is a digitally signed message part

2009-05-30 21:04:47

by Johannes Berg

[permalink] [raw]
Subject: Re: commit #1868cf308a3b3a336fcfe52c5aea4ac12d5e42ac breaks wireless on my system

On Sat, 2009-05-30 at 16:00 -0500, Larry Finger wrote:

> From the above patch, this hunk looks a little strange:
>
> diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
> index c143947..a01154e 100644
> --- a/net/mac80211/wext.c
> +++ b/net/mac80211/wext.c
> @@ -37,12 +37,13 @@ static int ieee80211_ioctl_siwgenie(struct
> net_device *dev,
>
> if (sdata->vif.type == NL80211_IFTYPE_STATION) {
> int ret = ieee80211_sta_set_extra_ie(sdata, extra, data->length);
> - if (ret)
> + if (ret && ret != -EALREADY)
> return ret;
> sdata->u.mgd.flags &= ~IEEE80211_STA_AUTO_BSSID_SEL;
> sdata->u.mgd.flags &= ~IEEE80211_STA_EXT_SME;
> sdata->u.mgd.flags &= ~IEEE80211_STA_CONTROL_PORT;
> - ieee80211_sta_req_auth(sdata);
> + if (ret != -EALREADY)
> + ieee80211_sta_req_auth(sdata);
> return 0;
> }
>
> Why is there a check before the call to ieee80211_sta_req_auth()? If
> ret != -EALREADY, would we not have already exited?

No, it's && deliberately, I don't want to show -EALREADY to userspace,
but I _do_ want to skip the req_auth() step, that's the whole purpose of
the patch. Problem is I forgot to change the cfg80211 handlers
accordingly and that created a problem Luis fixed.

johannes


Attachments:
signature.asc (801.00 B)
This is a digitally signed message part

2009-05-30 20:59:29

by Maxim Levitsky

[permalink] [raw]
Subject: Re: commit #1868cf308a3b3a336fcfe52c5aea4ac12d5e42ac breaks wireless on my system

On Sat, 2009-05-30 at 22:49 +0200, Johannes Berg wrote:
> On Sat, 2009-05-30 at 23:47 +0300, Maxim Levitsky wrote:
> > I use nl80211 wpa_suppicant driver.
> > With this commit (have just bisected) I can't connect to same AP twice,
> > and usually only a module reload, or somtimes restart of supplicant
> > help.
> > Actually usually I can't connect again after first successful connection
> > at all.
>
> Grab Luis's fix.
>
> johannes

I might sound lazy, but I have searched by mailbox and I haven't see a
mail from Luis R. Rodriguez, after the point we discussed the oops I
have been getting on my system due to BUG_ON in crda code (which still
isn't fixed)


What fix? to what module? kernel drivers, supplicant?


Best regards,
Maxim Levitsky


2009-05-31 12:41:51

by Maxim Levitsky

[permalink] [raw]
Subject: Re: commit #1868cf308a3b3a336fcfe52c5aea4ac12d5e42ac breaks wireless on my system

On Sun, 2009-05-31 at 12:11 +0200, Johannes Berg wrote:
> On Sun, 2009-05-31 at 01:37 +0300, Maxim Levitsky wrote:
>
> > It appears that I don't receive half of mails of linux-wireless
> > nether they are in spam folder.
> >
> > I am subscribed to [email protected]>
> >
> > For example I see no trace of new intel fullmac driver.
> >
> > Is gmail that bad?
>
> Strange, I have no idea. FWIW, the patch is archived for the list, so it
> must have gotten to it:
Indeed, this patch works for me, thanks.



> http://article.gmane.org/gmane.linux.kernel.wireless.general/33606
>
> johannes


Best regards,
Maxim Levitsky


2009-06-01 07:29:32

by Kalle Valo

[permalink] [raw]
Subject: Re: commit #1868cf308a3b3a336fcfe52c5aea4ac12d5e42ac breaks wireless on my system

Maxim Levitsky <[email protected]> writes:

> It appears that I don't receive half of mails of linux-wireless
> nether they are in spam folder.
>
> I am subscribed to [email protected]>
>
> For example I see no trace of new intel fullmac driver.
>
> Is gmail that bad?

I'm using gmail (iki.fi just forwards everything to gmail) and FWIW I
haven't noticed any problems with linux-wireless.

--
Kalle Valo