]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - src/p2p/p2p.c
P2P: Document operating channel selection functions
[thirdparty/hostap.git] / src / p2p / p2p.c
index b729fce59daa3c396cb99650da4fb91f90aaa42f..f0dc06475c6d76be349494bc2259bc77d99ec81c 100644 (file)
@@ -1117,6 +1117,19 @@ void p2p_stop_find(struct p2p_data *p2p)
 }
 
 
+/**
+ * p2p_prepare_channel - Select operating channel for GO Negotiation
+ * @p2p: P2P module context from p2p_init()
+ * @dev: Selected peer device
+ * @force_freq: Forced frequency in MHz or 0 if not forced
+ * @pref_freq: Preferred frequency in MHz or 0 if no preference
+ * Returns: 0 on success, -1 on failure (channel not supported for P2P)
+ *
+ * This function is used to do initial operating channel selection for GO
+ * Negotiation prior to having received peer information. The selected channel
+ * may be further optimized in p2p_reselect_channel() once the peer information
+ * is available.
+ */
 static int p2p_prepare_channel(struct p2p_data *p2p, struct p2p_device *dev,
                               unsigned int force_freq, unsigned int pref_freq)
 {