From patchwork Thu May 17 14:11:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klimczewski Marcin X-Patchwork-Id: 159910 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 25DE1B6FB7 for ; Fri, 18 May 2012 00:11:53 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id CBB1A9D2F0; Thu, 17 May 2012 10:11:48 -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 GK49tLssm+oC; Thu, 17 May 2012 10:11:48 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id BB65B9D2F2; Thu, 17 May 2012 10:11:43 -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 53FAC9D2F2 for ; Thu, 17 May 2012 10:11:42 -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 Q5vPAxWn+Jtq for ; Thu, 17 May 2012 10:11:37 -0400 (EDT) Received: from ebb05.tieto.com (ebb05.tieto.com [131.207.168.36]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "ebb05.tieto.com", Issuer "VeriSign Class 3 Secure Server CA - G3" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id E584E9D2F0 for ; Thu, 17 May 2012 10:11:36 -0400 (EDT) X-AuditID: 83cfa824-b7b73ae000005f92-79-4fb50716a708 Received: from FIHGA-EXHUB01.eu.tieto.com ( [131.207.136.34]) by ebb05.tieto.com (SMTP Mailer) with SMTP id 9B.BE.24466.61705BF4; Thu, 17 May 2012 17:11:34 +0300 (EEST) Received: from [10.28.23.71] (10.28.23.71) by inbound.tieto.com (131.207.136.49) with Microsoft SMTP Server id 8.3.245.1; Thu, 17 May 2012 17:11:34 +0300 Message-ID: <4FB50716.5090203@tieto.com> Date: Thu, 17 May 2012 16:11:34 +0200 From: Klimczewski Marcin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: Subject: [PATCH] P2P: Fix problem with connecting to non-P2P network in P2P mode X-Brightmail-Tracker: AAAAAA== X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.9 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 This patch allows connection to non-P2P network in P2P mode. In P2P mode, attempt to connect to non-P2P network always fails due to handling scan results in P2P specific way and scan process looping itself. To solve it wpas_p2p_stop_find() is called just after invoking scan request. From 75ef9fd523266cc1925681a1973e70d014b5df4a Mon Sep 17 00:00:00 2001 From: Marcin Klimczewski Date: Thu, 17 May 2012 12:28:41 +0200 Subject: [PATCH] P2P: Fix problem with connecting to non-P2P network in P2P mode To allow to connect to non-P2P network in P2P mode, p2p_stop_find is called just after invoking scan request. Signed-off-by: Marcin Klimczewski --- wpa_supplicant/scan.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) eloop_cancel_timeout(wpa_supplicant_scan, wpa_s, NULL); diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index e66eed1..85fcf4d 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -708,6 +708,8 @@ void wpa_supplicant_req_scan(struct wpa_supplicant *wpa_s, int sec, int usec) } } + wpas_p2p_stop_find(wpa_s); + wpa_dbg(wpa_s, MSG_DEBUG, "Setting scan request: %d sec %d usec", sec, usec);