P2P: Reject multi-channel concurrent operations depending on driver
[libeap.git] / src / p2p / p2p.h
index e108172..502ad8d 100644 (file)
@@ -122,6 +122,11 @@ struct p2p_go_neg_results {
         * persistent_group - Whether the group should be made persistent
         */
        int persistent_group;
+
+       /**
+        * peer_config_timeout - Peer configuration timeout (in 10 msec units)
+        */
+       unsigned int peer_config_timeout;
 };
 
 struct p2p_data;
@@ -218,6 +223,11 @@ struct p2p_config {
        size_t max_peers;
 
        /**
+        * p2p_intra_bss - Intra BSS communication is supported
+        */
+       int p2p_intra_bss;
+
+       /**
         * ssid_postfix - Postfix data to add to the SSID
         *
         * This data will be added to the end of the SSID after the
@@ -398,6 +408,7 @@ struct p2p_config {
         * go_neg_req_rx - Notification of a receive GO Negotiation Request
         * @ctx: Callback context from cb_ctx
         * @src: Source address of the message triggering this notification
+        * @dev_passwd_id: WPS Device Password ID
         *
         * This callback is used to notify that a P2P Device is requesting
         * group owner negotiation with us, but we do not have all the
@@ -406,7 +417,7 @@ struct p2p_config {
         * PIN or PBC button press. This information can be provided with a
         * call to p2p_connect().
         */
-       void (*go_neg_req_rx)(void *ctx, const u8 *src);
+       void (*go_neg_req_rx)(void *ctx, const u8 *src, u16 dev_passwd_id);
 
        /**
         * go_neg_completed - Notification of GO Negotiation results
@@ -1171,6 +1182,13 @@ int p2p_go_params(struct p2p_data *p2p, struct p2p_go_neg_results *params);
 u8 p2p_get_group_capab(const struct wpabuf *p2p_ie);
 
 /**
+ * p2p_get_cross_connect_disallowed - Does WLAN AP disallows cross connection
+ * @p2p_ie: P2P IE(s) contents
+ * Returns: 0 if cross connection is allow, 1 if not
+ */
+int p2p_get_cross_connect_disallowed(const struct wpabuf *p2p_ie);
+
+/**
  * p2p_get_go_dev_addr - Get P2P Device Address from P2P IE data
  * @p2p_ie: P2P IE(s) contents
  * Returns: Pointer to P2P Device Address or %NULL if not included
@@ -1213,7 +1231,36 @@ int p2p_set_ssid_postfix(struct p2p_data *p2p, const u8 *postfix, size_t len);
 
 int p2p_get_interface_addr(struct p2p_data *p2p, const u8 *dev_addr,
                           u8 *iface_addr);
+int p2p_get_dev_addr(struct p2p_data *p2p, const u8 *iface_addr,
+                          u8 *dev_addr);
 
 void p2p_set_peer_filter(struct p2p_data *p2p, const u8 *addr);
 
+/**
+ * p2p_set_cross_connect - Set cross connection capability
+ * @p2p: P2P module context from p2p_init()
+ * @enabled: Whether cross connection will be enabled
+ */
+void p2p_set_cross_connect(struct p2p_data *p2p, int enabled);
+
+int p2p_get_oper_freq(struct p2p_data *p2p, const u8 *iface_addr);
+
+int p2p_add_device(struct p2p_data *p2p, const u8 *addr, int freq, int level,
+                  const u8 *ies, size_t ies_len);
+
+/**
+ * p2p_set_intra_bss_dist - Set intra BSS distribution
+ * @p2p: P2P module context from p2p_init()
+ * @enabled: Whether intra BSS distribution will be enabled
+ */
+void p2p_set_intra_bss_dist(struct p2p_data *p2p, int enabled);
+
+/**
+ * p2p_supported_freq - Check whether channel is supported for P2P
+ * @p2p: P2P module context from p2p_init()
+ * @freq: Channel frequency in MHz
+ * Returns: 0 if channel not usable for P2P, 1 if usable for P2P
+ */
+int p2p_supported_freq(struct p2p_data *p2p, unsigned int freq);
+
 #endif /* P2P_H */