diff mbox

[2/2] Update IE after association regardless driver roaming support

Message ID 20140115183356.283101401FA@ushik.mtv.corp.google.com
State Superseded
Headers show

Commit Message

Dmitry Shmidt Jan. 15, 2014, 6:30 p.m. UTC
Update IE is necessary if roaming is done by driver / FW, but will
not harm in other case

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
---
 wpa_supplicant/events.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Jouni Malinen Jan. 17, 2014, 9:32 a.m. UTC | #1
On Wed, Jan 15, 2014 at 10:30:12AM -0800, Dmitry Shmidt wrote:
> Update IE is necessary if roaming is done by driver / FW, but will
> not harm in other case

Could you please clarify why this would not do harm in other cases? The
WPA_DRIVER_FLAGS_BSS_SELECTION case is know to require this which is why
the IE update code is there. However, it is not known whether there
could be drivers that do not have correct information in scan results
for all cases (e.g., some of the hidden SSID/multi-SSID cases could be a
bit risky in this area). Consequently, I could see this change
potentially breaking some working cases. Since I see no real
justification for this change, I'd rather not add it.

Drivers that do BSS selection in the driver/firmware better indicate
that to the user space and the real fix here would be to make any driver
that could today need this change work properly in this area. Working
around them with a change in wpa_supplicant is not justifiable if there
is risk in breaking something for other drivers.

As far as being able to fix one known driver misbehavior in this area,
there is already a change in upstream kernel moving ahead with the
BSSID/frequency hint attributes. Once that hits wireless-testing.git, we
can add the wpa_supplicant changes to provide that information to the
driver even when WPA_DRIVER_FLAGS_BSS_SELECTION is advertised. That will
hopefully remove any assumed need for not advertising this capability
correctly.
Kurt Bodiker Jan. 17, 2014, 11:37 a.m. UTC | #2
For what it's worth, this appears to have fixed the problem I am
experiencing of the scan results not being updated for the current_bss
when the SSID is hidden. With this patch in place, the value for
signal level changes as expected.

Kurt

On Fri, Jan 17, 2014 at 4:32 AM, Jouni Malinen <j@w1.fi> wrote:
> On Wed, Jan 15, 2014 at 10:30:12AM -0800, Dmitry Shmidt wrote:
>> Update IE is necessary if roaming is done by driver / FW, but will
>> not harm in other case
>
> Could you please clarify why this would not do harm in other cases? The
> WPA_DRIVER_FLAGS_BSS_SELECTION case is know to require this which is why
> the IE update code is there. However, it is not known whether there
> could be drivers that do not have correct information in scan results
> for all cases (e.g., some of the hidden SSID/multi-SSID cases could be a
> bit risky in this area). Consequently, I could see this change
> potentially breaking some working cases. Since I see no real
> justification for this change, I'd rather not add it.
>
> Drivers that do BSS selection in the driver/firmware better indicate
> that to the user space and the real fix here would be to make any driver
> that could today need this change work properly in this area. Working
> around them with a change in wpa_supplicant is not justifiable if there
> is risk in breaking something for other drivers.
>
> As far as being able to fix one known driver misbehavior in this area,
> there is already a change in upstream kernel moving ahead with the
> BSSID/frequency hint attributes. Once that hits wireless-testing.git, we
> can add the wpa_supplicant changes to provide that information to the
> driver even when WPA_DRIVER_FLAGS_BSS_SELECTION is advertised. That will
> hopefully remove any assumed need for not advertising this capability
> correctly.
>
> --
> Jouni Malinen                                            PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP@lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
Dmitry Shmidt Jan. 17, 2014, 10:12 p.m. UTC | #3
On Fri, Jan 17, 2014 at 1:32 AM, Jouni Malinen <j@w1.fi> wrote:
> On Wed, Jan 15, 2014 at 10:30:12AM -0800, Dmitry Shmidt wrote:
>> Update IE is necessary if roaming is done by driver / FW, but will
>> not harm in other case
>
> Could you please clarify why this would not do harm in other cases?

It is possible that I am missing something but what I think is that
in assoc event it is maybe not necessary sometimes but definitely
safe to update current wpa IEs from wpa_s->current_bss.

I am trying to resolve the case when driver/FW is doing roaming but not
exporting WPA_DRIVER_FLAGS_BSS_SELECTION flag. Exporting this
flag causes for wpa_supplicant not to provide BSSID and Freq for association
request and this is slowing initial connection.

> The WPA_DRIVER_FLAGS_BSS_SELECTION case is know to require this which is why
> the IE update code is there. However, it is not known whether there
> could be drivers that do not have correct information in scan results
> for all cases (e.g., some of the hidden SSID/multi-SSID cases could be a
> bit risky in this area). Consequently, I could see this change
> potentially breaking some working cases. Since I see no real
> justification for this change, I'd rather not add it.
>
> Drivers that do BSS selection in the driver/firmware better indicate
> that to the user space and the real fix here would be to make any driver
> that could today need this change work properly in this area. Working
> around them with a change in wpa_supplicant is not justifiable if there
> is risk in breaking something for other drivers.
>
> As far as being able to fix one known driver misbehavior in this area,
> there is already a change in upstream kernel moving ahead with the
> BSSID/frequency hint attributes. Once that hits wireless-testing.git, we
> can add the wpa_supplicant changes to provide that information to the
> driver even when WPA_DRIVER_FLAGS_BSS_SELECTION is advertised. That will
> hopefully remove any assumed need for not advertising this capability
> correctly.
>
> --
> Jouni Malinen                                            PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP@lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
diff mbox

Patch

diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 632f0fe..f936b55 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1865,8 +1865,7 @@  static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
 				wpa_s->current_bss = bss;
 		}
 
-		if (wpa_s->conf->ap_scan == 1 &&
-		    wpa_s->drv_flags & WPA_DRIVER_FLAGS_BSS_SELECTION) {
+		if (wpa_s->conf->ap_scan == 1) {
 			if (wpa_supplicant_assoc_update_ie(wpa_s) < 0)
 				wpa_msg(wpa_s, MSG_WARNING,
 					"WPA/RSN IEs not updated");