From patchwork Sat Jan 12 16:28:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [RFC,3/3] driver: add new P2P device interface type Date: Sat, 12 Jan 2013 06:28:19 -0000 From: Arend van Spriel X-Patchwork-Id: 211509 Message-Id: <1358008099-11846-4-git-send-email-arend@broadcom.com> To: "Jouni Malinen" Cc: Greg Goldman , Johannes Berg , hostap-list 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; }