[PATCH 3/7] wpas: Add p2p utility function to get go iface from a peer dev address

Tomasz Bursztyka tomasz.bursztyka at linux.intel.com
Tue May 27 06:30:24 EDT 2014


Hi Jouni,

>> +struct wpa_supplicant *wpas_get_go_p2p_go(struct wpa_supplicant *wpa_s,
>> >+					  const u8 *dev_addr)
>> >+{
>> >+	const u8 *go_dev_addr;
>> >+
>> >+	go_dev_addr = p2p_get_own_go_device_address(wpa_s->global->p2p,
>> >+						    dev_addr);
>> >+	if (go_dev_addr == NULL)
>> >+		return NULL;
>> >+
>> >+	for (wpa_s = wpa_s->global->ifaces; wpa_s; wpa_s = wpa_s->next) {
>> >+		if (os_memcmp(wpa_s->go_dev_addr, go_dev_addr, ETH_ALEN) == 0)
>> >+			return wpa_s;
>> >+	}
> wpa_s->go_dev_addr is that P2P Device Address of the GO, but go_dev_addr
> from p2p_get_own_go_device_address() was P2P Interface Address..

Yes, again the bug of patch 2. I have to store the real device address 
in the group structure and
return that one and not its interface address.

Tomasz


More information about the HostAP mailing list