diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2013-03-05 12:37:16 -0800 |
---|---|---|
committer | Dmitry Shmidt <dimitrysh@google.com> | 2013-03-05 12:40:20 -0800 |
commit | 7a5e50a0554bee77a9da492ea3d86f46147f1671 (patch) | |
tree | b729260eea9095e159580813a5cd9ea944055779 /src/p2p/p2p_utils.c | |
parent | 8c65289885e84727226d81b3d32856f79c31ee5f (diff) | |
download | wpa_supplicant_8-7a5e50a0554bee77a9da492ea3d86f46147f1671.tar.gz |
Accumulative patch from commit 77e4e85321a0a1255901914d5de916aba050f9e1
P2P: Mark peer authorized for persistent group invitation
P2P: Indicate frequency for upper layer invitation processing
Allow wpa_supplicant AP mode to configure Beacon interval
P2P: Use peer's channel list to limit GO freq on invitation
P2P: Allow P2P client to specify preferred group channel
P2P: Use shared function for setting up frequencies
P2P: Allow all channels in case of multi channel concurrency
hostapd: Make VHT IE struct more expressive
Change-Id: I6d86d98a10a1a699bb464c5b916ebf21f626558b
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'src/p2p/p2p_utils.c')
-rw-r--r-- | src/p2p/p2p_utils.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/p2p/p2p_utils.c b/src/p2p/p2p_utils.c index bcc690d8..37b9361a 100644 --- a/src/p2p/p2p_utils.c +++ b/src/p2p/p2p_utils.c @@ -254,6 +254,23 @@ int p2p_channels_includes(const struct p2p_channels *channels, u8 reg_class, } +int p2p_channels_includes_freq(const struct p2p_channels *channels, + unsigned int freq) +{ + size_t i, j; + for (i = 0; i < channels->reg_classes; i++) { + const struct p2p_reg_class *reg = &channels->reg_class[i]; + for (j = 0; j < reg->channels; j++) { + if (p2p_channel_to_freq_j4(reg->reg_class, + reg->channel[j]) == + (int) freq) + return 1; + } + } + return 0; +} + + int p2p_supported_freq(struct p2p_data *p2p, unsigned int freq) { u8 op_reg_class, op_channel; |