From patchwork Sat Jan 12 16:28:19 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: 211509 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 28EF92C00FD for ; Sun, 13 Jan 2013 03:29:27 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 3D7419C0ED; Sat, 12 Jan 2013 11:29:24 -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 GuoiqrCYmBnJ; Sat, 12 Jan 2013 11:29:23 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id A3CAC9C15A; Sat, 12 Jan 2013 11:28: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 28C229C15A for ; Sat, 12 Jan 2013 11:28: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 B4faNcMJiqsq for ; Sat, 12 Jan 2013 11:28:39 -0500 (EST) Received: from mms1.broadcom.com (mms1.broadcom.com [216.31.210.17]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id E1B599C0EE for ; Sat, 12 Jan 2013 11:28:33 -0500 (EST) Received: from [10.9.208.57] by mms1.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.5)); Sat, 12 Jan 2013 08:26:30 -0800 X-Server-Uuid: 06151B78-6688-425E-9DE2-57CB27892261 Received: from IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) by IRVEXCHCAS08.corp.ad.broadcom.com (10.9.208.57) with Microsoft SMTP Server (TLS) id 14.1.355.2; Sat, 12 Jan 2013 08:28:25 -0800 Received: from mail-sj1-12.sj.broadcom.com (10.10.10.20) by IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) with Microsoft SMTP Server id 14.1.355.2; Sat, 12 Jan 2013 08:28:25 -0800 Received: from arend-vb-linux (unknown [10.177.252.171]) by mail-sj1-12.sj.broadcom.com (Postfix) with ESMTP id 1D91C207C0; Sat, 12 Jan 2013 08:28:25 -0800 (PST) Received: from arend by arend-vb-linux with local (Exim 4.80) ( envelope-from ) id 1Tu3wX-00035q-LD; Sat, 12 Jan 2013 17:28:25 +0100 From: "Arend van Spriel" To: "Jouni Malinen" Subject: [RFC 3/3] driver: add new P2P device interface type Date: Sat, 12 Jan 2013 17:28:19 +0100 Message-ID: <1358008099-11846-4-git-send-email-arend@broadcom.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1358008099-11846-1-git-send-email-arend@broadcom.com> References: <1358008099-11846-1-git-send-email-arend@broadcom.com> MIME-Version: 1.0 X-WSS-ID: 7CEF513C1ZS5272966-01-01 Cc: Greg Goldman , Johannes Berg , hostap-list 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 The nl80211 api introduced the concept of a P2P device used for P2P management operations. This patch introduces this concept in the supplicant driver interface. Cc: David Spinadel Cc: Johannes Berg Cc: Greg Goldman Signed-hostap: Arend van Spriel --- src/drivers/driver.h | 9 +++++++++ src/drivers/driver_nl80211.c | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 948df27..4361e3d 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -941,6 +941,15 @@ enum wpa_driver_if_type { WPA_IF_AP_BSS, /** + * WPA_IF_P2P_DEV - P2P Device + * + * This interface has no network interface associated with it + * and shall be used for P2P management, ie. discovery, go negotiation, + * etc. + */ + WPA_IF_P2P_DEV, + + /** * WPA_IF_P2P_GO - P2P Group Owner */ WPA_IF_P2P_GO, diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index ea984b2..e93791d 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -362,7 +362,8 @@ static int is_sta_interface(enum nl80211_iftype nlmode) static int is_p2p_interface(enum nl80211_iftype nlmode) { return (nlmode == NL80211_IFTYPE_P2P_CLIENT || - nlmode == NL80211_IFTYPE_P2P_GO); + nlmode == NL80211_IFTYPE_P2P_GO || + nlmode == NL80211_IFTYPE_P2P_DEVICE); } @@ -8010,6 +8011,8 @@ static enum nl80211_iftype wpa_driver_nl80211_if_type( return NL80211_IFTYPE_AP; case WPA_IF_P2P_GO: return NL80211_IFTYPE_P2P_GO; + case WPA_IF_P2P_DEV: + return NL80211_IFTYPE_P2P_DEVICE; } return -1; }