Skip to contentSkip to conversation

commit #1868cf308a3b3a336fcfe52c5aea4ac12d5e42ac breaks wireless on my system

DISCUSSION Maxim Levitsky 4 participants 10 messages May 30, 2009 – Jun 1, 2009 mac80211

lore
Share & tools
lore
#0 lore raw

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.

Best regards,
Maxim Levitsky

maintainer
#1 lore raw
Quoted 6 lines · Maxim Levitsky

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

#2 lore raw
Quoted 11 lines · Johannes Berg
Quoted 6 lines · Maxim Levitsky

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

#8 lore raw
In reply to Maxim Levitsky
Quoted 30 lines · Maxim Levitsky

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.

Quoted 4 lines

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

net/mac80211/wext.c +0 -0
index c143947..a01154e 100644
@@ -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

maintainer
#9 lore raw
Quoted 23 lines · Larry Finger

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

net/mac80211/wext.c +3 -2
index c143947..a01154e 100644
@@ -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;
        }
Quoted 2 lines

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

#3 lore raw
In reply to Maxim Levitsky
Quoted 13 lines · Maxim Levitsky
Quoted 11 lines · Johannes Berg
Quoted 6 lines · Maxim Levitsky

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

Quoted 8 lines

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

#5 lore raw
Quoted 9 lines · Johannes Berg
Quoted 7 lines · Maxim Levitsky

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.

Quoted 7 lines
Quoted 1 line

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

#6 lore raw
In reply to Johannes Berg
Quoted 5 lines · Johannes Berg
Quoted 3 lines · Maxim Levitsky

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

Quoted 8 lines
Quoted 5 lines

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.

Quoted 3 lines

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

johannes

Best regards,
Maxim Levitsky

#7 lore raw
In reply to Maxim Levitsky
Quoted 8 lines · Maxim Levitsky

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.

Signature · 1 line
Kalle Valo