From patchwork Tue Nov 3 14:25:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilan Peer X-Patchwork-Id: 539386 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B1D32140E5C for ; Tue, 3 Nov 2015 23:27:28 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZtagP-0008Rg-5v; Tue, 03 Nov 2015 12:27:25 +0000 Received: from mga09.intel.com ([134.134.136.24]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZtagK-0008Op-Ih for hostap@lists.infradead.org; Tue, 03 Nov 2015 12:27:21 +0000 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 03 Nov 2015 04:27:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,238,1444719600"; d="scan'208";a="593153711" Received: from unknown (HELO JED00377.ger.corp.intel.com) ([10.12.217.192]) by FMSMGA003.fm.intel.com with ESMTP; 03 Nov 2015 04:27:05 -0800 From: Ilan Peer To: hostap@lists.infradead.org Subject: [PATCH 6/6] wpa_supplicant: Clear send action work without waiting Date: Tue, 3 Nov 2015 16:25:01 +0200 Message-Id: <1446560701-30841-7-git-send-email-ilan.peer@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1446560701-30841-1-git-send-email-ilan.peer@intel.com> References: <1446560701-30841-1-git-send-email-ilan.peer@intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151103_042720_841083_A047DB42 X-CRM114-Status: GOOD ( 10.79 ) X-Spam-Score: -6.9 (------) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-6.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [134.134.136.24 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [134.134.136.24 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Avraham Stern MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Avraham Stern When clearing pending tx action to start a new P2P operation like P2P_FIND or P2P_LISTEN, wpas_p2p_action_clear_tx() is used to clear the send action work. However, in cases that the action work has wait time, it is not cleared immediately but only after the wait time ends. This may cause delay in starting the P2P operation. Fix that by always clearing the send action work immediately. Signed-off-by: Avraham Stern --- wpa_supplicant/p2p_supplicant.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 59ca368..402ceda 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -6346,7 +6346,8 @@ static void wpas_p2p_clear_pending_action_tx(struct wpa_supplicant *wpa_s) if (!offchannel_pending_action_tx(wpa_s)) return; - wpas_p2p_action_tx_clear(wpa_s); + if (wpa_s->p2p_send_action_work) + wpas_p2p_free_send_action_work(wpa_s); wpa_printf(MSG_DEBUG, "P2P: Drop pending Action TX due to new " "operation request");