From patchwork Thu Mar 28 14:39:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arend van Spriel X-Patchwork-Id: 232052 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]) by ozlabs.org (Postfix) with ESMTP id A4FB02C00AF for ; Fri, 29 Mar 2013 01:39:43 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 765F29D23F; Thu, 28 Mar 2013 10:39:41 -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 9ALjcImcxVzl; Thu, 28 Mar 2013 10:39:41 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 0701A17C024; Thu, 28 Mar 2013 10:39:36 -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 C63DA17C024 for ; Thu, 28 Mar 2013 10:39:34 -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 NUUoN4BTKjT8 for ; Thu, 28 Mar 2013 10:39:30 -0400 (EDT) Received: from mms1.broadcom.com (mms1.broadcom.com [216.31.210.17]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 947C69D23B for ; Thu, 28 Mar 2013 10:39:29 -0400 (EDT) Received: from [10.9.208.55] by mms1.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.5)); Thu, 28 Mar 2013 07:36:32 -0700 X-Server-Uuid: 06151B78-6688-425E-9DE2-57CB27892261 Received: from IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) by IRVEXCHCAS07.corp.ad.broadcom.com (10.9.208.55) with Microsoft SMTP Server (TLS) id 14.1.438.0; Thu, 28 Mar 2013 07:39:19 -0700 Received: from mail-sj1-12.sj.broadcom.com (10.10.10.20) by IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) with Microsoft SMTP Server id 14.1.438.0; Thu, 28 Mar 2013 07:39:19 -0700 Received: from arend-ubuntu-x64 (unknown [10.177.252.244]) by mail-sj1-12.sj.broadcom.com (Postfix) with ESMTP id A5222207C0; Thu, 28 Mar 2013 07:39:18 -0700 (PDT) Received: from arend by arend-ubuntu-x64 with local (Exim 4.80) ( envelope-from ) id 1ULDyz-0000h4-Qe; Thu, 28 Mar 2013 15:39:13 +0100 From: "Arend van Spriel" To: "David Spinadel" Subject: [PATCH] p2p_supplicant: probe reporting should be from listen interface Date: Thu, 28 Mar 2013 15:39:03 +0100 Message-ID: <1364481543-2636-1-git-send-email-arend@broadcom.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-WSS-ID: 7D4A8AFA2U85536100-01-01 Cc: Greg Goldman , hostap@lists.shmoo.com, Johannes Berg 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 P2P listen phase is used to listen for P2P probe request messages from peers. The probe reporting call should be done on the same interface as the remain_on_channel. Cc: Greg Goldman Cc: Jithu Jance Cc: Johannes Berg Signed-hostap: Arend van Spriel --- Hi David, Found during testing that my device was not found, because we were not responding to P2P probe requests during the listen phase. This patch fixes it for my driver and it kind of makes sense to me that the probe request reporting should be done on the same interface as the on doing the LISTEN. Not sure whether the P2P device patches are already applied so sending this patch to you first. Regards, Arend --- wpa_supplicant/driver_i.h | 9 +++++++++ wpa_supplicant/p2p_supplicant.c | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) -- 1.7.10.4 diff --git a/wpa_supplicant/driver_i.h b/wpa_supplicant/driver_i.h index d70da3d..c7de723 100644 --- a/wpa_supplicant/driver_i.h +++ b/wpa_supplicant/driver_i.h @@ -734,6 +734,15 @@ wpa_drv_p2p_send_action_cancel_wait(struct wpa_supplicant *wpa_s) wpa_s->driver->send_action_cancel_wait(wpa_p2p_get_priv(wpa_s)); } +static inline int wpa_drv_p2p_probe_req_report(struct wpa_supplicant *wpa_s, + int report) +{ + if (wpa_s->driver->probe_req_report) + return wpa_s->driver->probe_req_report(wpa_p2p_get_priv(wpa_s), + report); + return -1; +} + static inline int wpa_drv_p2p_remain_on_channel(struct wpa_supplicant *wpa_s, unsigned int freq, unsigned int duration) diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index a6f7614..fefa86f 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -1229,7 +1229,7 @@ static int wpas_start_listen(void *ctx, unsigned int freq, wpa_drv_set_ap_wps_ie(wpa_s, NULL, probe_resp_ie, NULL); - if (wpa_drv_probe_req_report(wpa_s, 1) < 0) { + if (wpa_drv_p2p_probe_req_report(wpa_s, 1) < 0) { wpa_printf(MSG_DEBUG, "P2P: Failed to request the driver to " "report received Probe Request frames"); return -1; @@ -1261,7 +1261,7 @@ static void wpas_stop_listen(void *ctx) wpa_s->roc_waiting_drv_freq = 0; } wpa_drv_set_ap_wps_ie(wpa_s, NULL, NULL, NULL); - wpa_drv_probe_req_report(wpa_s, 0); + wpa_drv_p2p_probe_req_report(wpa_s, 0); }