aboutsummaryrefslogtreecommitdiffstats
path: root/src/p2p/p2p_i.h
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2013-11-18 15:41:39 (GMT)
committerJouni Malinen <j@w1.fi>2013-11-18 15:50:21 (GMT)
commit5576663fba2487b282d5de77d94f3fe41dd4180a (patch)
treead4446e6917041811700ad2713118e9ebbc4c898 /src/p2p/p2p_i.h
parentb17d89bd10b9f10cb075e91ca21231ab7f57dd02 (diff)
downloadhostap-5576663fba2487b282d5de77d94f3fe41dd4180a.zip
hostap-5576663fba2487b282d5de77d94f3fe41dd4180a.tar.gz
hostap-5576663fba2487b282d5de77d94f3fe41dd4180a.tar.bz2
P2P: Move random channel selection into a helper function
The new p2p_channel_select() function can be re-used to implement random channel selection from a set of operating classes in all places that need such functonality. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/p2p/p2p_i.h')
-rw-r--r--src/p2p/p2p_i.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/p2p/p2p_i.h b/src/p2p/p2p_i.h
index 6b7f6bd..efc163a 100644
--- a/src/p2p/p2p_i.h
+++ b/src/p2p/p2p_i.h
@@ -581,6 +581,8 @@ int p2p_channels_includes(const struct p2p_channels *channels, u8 reg_class,
u8 channel);
void p2p_channels_dump(struct p2p_data *p2p, const char *title,
const struct p2p_channels *chan);
+int p2p_channel_select(struct p2p_channels *chans, const int *classes,
+ u8 *op_class, u8 *op_channel);
/* p2p_parse.c */
int p2p_parse_p2p_ie(const struct wpabuf *buf, struct p2p_message *msg);