Bug in lbs_set_essid

Dan Williams dcbw at redhat.com
Thu Apr 1 13:16:10 EDT 2010


On Thu, 2010-04-01 at 08:50 -0700, Jon Nettleton wrote:
> I was tracking down a scanning delay that was happening during resume
> on my olpc XO 1.5, and came across this bug.  Note, during suspend the
> card is completely powered down, so resume is a clean start with no
> history.
> 
> The card is powered up and initializes a full scan.  Channels 1-4 are
> scanned and then an association request for any is initiated.  When
> lbs_set_essid is called the SSID is set to garbage, so then the driver
> tries to connect to this bogus SSID for a while until it gives up and
> then finishes scanning the rest of the channels.

If the SSID is coming from the supplicant then that's expected; sending
the "any" BSSID and the bogus SSID is the only way with WEXT to ensure
that the card is completely disassociated from anything, and isn't
trying to reconnect to something that we dont' want it to connect to.

Some drivers interpret a blank/zero-length SSID assoc request as "find
anything to connect to, no matter what it is".  With WEXT there is
simply no "disassociate and stop doing anything" command, so the bogus
SSID + BSSID stand in for this.

If the SSID coming in from WEXT *is* valid, but somehow the driver is
messing up the SSID internally before sending the assoc request, well
that's a different story and we should fix that.  Any idea if the
incoming WEXT SSID is valid or not?

But honestly we should be queuing the assoc request and only execeuting
it *after* the scan is done.  Or we could reject assoc becuase there's
an ongoing scan, but that's just mean and makes clients fail.

Dan

> Here is the Association Request with the broken SSID
> 
> [  567.199744] libertas assoc: Association Request:
> [  567.199749]     flags:     0x00000772
> [  567.199753]     SSID:      '%�\01'
> [  567.199757]     chann:     1
> [  567.199761]     band:      0
> [  567.199765]     mode:      2
> [  567.199768]     BSSID:     00:00:00:00:00:00
> [  567.199773]     secinfo:
> [  567.199776]     auth_mode: 1
> 
> 
> I haven't written a patch to fix it yet.
> 
> Jon
> 
> _______________________________________________
> libertas-dev mailing list
> libertas-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/libertas-dev





More information about the libertas-dev mailing list