From patchwork Tue Dec 13 12:28:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neeraj Garg X-Patchwork-Id: 131063 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 C1C6B1007D3 for ; Tue, 13 Dec 2011 23:29:34 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id A4D819C17C; Tue, 13 Dec 2011 07:29:26 -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 WRZKDWSbY9xs; Tue, 13 Dec 2011 07:29:26 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 98D189C167; Tue, 13 Dec 2011 07:29:22 -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 284B39C167 for ; Tue, 13 Dec 2011 07:29:21 -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 ua5jg7CqySK1 for ; Tue, 13 Dec 2011 07:29:16 -0500 (EST) Received: from MMS3.broadcom.com (mms3.broadcom.com [216.31.210.19]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 9259D9C152 for ; Tue, 13 Dec 2011 07:29:16 -0500 (EST) Received: from [10.16.192.232] by MMS3.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.3.2)); Tue, 13 Dec 2011 04:36:27 -0800 X-Server-Uuid: B55A25B1-5D7D-41F8-BC53-C57E7AD3C201 Received: from SJEXCHCCR02.corp.ad.broadcom.com ([10.16.192.130]) by SJEXCHHUB02.corp.ad.broadcom.com ([10.16.192.232]) with mapi; Tue, 13 Dec 2011 04:29:00 -0800 From: "Neeraj Kumar Garg" To: "hostap@lists.shmoo.com" Date: Tue, 13 Dec 2011 04:28:54 -0800 Subject: [PATCH]P2P:Provision discovery from a known peer should check for PROBE_REQ_ONLY flag Thread-Topic: [PATCH]P2P:Provision discovery from a known peer should check for PROBE_REQ_ONLY flag Thread-Index: Acy5ksaEfj9syvx7Q9m3txuxs5G6Kw== Message-ID: <2C2F1EBA8050E74EA81502D5740B4BD6BBBCADF568@SJEXCHCCR02.corp.ad.broadcom.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-WSS-ID: 62F999415044180547-01-01 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 Provision discovery from a known peer should actually check for dev->flags & P2P_DEV_PROBE_REQ_ONLY. This is creating an issue of updating the listen frequency of peer with the PD request frame frequency. PD request frame will be sent by the peer on our local listen frequency. This patch fixes that error. Suggested check has already been implemented in the invitation req receive path. Please let me know if the patch is OK. Subject: [PATCH] [PATCH]P2P:Provision discovery from a known peer should check for PROBE_REQ_ONLY flag. --- src/p2p/p2p_pd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/p2p/p2p_pd.c b/src/p2p/p2p_pd.c index 6409454..a8f6912 100644 --- a/src/p2p/p2p_pd.c +++ b/src/p2p/p2p_pd.c @@ -112,7 +112,7 @@ void p2p_process_prov_disc_req(struct p2p_data *p2p, const u8 *sa, MAC2STR(sa), msg.wps_config_methods, rx_freq); dev = p2p_get_device(p2p, sa); - if (dev == NULL || !(dev->flags & P2P_DEV_PROBE_REQ_ONLY)) { + if (dev == NULL || (dev->flags & P2P_DEV_PROBE_REQ_ONLY)) { wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: Provision Discovery Request from " "unknown peer " MACSTR, MAC2STR(sa));