P2P: Fix common frequencies calculation for a group

Ignore group members for which there is no supported channels
information when calculating common group frequencies.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
Ilan Peer 2016-09-05 17:33:01 +03:00 committed by Jouni Malinen
parent 7487ef144e
commit dc2744f922

View file

@ -1112,7 +1112,7 @@ int p2p_group_get_common_freqs(struct p2p_group *group, int *common_freqs,
struct p2p_device *dev;
dev = p2p_get_device(group->p2p, m->dev_addr);
if (!dev)
if (!dev || dev->channels.reg_classes == 0)
continue;
p2p_channels_intersect(&intersect, &dev->channels, &res);