Skip to contentSkip to conversation

SIOCSIWAP behavior question

DISCUSSION Dan Williams 4 participants 8 messages Apr 2, 2007 – Apr 3, 2007

lore
Share & tools
lore
#0 lore raw

Should setting a BSSID trigger a disconnection event from the driver? Obviously a disconnect event shouldn't be triggered if the BSSID being set is the same BSSID the card is already associated with. Or does that mean "reassociate unconditionally" ?

But suppose we have two APs in the same ESS with obviously different BSSIDs. The card automatically associates with one BSSID, but wpa_supplicant decides it likes the other BSSID and calls SIOCSIWAP to lock to that one during the association process. Should the driver issue an IWAP event of 00:00:00:00:00:00 before attempting re-association with the BSSID that wpa_supplicant wants?

The libertas driver currently does this; it sometimes confuses wpa_supplicant and is arguably wrong behavior because drivers don't issue disconnection events when auto-roaming from BSSID to BSSID in the same ESS.

Conversely, if you have two access points 'linksys' with different BSSIDs that really _are_ two different ESSs, this would screw up userspace tools if a disconnect _wasn't_ sent. But in this case automatic tools have more problems than driver events.

Thoughts? I guess I vote for not sending disconnect events if that BSSID has the same capabilities and the same SSID as the current association BSS.

Dan

#1 lore raw
Quoted 1 line · Dan Williams

Should setting a BSSID trigger a disconnection event from the driver?

Hmm; badly phrased question. I really meant:

Should setting a BSSID _always_ trigger a disconnection event from the driver?

Quoted 32 lines

Obviously a disconnect event shouldn't be triggered if the BSSID being set is the same BSSID the card is already associated with. Or does that mean "reassociate unconditionally" ?

But suppose we have two APs in the same ESS with obviously different BSSIDs. The card automatically associates with one BSSID, but wpa_supplicant decides it likes the other BSSID and calls SIOCSIWAP to lock to that one during the association process. Should the driver issue an IWAP event of 00:00:00:00:00:00 before attempting re-association with the BSSID that wpa_supplicant wants?

The libertas driver currently does this; it sometimes confuses wpa_supplicant and is arguably wrong behavior because drivers don't issue disconnection events when auto-roaming from BSSID to BSSID in the same ESS.

Conversely, if you have two access points 'linksys' with different BSSIDs that really _are_ two different ESSs, this would screw up userspace tools if a disconnect _wasn't_ sent. But in this case automatic tools have more problems than driver events.

Thoughts? I guess I vote for not sending disconnect events if that BSSID has the same capabilities and the same SSID as the current association BSS.

Dan

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

#2 lore raw
In reply to Dan Williams
Quoted 1 line · Dan Williams

Should setting a BSSID trigger a disconnection event from the driver?

Just the act of setting BSSID? No.

Quoted 3 lines

Obviously a disconnect event shouldn't be triggered if the BSSID being set is the same BSSID the card is already associated with. Or does that mean "reassociate unconditionally" ?

I would ike to see disconnect event only if the driver/stack notices that it cannot complete association and based on this, believes its association to the ESS is lost.

Quoted 6 lines

But suppose we have two APs in the same ESS with obviously different BSSIDs. The card automatically associates with one BSSID, but wpa_supplicant decides it likes the other BSSID and calls SIOCSIWAP to lock to that one during the association process. Should the driver issue an IWAP event of 00:00:00:00:00:00 before attempting re-association with the BSSID that wpa_supplicant wants?

I would not like to see this. I see this as re-association within the same ESS and the driver/stack should just report the new BSSID after successful re-association. The exact same behavior should apply here regardless of whether BSSID was set (sort of forced re-association) or not (driver/stack re-associating, e.g., due to signal strength difference).

Quoted 9 lines

The libertas driver currently does this; it sometimes confuses wpa_supplicant and is arguably wrong behavior because drivers don't issue disconnection events when auto-roaming from BSSID to BSSID in the same ESS.

Conversely, if you have two access points 'linksys' with different BSSIDs that really _are_ two different ESSs, this would screw up userspace tools if a disconnect _wasn't_ sent. But in this case automatic tools have more problems than driver events.

I would rather not see disconnect event in either case. User space tools should react to BSSID change event by determining whether the old network configuration is still valid. This could be done, e.g., by pinging the default gateway (IP and/or MAC layer) and re-running DHCP if needed.

