From patchwork Mon Nov 5 08:35:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eyal Shapira X-Patchwork-Id: 197163 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (unknown [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 15EDB2C007D for ; Mon, 5 Nov 2012 19:39:38 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 2FEEF9CDCC; Mon, 5 Nov 2012 03:35:50 -0500 (EST) 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 8vnGYML5ujFS; Mon, 5 Nov 2012 03:35:49 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id E8AD69C2E5; Mon, 5 Nov 2012 03:35:45 -0500 (EST) 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 D3CAB9C2E5 for ; Mon, 5 Nov 2012 03:35:44 -0500 (EST) 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 8zVvk+uAlkWq for ; Mon, 5 Nov 2012 03:35:40 -0500 (EST) Received: from mail-ea0-f172.google.com (mail-ea0-f172.google.com [209.85.215.172]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id E75DB9C2DE for ; Mon, 5 Nov 2012 03:35:39 -0500 (EST) Received: by mail-ea0-f172.google.com with SMTP id k13so2908307eaa.17 for ; Mon, 05 Nov 2012 00:35:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=rkidRQzXct1nlTMz41gzJokYtTB84zBhCzroaEUFQdQ=; b=E12l5EN6KeDAeUBOtza0R0VZ3X/qXlIRYodxDe5PG9gtyz9J0rNgoPPrQs6bboNFe/ Zdu+x2SZMXnbzdzekXbnpC6FIl0seIIQ/9LMGOXoZ/AsOz7PEuTINkZ5S8GSlC0yBgQ6 gUwtiB6DnkXfyLkE56Hbh7vmbPG/OS6d4CWeo4kxL0OWb55tS4BUXC79NIlNN6fRqzE5 YuOOzV9+fPEszGkYHkcMsefheXwNVc11w6NiGnvtYyvFockEGPjTO4wKgObIR6pUfMWm EbydjZdgsJECm+SwNwgbe/K6QuBVWCFBz0I2HDj5xFw/C4K5djihN0XUoLGcR03B9EV4 +BSA== Received: by 10.14.219.2 with SMTP id l2mr34632225eep.3.1352104538732; Mon, 05 Nov 2012 00:35:38 -0800 (PST) Received: from localhost.localdomain ([213.57.42.169]) by mx.google.com with ESMTPS id f2sm46543254eep.2.2012.11.05.00.35.37 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 05 Nov 2012 00:35:38 -0800 (PST) From: Eyal Shapira To: Subject: [PATCH] P2P: Fix duplicate handling of rx action frames Date: Mon, 5 Nov 2012 10:35:31 +0200 Message-Id: <1352104531-18651-1-git-send-email-eyal@wizery.com> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQlnLrNUwTRTrJWE37pB5EnlQNGufSNYpjP7N/ZZyN7q1j4RkkN+MRPQwzVQdhZ3HQNi2TYa Cc: j@w1.fi 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: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com When using a separate group iface both p2p device iface and the group iface are registered for action frames. This causes duplicate handling of rx action frames. One side effect of this is getting multiple responses for requests sent over action frames while GO/CLI are up like prov disc and dev disc. Fix this by discarding the duplicate p2p action frames received on the group iface. The code will handle all of these correctly when coming on the p2p dev iface as it looks at the DA when where relevant. Signed-hostap: Eyal Shapira --- wpa_supplicant/p2p_supplicant.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index cf90fbd..8c54cb0 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -4497,6 +4497,12 @@ void wpas_p2p_rx_action(struct wpa_supplicant *wpa_s, const u8 *da, if (wpa_s->global->p2p == NULL) return; + if (wpa_s->p2p_group_interface != NOT_P2P_GROUP_INTERFACE) { + wpa_printf(MSG_DEBUG, "Discard RX action event on P2P " + "GO/CLI iface. P2P Device interface will handle it"); + return; + } + p2p_rx_action(wpa_s->global->p2p, da, sa, bssid, category, data, len, freq); }