From patchwork Mon Aug 12 05:58:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jithu Jance X-Patchwork-Id: 266435 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id DC47E2C00E1 for ; Mon, 12 Aug 2013 15:58:27 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 429409D237; Mon, 12 Aug 2013 01:58:25 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Edeu1QyHV4Wc; Mon, 12 Aug 2013 01:58:25 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 674329D21A; Mon, 12 Aug 2013 01:58:20 -0400 (EDT) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 73FFF9D21A for ; Mon, 12 Aug 2013 01:58:19 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vqTLtOXOm4Jc for ; Mon, 12 Aug 2013 01:58:14 -0400 (EDT) Received: from mms2.broadcom.com (mms2.broadcom.com [216.31.210.18]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 524669D211 for ; Mon, 12 Aug 2013 01:58:14 -0400 (EDT) Received: from [10.9.208.57] by mms2.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.5)); Sun, 11 Aug 2013 22:51:59 -0700 X-Server-Uuid: 4500596E-606A-40F9-852D-14843D8201B2 Received: from IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) by IRVEXCHCAS08.corp.ad.broadcom.com (10.9.208.57) with Microsoft SMTP Server (TLS) id 14.1.438.0; Sun, 11 Aug 2013 22:58:08 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) with Microsoft SMTP Server id 14.1.438.0; Sun, 11 Aug 2013 22:58:08 -0700 Received: from jithu?broadcom.com (lbblr-jithu01.ban.broadcom.com [10.132.24.37]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 9837EF2D72; Sun, 11 Aug 2013 22:58:07 -0700 (PDT) Date: Mon, 12 Aug 2013 11:28:05 +0530 From: "Jithu Jance" To: j@w1.fi, hostap@lists.shmoo.com Subject: [PATCH 1/1] STA: Reduce the time taken for initial association when FW ROAM is enabled Message-ID: <20130812055805.GA15972@jithu@broadcom.com> MIME-Version: 1.0 User-Agent: Mutt/1.5.21 (2010-09-15) X-WSS-ID: 7E16A8751R079532574-01-01 Content-Disposition: inline X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com 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 --- wpa_supplicant/wpa_supplicant.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) -- 1.7.9.5 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;