From patchwork Wed Apr 3 15:17:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Otcheretianski, Andrei" X-Patchwork-Id: 1075786 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ycsno5rU"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44Z3cv3G4Vz9sP8 for ; Wed, 3 Apr 2019 22:24:15 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=K1SM0sqYHt2X0oo44yMZEtBgvgukLVM6wxpeca80Tdw=; b=Ycsno5rU4zDKE7 ikJmP/PzfgeHLV7fC6wYAdkCJNHoaE/b95f48LGEON1pAusz+DmzXAjNSm3v1U2cOCKxmGBnv4are WhThShHxOWa6eWlQifMId1+anmulEcTOjE+SH8zLLcWxjai+3KrrdSzBfUfqgA9PBAj+dP8jTx/ol AMUgQ4CW6BRQtAfXgMWQDu/vaXzSwcvuDXFr55fqzaJpeGb3P+Ifr2D538qo6MRTKWHl6UXxPZRlp C/Xqrkn01FZYZOrr0AC6V22Fq0mRpsJIjL9lZJYWoIat4rGJMVqhhVFITF1+yyKQ3U04Kz25XPUfF kbrRy44sQq9fCqwktjTg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBe03-0005AG-Ca; Wed, 03 Apr 2019 11:24:11 +0000 Received: from mga14.intel.com ([192.55.52.115]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBdzu-0004xc-Qz for hostap@lists.infradead.org; Wed, 03 Apr 2019 11:24:04 +0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Apr 2019 04:24:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,304,1549958400"; d="scan'208";a="128260515" Received: from andrei-xps-12-9q33.jer.intel.com ([10.12.190.129]) by orsmga007.jf.intel.com with ESMTP; 03 Apr 2019 04:24:01 -0700 From: Andrei Otcheretianski To: hostap@lists.infradead.org Subject: [PATCH] scan: Use normal scans after connection failure Date: Wed, 3 Apr 2019 18:17:13 +0300 Message-Id: <20190403151719.12165-3-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190403151719.12165-1-andrei.otcheretianski@intel.com> References: <20190403151719.12165-1-andrei.otcheretianski@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190403_042403_121500_42D10130 X-CRM114-Status: GOOD ( 11.21 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [192.55.52.115 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 2.4 DATE_IN_FUTURE_03_06 Date: is 3 to 6 hours after Received: date X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ilan Peer Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Ilan Peer In case of connection attempt failure, set 'normal_scans' to zero, as otherwise it is possible that scheduled scan would be used and not normal scan, which might delay the next connection attempt. Signed-off-by: Ilan Peer --- wpa_supplicant/wpa_supplicant.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 7c9f58105f..0784a3aece 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -6737,6 +6737,9 @@ void wpas_connection_failed(struct wpa_supplicant *wpa_s, const u8 *bssid) * TODO: if more than one possible AP is available in scan results, * could try the other ones before requesting a new scan. */ + + /* speed up the connection attempt with normal scan */ + wpa_s->normal_scans = 0; wpa_supplicant_req_scan(wpa_s, timeout / 1000, 1000 * (timeout % 1000)); }