u8 op_channel;
/**
+ * cfg_op_channel - Whether op_channel is hardcoded in configuration
+ */
+ u8 cfg_op_channel;
+
+ /**
* channels - Own supported regulatory classes and channels
*
* List of supposerted channels per regulatory class. The regulatory
void p2p_flush(struct p2p_data *p2p);
/**
+ * p2p_unauthorize - Unauthorize the specified peer device
+ * @p2p: P2P module context from p2p_init()
+ * @addr: P2P peer entry to be unauthorized
+ * Returns: 0 on success, -1 on failure
+ *
+ * This command removes any connection authorization from the specified P2P
+ * peer device address. This can be used, e.g., to cancel effect of a previous
+ * p2p_authorize() or p2p_connect() call that has not yet resulted in completed
+ * GO Negotiation.
+ */
+int p2p_unauthorize(struct p2p_data *p2p, const u8 *addr);
+
+/**
* p2p_set_dev_name - Set device name
* @p2p: P2P module context from p2p_init()
* Returns: 0 on success, -1 on failure
void p2p_stop_find(struct p2p_data *p2p);
/**
+ * p2p_stop_find_for_freq - Stop P2P Find for next oper on specific freq
+ * @p2p: P2P module context from p2p_init()
+ * @freq: Frequency in MHz for next operation
+ *
+ * This is like p2p_stop_find(), but Listen state is not stopped if we are
+ * already on the same frequency.
+ */
+void p2p_stop_find_for_freq(struct p2p_data *p2p, int freq);
+
+/**
* p2p_listen - Start P2P Listen state for specified duration
* @p2p: P2P module context from p2p_init()
* @timeout: Listen state duration in milliseconds
*/
void p2p_scan_res_handled(struct p2p_data *p2p);
+enum p2p_send_action_result {
+ P2P_SEND_ACTION_SUCCESS /* Frame was send and acknowledged */,
+ P2P_SEND_ACTION_NO_ACK /* Frame was sent, but not acknowledged */,
+ P2P_SEND_ACTION_FAILED /* Frame was not sent due to a failure */
+};
+
/**
* p2p_send_action_cb - Notify TX status of an Action frame
* @p2p: P2P module context from p2p_init()
* @dst: Destination MAC address (Address 1)
* @src: Source MAC address (Address 2)
* @bssid: BSSID (Address 3)
- * @success: Whether the transmission succeeded
+ * @result: Result of the transmission attempt
*
* This function is used to indicate the result of an Action frame transmission
* that was requested with struct p2p_config::send_action() callback.
*/
void p2p_send_action_cb(struct p2p_data *p2p, unsigned int freq, const u8 *dst,
- const u8 *src, const u8 *bssid, int success);
+ const u8 *src, const u8 *bssid,
+ enum p2p_send_action_result result);
/**
* p2p_listen_cb - Indicate the start of a requested Listen state
u8 interface_addr[ETH_ALEN];
/**
+ * max_clients - Maximum number of clients in the group
+ */
+ unsigned int max_clients;
+
+ /**
* cb_ctx - Context to use with callback functions
*/
void *cb_ctx;
*/
void (*ie_update)(void *ctx, struct wpabuf *beacon_ies,
struct wpabuf *proberesp_ies);
+
+ /**
+ * idle_update - Notification of changes in group idle state
+ * @ctx: Callback context from cb_ctx
+ * @idle: Whether the group is idle (no associated stations)
+ */
+ void (*idle_update)(void *ctx, int idle);
};
/**
*/
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);
+
+void p2p_update_channel_list(struct p2p_data *p2p, struct p2p_channels *chan);
+
+/**
+ * p2p_set_best_channels - Update best channel information
+ * @p2p: P2P module context from p2p_init()
+ * @freq_24: Frequency (MHz) of best channel in 2.4 GHz band
+ * @freq_5: Frequency (MHz) of best channel in 5 GHz band
+ * @freq_overall: Frequency (MHz) of best channel overall
+ */
+void p2p_set_best_channels(struct p2p_data *p2p, int freq_24, int freq_5,
+ int freq_overall);
+
#endif /* P2P_H */