[RFC 2/3] driver: detect and store P2P Device driver capability
Arend van Spriel
arend
Sat Jan 12 08:28:18 PST 2013
Since Linux v3.7 the concept of a P2P_DEVICE object has been introduced
in nl80211/cfg80211. This patch added a driver flag and detection of
the capability in the nl80211 driver.
Cc: David Spinadel <david.spinadel at intel.com>
Cc: Johannes Berg <johannes at sipsolutions.net>
Cc: Greg Goldman <ggoldman at broadcom.com>
Signed-hostap: Arend van Spriel <arend at broadcom.com>
---
src/drivers/driver.h | 4 ++++
src/drivers/driver_nl80211.c | 3 +++
2 files changed, 7 insertions(+)
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 4a9db01..948df27 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -844,6 +844,10 @@ struct wpa_driver_capa {
* P2P group operations.
*/
#define WPA_DRIVER_FLAGS_P2P_MGMT_AND_NON_P2P 0x00000008
+/*
+ * Driver supports creation of P2P Device for P2P management.
+ */
+#define WPA_DRIVER_FLAGS_P2P_DEVICE 0x00004000
unsigned int p2p_flags;
int max_scan_ssids;
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 5275185..ea984b2 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -2507,6 +2507,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
case NL80211_IFTYPE_AP:
capa->flags |= WPA_DRIVER_FLAGS_AP;
break;
+ case NL80211_IFTYPE_P2P_DEVICE:
+ capa->flags |= WPA_DRIVER_FLAGS_P2P_DEVICE;
+ break;
case NL80211_IFTYPE_P2P_GO:
p2p_go_supported = 1;
break;
--
1.7.10.4
More information about the Hostap
mailing list