-@@ -6625,7 +6629,7 @@ static int nl80211_addr_in_use(struct nl
- struct wpa_driver_nl80211_data *drv;
- dl_list_for_each(drv, &global->interfaces,
- struct wpa_driver_nl80211_data, list) {
-- if (os_memcmp(addr, drv->addr, ETH_ALEN) == 0)
-+ if (os_memcmp(addr, drv->first_bss.addr, ETH_ALEN) == 0)
- return 1;
- }
- return 0;
-@@ -6640,9 +6644,9 @@ static int nl80211_p2p_interface_addr(st
- if (!drv->global)
- return -1;
-
-- os_memcpy(new_addr, drv->addr, ETH_ALEN);
-+ os_memcpy(new_addr, drv->first_bss.addr, ETH_ALEN);
- for (idx = 0; idx < 64; idx++) {
-- new_addr[0] = drv->addr[0] | 0x02;
-+ new_addr[0] = drv->first_bss.addr[0] | 0x02;
- new_addr[0] ^= idx << 2;
- if (!nl80211_addr_in_use(drv->global, new_addr))
- break;
-@@ -6745,6 +6749,7 @@ static int wpa_driver_nl80211_if_add(voi
- os_free(new_bss);
- return -1;
- }
-+ memcpy(new_bss->addr, addr ? addr : if_addr, ETH_ALEN);
- os_strlcpy(new_bss->ifname, ifname, IFNAMSIZ);
- new_bss->ifindex = ifidx;
- new_bss->drv = drv;
-@@ -6775,7 +6780,12 @@ static int wpa_driver_nl80211_if_remove(