aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/p2p_supplicant.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2013-10-22 16:10:56 (GMT)
committerJouni Malinen <j@w1.fi>2013-10-22 21:44:07 (GMT)
commitaf8a827b90ad504711bf1c156b715103878a934d (patch)
treeef8100ad8d33aa08932c654d8c36ab29fa47f3f1 /wpa_supplicant/p2p_supplicant.c
parent941dae0a2e2f6cacee90d2ea8fcd7e94229d3528 (diff)
downloadhostap-af8a827b90ad504711bf1c156b715103878a934d.zip
hostap-af8a827b90ad504711bf1c156b715103878a934d.tar.gz
hostap-af8a827b90ad504711bf1c156b715103878a934d.tar.bz2
Make frequency range list routines more general
This allows the frequency range list implementation to be shared for other purposes. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/p2p_supplicant.c')
-rw-r--r--wpa_supplicant/p2p_supplicant.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 95ebdfd..5f5145b 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -2908,18 +2908,7 @@ static void wpas_invitation_result(void *ctx, int status, const u8 *bssid,
static int wpas_p2p_disallowed_freq(struct wpa_global *global,
unsigned int freq)
{
- unsigned int i;
-
- if (global->p2p_disallow_freq == NULL)
- return 0;
-
- for (i = 0; i < global->num_p2p_disallow_freq; i++) {
- if (freq >= global->p2p_disallow_freq[i].min &&
- freq <= global->p2p_disallow_freq[i].max)
- return 1;
- }
-
- return 0;
+ return freq_range_list_includes(&global->p2p_disallow_freq, freq);
}