|
@@ -490,6 +490,31 @@ int p2p_group_match_dev_type(struct p2p_group *group, struct wpabuf *wps)
|
|
|
}
|
|
|
|
|
|
|
|
|
+int p2p_group_match_dev_id(struct p2p_group *group, struct wpabuf *p2p)
|
|
|
+{
|
|
|
+ struct p2p_group_member *m;
|
|
|
+ struct p2p_message msg;
|
|
|
+
|
|
|
+ os_memset(&msg, 0, sizeof(msg));
|
|
|
+ if (p2p_parse_p2p_ie(p2p, &msg))
|
|
|
+ return 1; /* Failed to parse - assume no filter on Device ID */
|
|
|
+
|
|
|
+ if (!msg.device_id)
|
|
|
+ return 1; /* No filter on Device ID */
|
|
|
+
|
|
|
+ if (os_memcmp(msg.device_id, group->p2p->cfg->dev_addr, ETH_ALEN) == 0)
|
|
|
+ return 1; /* Match with our P2P Device Address */
|
|
|
+
|
|
|
+ for (m = group->members; m; m = m->next) {
|
|
|
+ if (os_memcmp(msg.device_id, m->dev_addr, ETH_ALEN) == 0)
|
|
|
+ return 1; /* Match with group client P2P Device Address */
|
|
|
+ }
|
|
|
+
|
|
|
+ /* No match with Device ID */
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
void p2p_group_notif_formation_done(struct p2p_group *group)
|
|
|
{
|
|
|
if (group == NULL)
|