From patchwork Wed Sep 2 09:40:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jimmy Chen X-Patchwork-Id: 1359857 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=KrccgHSU; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20161025 header.b=pulC5Oj7; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BmBQy4fJPz9sRK for ; Wed, 9 Sep 2020 03:07:22 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:To:Subject: Message-ID:Date:From:MIME-Version:Reply-To:Cc:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=nNpZup4Gv1P4MugV+GaKbrHvHXinsU7lhYn+cg2hCJE=; b=KrccgHSUnAWmNwxZR7F6ml342v E2VP2VOcYh5c1zuFyrsV19aMgMW1jHkCju5KXGyJoOqvpEAD+MCRka4uCgBFhjp/okiFYqWC1Z7UN dFuGSd5NQdxdSeZvaehlAHgXxk7r3TgT3GCgmALBJOESodqahmdeaETtBJbWnXr1d1kbLGc9CyJ+A ZbFVgBcLnZy0v8js3ri1G6bi+uhUTniWPxfAmEK9Ok7LhCklN15eOwXCWZfZKSiG97ZDeDbXPCaVN 5rtfCaGXnXTxDnbj4hC/tgYlyspSzDzOGRYUvjHk0+6f2C3kssdSzXF0nKxbtMBNCTWy8lASCGXR9 iAJCVEdA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFh4a-0002P9-HM; Tue, 08 Sep 2020 17:06:24 +0000 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDPGJ-0002Bw-M6 for hostap@lists.infradead.org; Wed, 02 Sep 2020 09:41:04 +0000 Received: by mail-pl1-x629.google.com with SMTP id z15so2031515plo.7 for ; Wed, 02 Sep 2020 02:41:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=LVDCOV/joIxY3iq3nzzMNKPml+1NMcKRApaR9oX26aU=; b=pulC5Oj7LWgEc88x3puP6tP9QeJ0mBKExRg+Hy0MEClMuepmS5bU9hmPEB257Y4V+i y00Ptk5Ji3ufk8DeHMKdaB0is5jI5Bxx/jddM+MQ7+/DCcWTDKtbeaJnxDP8+lK7M+lH hmtDoaKERmjqQV9RMEMLkIPa+cRRA8BDqfuK2cKw2Hz+IrsPaMcAne92EGKtJtJypDPg X6S8awV3xZWYigwjw6sJfBG8h7l+pxTUdo1YeD0AD1lHv5YEPpIK6vFWv0QbjSxWS5c8 iyYqiDmWDCh17SifrNr/IqGjPbhAWMr2yW0wCvfwCJ/ZEmIuiM5Rk7tJMYAmJpl/sHfX 1gSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=LVDCOV/joIxY3iq3nzzMNKPml+1NMcKRApaR9oX26aU=; b=WeklhB6LI3KSlDlSHxnTgcrjUOZ/afFaBx3x9esf7PhrvWbvQqUFu5XGWIquw5+b78 rR7wM3GJ1X7LNx053cR8zCXSTs3C1yK7p+6eXD39T5bPvJmwCQExlr9L3V50aJivHccr 4KGWAce11L6X4cVCxNIZD7RydfLQr0CAi4jNIxM+3eNa5t2MLRTphbEbUZqCBEJwLKRm SrHEUML+pOxfFOcnnvt70l0X2ARN/j/c9daTet5Lumx7ihFVcObl7+vGYEc64WkalHy7 ms43PRrU8N/oEglTMs7dHBBws53zkJ+WEaVKWUhbOKtYC7DR/ktOFQ2ieMdmojnl0BuG 4bCQ== X-Gm-Message-State: AOAM531dBuWq8aVUjCuc4v9xVqvhd8T279MFW58LFg2WN5YASsGr2ZFJ d6UDuNCSRMTHcSj3G5dFdeQ+R1iTJXqHp1bQZAjgpLIJfktdtw== X-Google-Smtp-Source: ABdhPJwjqptAZCNQReIo/i4dBv9vPMeORvg9BWdubT6GA8YfA2ZB8mm3nZ3JeIvesJpR+n5gmeBOQchBU6wcMpuzMho= X-Received: by 2002:a17:902:ee03:: with SMTP id z3mr1482511plb.68.1599039661139; Wed, 02 Sep 2020 02:41:01 -0700 (PDT) MIME-Version: 1.0 From: Jimmy Chen Date: Wed, 2 Sep 2020 17:40:48 +0800 Message-ID: Subject: p2p: fallback to p2p neg after running out of GO scan attempts. To: hostap@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200902_054103_761696_79FDF5C7 X-CRM114-Status: GOOD ( 12.76 ) X-Spam-Score: -16.2 (----------------) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-16.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:629 listed in] [list.dnswl.org] -7.5 USER_IN_DEF_SPF_WL From: address is in the default SPF white-list 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM white-list -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.5 ENV_AND_HDR_SPF_MATCH Env and Hdr From used in default SPF WL Match -0.5 DKIMWL_WL_MED DKIMwl.org - Medium sender X-Mailman-Approved-At: Tue, 08 Sep 2020 13:06:22 -0400 X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Hi, We found a problem that p2p_fallback_to_go_neg is not handled correctly after running out of GO scan attempts. When autojoin is enabled and a group is found in old scan results, supplicant would try to scan the group several times. If the group is still not found, it reports group formation failure while p2p_fallback_to_go_neg is enabled already. Best regards, Jimmy Thank you for your time and consideration. Best regards, Jimmy From f1870193055af204b5f79a4b1590e8e9d26b6903 Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Wed, 2 Sep 2020 16:50:11 +0800 Subject: [PATCH] p2p: fallback to p2p neg after running out of GO scan attempts. If p2p_fallback_to_go_neg is enabled, it should fallback to go neg, but not report group formation failure after running out of GO scan attempts. Signed-off-by: Jimmy Chen --- wpa_supplicant/p2p_supplicant.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index d7b81ceb0..7ffb94592 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -4917,6 +4917,15 @@ static void wpas_p2p_check_join_scan_limit(struct wpa_supplicant *wpa_s) MAC2STR(wpa_s->pending_join_dev_addr)); return; } + if (wpa_s->p2p_fallback_to_go_neg) { + wpa_dbg(wpa_s, MSG_DEBUG, "P2P: Join operating " + "failed - fall back to GO Negotiation"); + wpa_msg_global(wpa_s->p2pdev, MSG_INFO, + P2P_EVENT_FALLBACK_TO_GO_NEG + "reason=join-failed"); + wpas_p2p_fallback_to_go_neg(wpa_s, 0); + return; + } wpa_msg_global(wpa_s->p2pdev, MSG_INFO, P2P_EVENT_GROUP_FORMATION_FAILURE); wpas_notify_p2p_group_formation_failure(wpa_s, ""); -- 2.28.0.526.ge36021eeef-goog