1 --- a/src/drivers/driver_nl80211.c
2 +++ b/src/drivers/driver_nl80211.c
3 @@ -111,6 +111,7 @@ struct i802_bss {
4 struct wpa_driver_nl80211_data *drv;
8 char ifname[IFNAMSIZ + 1];
10 unsigned int beacon_set:1;
11 @@ -121,7 +122,6 @@ struct i802_bss {
12 struct wpa_driver_nl80211_data {
13 struct nl80211_global *global;
18 struct netlink_data *netlink;
19 @@ -2111,7 +2111,7 @@ wpa_driver_nl80211_finish_drv_init(struc
20 if (wpa_driver_nl80211_capa(drv))
23 - if (linux_get_ifhwaddr(drv->ioctl_sock, bss->ifname, drv->addr))
24 + if (linux_get_ifhwaddr(drv->ioctl_sock, bss->ifname, bss->addr))
27 if (nl80211_register_action_frames(drv) < 0) {
28 @@ -5650,7 +5650,7 @@ static int i802_set_wds_sta(void *priv,
29 if (!if_nametoindex(name)) {
30 if (nl80211_create_iface(drv, name,
31 NL80211_IFTYPE_AP_VLAN,
36 linux_br_add_if(drv->ioctl_sock, bridge_ifname,
37 @@ -5878,7 +5878,7 @@ static int nl80211_addr_in_use(struct nl
38 struct wpa_driver_nl80211_data *drv;
39 dl_list_for_each(drv, &global->interfaces,
40 struct wpa_driver_nl80211_data, list) {
41 - if (os_memcmp(addr, drv->addr, ETH_ALEN) == 0)
42 + if (os_memcmp(addr, drv->first_bss.addr, ETH_ALEN) == 0)
46 @@ -5893,9 +5893,9 @@ static int nl80211_p2p_interface_addr(st
50 - os_memcpy(new_addr, drv->addr, ETH_ALEN);
51 + os_memcpy(new_addr, drv->first_bss.addr, ETH_ALEN);
52 for (idx = 0; idx < 64; idx++) {
53 - new_addr[0] = drv->addr[0] | 0x02;
54 + new_addr[0] = drv->first_bss.addr[0] | 0x02;
55 new_addr[0] ^= idx << 2;
56 if (!nl80211_addr_in_use(drv->global, new_addr))
58 @@ -5996,6 +5996,7 @@ static int wpa_driver_nl80211_if_add(voi
62 + memcpy(new_bss->addr, addr ? addr : if_addr, ETH_ALEN);
63 os_strlcpy(new_bss->ifname, ifname, IFNAMSIZ);
64 new_bss->ifindex = ifidx;