Search Linux Wireless

Re: commit #1868cf308a3b3a336fcfe52c5aea4ac12d5e42ac breaks wireless on my system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <johannes@xxxxxxxxxxxxxxxx>
> 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 <johannes@xxxxxxxxxxxxxxxx>
>     Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx>

>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

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux