[1/1] STA: Reduce the time taken for initial association when FW ROAM is enabled

Submitted by Jithu Jance on Aug. 12, 2013, 5:58 a.m.

Details

Message ID 20130812055805.GA15972@jithu@broadcom.com
State Changes Requested
Headers show

Commit Message

Jithu Jance Aug. 12, 2013, 5:58 a.m.
If Driver advertises the FW_ROAM, the supplicant doesn't pass down
the bssid and freq in the connect req(even though supplicant has these
info from its scan). This forces the firmware to do a full scan again
finding out the AP to JOIN. Instead FW can already make use of the scan
done by the supplicant for the first association. In case if some fw
doesn't require it, it can just ignore the bssid.

IMHO, passing down the bssid and freq adds more flexibility and
will help to improve the connection timings. Please see whether
the patch is fine.

Signed-hostap: Jithu Jance <jithu@broadcom.com>
---
 wpa_supplicant/wpa_supplicant.c |   16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

--
1.7.9.5

Comments

Jouni Malinen Aug. 25, 2013, 7:14 a.m.
On Mon, Aug 12, 2013 at 11:28:05AM +0530, Jithu Jance wrote:
> If Driver advertises the FW_ROAM, the supplicant doesn't pass down
> the bssid and freq in the connect req(even though supplicant has these
> info from its scan). This forces the firmware to do a full scan again
> finding out the AP to JOIN. Instead FW can already make use of the scan
> done by the supplicant for the first association. In case if some fw
> doesn't require it, it can just ignore the bssid.
> 
> IMHO, passing down the bssid and freq adds more flexibility and
> will help to improve the connection timings. Please see whether
> the patch is fine.

I agree that it could be useful to provide the initial BSSID/freq hints
to the driver. However, this proposed change is not the way to do that.
It would prevent the driver from doing any roaming by hardcoding a
specific BSSID to be used for the connection. This needs to be done by
introducing new nl80211 attributes for BSSID/freq hints that are then
documented as hints, i.e., as something the driver is free to ignore to
enable roaming within ESS.

Patch hide | download patch | download mbox

diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index a18922a..5b83c86 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -1536,15 +1536,13 @@  void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
 	if (bss) {
 		params.ssid = bss->ssid;
 		params.ssid_len = bss->ssid_len;
-		if (!wpas_driver_bss_selection(wpa_s) || ssid->bssid_set) {
-			wpa_printf(MSG_DEBUG, "Limit connection to BSSID "
-				   MACSTR " freq=%u MHz based on scan results "
-				   "(bssid_set=%d)",
-				   MAC2STR(bss->bssid), bss->freq,
-				   ssid->bssid_set);
-			params.bssid = bss->bssid;
-			params.freq = bss->freq;
-		}
+		wpa_printf(MSG_DEBUG, "Limit connection to BSSID "
+			   MACSTR " freq=%u MHz based on scan results "
+			   "(bssid_set=%d)",
+			   MAC2STR(bss->bssid), bss->freq,
+			   ssid->bssid_set);
+		params.bssid = bss->bssid;
+		params.freq = bss->freq;
 	} else {
 		params.ssid = ssid->ssid;
 		params.ssid_len = ssid->ssid_len;