Signature · 1 line
Jouni Malinen                                            PGP id EFC895FA
#3 lore raw
Quoted 3 lines · Jouni Malinen

I would ike to see disconnect event only if the driver/stack notices that it cannot complete association and based on this, believes its association to the ESS is lost.

What is the recommended way to cause a disconnect / reconnect?

Ciao
Joerg
--
Joerg Mayer <[email protected]>
We are stuck with technology when what we really want is just stuff that works. Some say that should read Microsoft instead of technology.

#5 lore raw
In reply to Dan Williams
Quoted 4 lines · Dan Williams

Should setting a BSSID trigger a disconnection event from the driver? Obviously a disconnect event shouldn't be triggered if the BSSID being set is the same BSSID the card is already associated with. Or does that mean "reassociate unconditionally" ?

IMHO (answering your rephrased question with "always") it should unless the BSSIDs are really identical. After all, one disassociates from one BSS before associating to the other.

Quoted 4 lines

The libertas driver currently does this; it sometimes confuses wpa_supplicant and is arguably wrong behavior because drivers don't issue disconnection events when auto-roaming from BSSID to BSSID in the same ESS.

Is there a way to trigger such events when auto-roaming? :)

Quoted 3 lines

Thoughts? I guess I vote for not sending disconnect events if that BSSID has the same capabilities and the same SSID as the current association BSS.

I think that just makes things unnecessarily complex -- we'd have to try to see if two things are really the same ESS in the driver/stack/...

johannes

#4 lore raw
In reply to Joerg Mayer
Quoted 6 lines · Joerg Mayer
Quoted 3 lines · Jouni Malinen

I would ike to see disconnect event only if the driver/stack notices that it cannot complete association and based on this, believes its association to the ESS is lost.

What is the recommended way to cause a disconnect / reconnect?

I don't know whether there is such a thing, but I normally use SIOCSIWESSID with a different SSID (e.g., a random string) to force disconnection and with the same SSID to force re-association to the same ESS.

Signature · 1 line
Jouni Malinen                                            PGP id EFC895FA
#6 lore raw
In reply to Johannes Berg
Quoted 9 lines · Johannes Berg
Quoted 4 lines · Dan Williams

Should setting a BSSID trigger a disconnection event from the driver? Obviously a disconnect event shouldn't be triggered if the BSSID being set is the same BSSID the card is already associated with. Or does that mean "reassociate unconditionally" ?

IMHO (answering your rephrased question with "always") it should unless the BSSIDs are really identical. After all, one disassociates from one BSS before associating to the other.

So it appears that you and Jouni have opposite views here? I think a pure & consistent approach would issue disconnect every time the driver disassociated. But I'm not sure that would actually work in practice for all cases. But I don't have a good idea of all the specifics or implications.

I tend to think thought that Jouni's right and that within the same ESS we shouldn't send disconnect events if you're just changing BSSID.

Dan

Quoted 15 lines
Quoted 4 lines

The libertas driver currently does this; it sometimes confuses wpa_supplicant and is arguably wrong behavior because drivers don't issue disconnection events when auto-roaming from BSSID to BSSID in the same ESS.

Is there a way to trigger such events when auto-roaming? :)

Quoted 3 lines

Thoughts? I guess I vote for not sending disconnect events if that BSSID has the same capabilities and the same SSID as the current association BSS.

I think that just makes things unnecessarily complex -- we'd have to try to see if two things are really the same ESS in the driver/stack/...

johannes

#7 lore raw
Quoted 1 line · Dan Williams

So it appears that you and Jouni have opposite views here?

Looks like :)

Quoted 8 lines

I think a
pure & consistent approach would issue disconnect every time the driver disassociated. But I'm not sure that would actually work in practice for all cases. But I don't have a good idea of all the specifics or implications.

I tend to think thought that Jouni's right and that within the same ESS we shouldn't send disconnect events if you're just changing BSSID.

I guess that if you just send a new BSSID without sending a 00::00 inbetween the disconnect must have been there and is sort of implied. I'm fine with either way, and I'd like the outcome of this discussion specified somewhere on the cfg80211 page on linuxwireless.org so we can do it that way there too and I don't forget ;)

johannes